mac80211: don't forget to wake queues
authorAshok Nagarajan <ashok@cozybit.com>
Thu, 28 Jun 2012 07:52:30 +0000 (00:52 -0700)
committerGerrit <chrome-bot@google.com>
Tue, 3 Jul 2012 19:59:00 +0000 (12:59 -0700)
This patch is written by Johannes that helps to wake tx
queues when there is a change in channel type. This could
be found from "http://p.sipsolutions.net/3e89ee42463d6cc9.txt".

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:10361
TEST=Run with new kernel on 5GHz net with invalid HT40

Change-Id: Ic730583ebd6ca65871072a9025b74574368d0280
Reviewed-on: https://gerrit.chromium.org/gerrit/26623
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
net/mac80211/mlme.c

index f09f831..3ecca42 100644 (file)
@@ -203,7 +203,7 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
        u32 changed = 0;
        int hti_cfreq;
        u16 ht_opmode;
-       bool enable_ht = true;
+       bool enable_ht = true, queues_stopped = false;
        bool disable_tx_ht = false;
        enum nl80211_channel_type prev_chantype;
        enum nl80211_channel_type rx_channel_type = NL80211_CHAN_NO_HT;
@@ -303,6 +303,7 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
                 */
                ieee80211_stop_queues_by_reason(&sdata->local->hw,
                                IEEE80211_QUEUE_STOP_REASON_CHTYPE_CHANGE);
+               queues_stopped = true;
 
                /* flush out all packets */
                synchronize_net();
@@ -321,12 +322,12 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
                                                 IEEE80211_RC_HT_CHANGED,
                                                 tx_channel_type);
                rcu_read_unlock();
-
-               if (beacon_htcap_ie)
-                       ieee80211_wake_queues_by_reason(&sdata->local->hw,
-                               IEEE80211_QUEUE_STOP_REASON_CHTYPE_CHANGE);
        }
 
+       if (queues_stopped)
+               ieee80211_wake_queues_by_reason(&sdata->local->hw,
+                       IEEE80211_QUEUE_STOP_REASON_CHTYPE_CHANGE);
+
        ht_opmode = le16_to_cpu(hti->operation_mode);
 
        /* if bss configuration changed store the new one */