]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mac80211: ignore quiet mode in probe
authorSara Sharon <sara.sharon@intel.com>
Wed, 6 Feb 2019 11:17:17 +0000 (13:17 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 22 Feb 2019 12:46:25 +0000 (13:46 +0100)
Some buggy APs keep the CSA IE in probes after the channel
switch was completed and can silence us for no good reason.
Apply quiet mode only from beacons. If there is real channel
switch going on, we will see the beacon anyway.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index e20456c2d6fba059430f321fc66d165bfe457ee7..2dbcf5d5512efe26de6387cc851cd9fc801a1293 100644 (file)
@@ -1316,7 +1316,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
        if (!res) {
                ch_switch.timestamp = timestamp;
                ch_switch.device_timestamp = device_timestamp;
-               ch_switch.block_tx = csa_ie.mode;
+               ch_switch.block_tx =  beacon ? csa_ie.mode : 0;
                ch_switch.chandef = csa_ie.chandef;
                ch_switch.count = csa_ie.count;
                ch_switch.delay = csa_ie.max_switch_time;
@@ -1409,7 +1409,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
 
        sdata->vif.csa_active = true;
        sdata->csa_chandef = csa_ie.chandef;
-       sdata->csa_block_tx = csa_ie.mode;
+       sdata->csa_block_tx = ch_switch.block_tx;
        ifmgd->csa_ignored_same_chan = false;
 
        if (sdata->csa_block_tx)
@@ -1443,7 +1443,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
         * reset when the disconnection worker runs.
         */
        sdata->vif.csa_active = true;
-       sdata->csa_block_tx = csa_ie.mode;
+       sdata->csa_block_tx = ch_switch.block_tx;
 
        ieee80211_queue_work(&local->hw, &ifmgd->csa_connection_drop_work);
        mutex_unlock(&local->chanctx_mtx);