These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / net / wireless / ath / ath9k / main.c
index d5f2fbf..d184e68 100644 (file)
@@ -938,6 +938,9 @@ static void ath9k_vif_iter(struct ath9k_vif_iter_data *iter_data,
                if (avp->assoc && !iter_data->primary_sta)
                        iter_data->primary_sta = vif;
                break;
+       case NL80211_IFTYPE_OCB:
+               iter_data->nocbs++;
+               break;
        case NL80211_IFTYPE_ADHOC:
                iter_data->nadhocs++;
                if (vif->bss_conf.enable_beacon)
@@ -1111,6 +1114,8 @@ void ath9k_calculate_summary_state(struct ath_softc *sc,
 
                if (iter_data.nmeshes)
                        ah->opmode = NL80211_IFTYPE_MESH_POINT;
+               else if (iter_data.nocbs)
+                       ah->opmode = NL80211_IFTYPE_OCB;
                else if (iter_data.nwds)
                        ah->opmode = NL80211_IFTYPE_AP;
                else if (iter_data.nadhocs)
@@ -1444,8 +1449,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
 }
 
 #define SUPPORTED_FILTERS                      \
-       (FIF_PROMISC_IN_BSS |                   \
-       FIF_ALLMULTI |                          \
+       (FIF_ALLMULTI |                         \
        FIF_CONTROL |                           \
        FIF_PSPOLL |                            \
        FIF_OTHER_BSS |                         \
@@ -1460,13 +1464,18 @@ static void ath9k_configure_filter(struct ieee80211_hw *hw,
                                   u64 multicast)
 {
        struct ath_softc *sc = hw->priv;
+       struct ath_chanctx *ctx;
        u32 rfilt;
 
        changed_flags &= SUPPORTED_FILTERS;
        *total_flags &= SUPPORTED_FILTERS;
 
        spin_lock_bh(&sc->chan_lock);
-       sc->cur_chan->rxfilter = *total_flags;
+       ath_for_each_chanctx(sc, ctx)
+               ctx->rxfilter = *total_flags;
+#ifdef CONFIG_ATH9K_CHANNEL_CONTEXT
+       sc->offchannel.chan.rxfilter = *total_flags;
+#endif
        spin_unlock_bh(&sc->chan_lock);
 
        ath9k_ps_wakeup(sc);
@@ -1756,7 +1765,8 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
                ath9k_calculate_summary_state(sc, avp->chanctx);
        }
 
-       if (changed & BSS_CHANGED_IBSS) {
+       if ((changed & BSS_CHANGED_IBSS) ||
+             (changed & BSS_CHANGED_OCB)) {
                memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
                common->curaid = bss_conf->aid;
                ath9k_hw_write_associd(sc->sc_ah);
@@ -1852,7 +1862,7 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
                              struct ieee80211_vif *vif,
                              enum ieee80211_ampdu_mlme_action action,
                              struct ieee80211_sta *sta,
-                             u16 tid, u16 *ssn, u8 buf_size)
+                             u16 tid, u16 *ssn, u8 buf_size, bool amsdu)
 {
        struct ath_softc *sc = hw->priv;
        struct ath_common *common = ath9k_hw_common(sc->sc_ah);
@@ -2247,7 +2257,7 @@ static void ath9k_cancel_pending_offchannel(struct ath_softc *sc)
 
                del_timer_sync(&sc->offchannel.timer);
                if (sc->offchannel.state >= ATH_OFFCHANNEL_ROC_START)
-                       ath_roc_complete(sc, true);
+                       ath_roc_complete(sc, ATH_ROC_COMPLETE_ABORT);
        }
 
        if (test_bit(ATH_OP_SCANNING, &common->op_flags)) {
@@ -2356,7 +2366,7 @@ static int ath9k_cancel_remain_on_channel(struct ieee80211_hw *hw)
 
        if (sc->offchannel.roc_vif) {
                if (sc->offchannel.state >= ATH_OFFCHANNEL_ROC_START)
-                       ath_roc_complete(sc, true);
+                       ath_roc_complete(sc, ATH_ROC_COMPLETE_CANCEL);
        }
 
        mutex_unlock(&sc->mutex);