mac80211: fix bugs in queue handling functions
[deliverable/linux.git] / net / mac80211 / util.c
index cc9f715c7bfc5bce2a8caf90248bddd64b1f07f7..9cd07e1031afcdc686ea3f8d5939cf69b288ef88 100644 (file)
@@ -153,15 +153,15 @@ int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr)
        /* 7.1.3.5a.2 */
        switch (ae) {
        case 0:
-               return 5;
+               return 6;
        case 1:
-               return 11;
+               return 12;
        case 2:
-               return 17;
+               return 18;
        case 3:
-               return 23;
+               return 24;
        default:
-               return 5;
+               return 6;
        }
 }
 
@@ -355,7 +355,7 @@ void ieee80211_start_queues(struct ieee80211_hw *hw)
        struct ieee80211_local *local = hw_to_local(hw);
        int i;
 
-       for (i = 0; i < local->hw.queues; i++)
+       for (i = 0; i < hw->queues + hw->ampdu_queues; i++)
                clear_bit(IEEE80211_LINK_STATE_XOFF, &local->state[i]);
        if (!ieee80211_qdisc_installed(local->mdev))
                netif_start_queue(local->mdev);
@@ -366,7 +366,7 @@ void ieee80211_stop_queues(struct ieee80211_hw *hw)
 {
        int i;
 
-       for (i = 0; i < hw->queues; i++)
+       for (i = 0; i < hw->queues + hw->ampdu_queues; i++)
                ieee80211_stop_queue(hw, i);
 }
 EXPORT_SYMBOL(ieee80211_stop_queues);
@@ -375,7 +375,7 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw)
 {
        int i;
 
-       for (i = 0; i < hw->queues; i++)
+       for (i = 0; i < hw->queues + hw->ampdu_queues; i++)
                ieee80211_wake_queue(hw, i);
 }
 EXPORT_SYMBOL(ieee80211_wake_queues);
This page took 0.037089 seconds and 5 git commands to generate.