Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
[sfrench/cifs-2.6.git] / net / mac80211 / chan.c
index 3702d642cd8f77bad58e23863efcfc4275db0418..a310e33972de8881bf4dd71bdff36d55fa966226 100644 (file)
@@ -429,7 +429,7 @@ static int ieee80211_add_chanctx(struct ieee80211_local *local,
 
        if (!local->use_chanctx) {
                local->_oper_chandef = ctx->conf.def;
-               ieee80211_hw_config(local, 0);
+               ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
        } else {
                err = drv_add_chanctx(local, ctx);
                if (err) {
@@ -485,7 +485,7 @@ static void ieee80211_del_chanctx(struct ieee80211_local *local,
 
                local->hw.conf.radar_enabled = false;
 
-               ieee80211_hw_config(local, 0);
+               ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
        } else {
                drv_remove_chanctx(local, ctx);
        }
@@ -702,6 +702,13 @@ void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local,
                rx_chains_static = max(rx_chains_static, needed_static);
                rx_chains_dynamic = max(rx_chains_dynamic, needed_dynamic);
        }
+
+       /* Disable SMPS for the monitor interface */
+       sdata = rcu_dereference(local->monitor_sdata);
+       if (sdata &&
+           rcu_access_pointer(sdata->vif.chanctx_conf) == &chanctx->conf)
+               rx_chains_dynamic = rx_chains_static = local->rx_chains;
+
        rcu_read_unlock();
 
        if (!local->use_chanctx) {