]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mac80211: only allocate one queue when using iTXQs
authorJohannes Berg <johannes.berg@intel.com>
Mon, 8 Apr 2019 12:39:11 +0000 (14:39 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 26 Apr 2019 11:02:11 +0000 (13:02 +0200)
There's no need to allocate than one queue in the iTXQs case
now that we no longer use ndo_select_queue to assign the AC.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/iface.c

index 6e1b031535d5d3a391f9db6d6964f29c7b288935..94459b2b3d2a4a3a3cee06c11df174e0aa612f45 100644 (file)
@@ -1763,13 +1763,13 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
                        txq_size += sizeof(struct txq_info) +
                                    local->hw.txq_data_size;
 
-               if (local->ops->wake_tx_queue)
+               if (local->ops->wake_tx_queue) {
                        if_setup = ieee80211_if_setup_no_queue;
-               else
+               } else {
                        if_setup = ieee80211_if_setup;
-
-               if (local->hw.queues >= IEEE80211_NUM_ACS)
-                       txqs = IEEE80211_NUM_ACS;
+                       if (local->hw.queues >= IEEE80211_NUM_ACS)
+                               txqs = IEEE80211_NUM_ACS;
+               }
 
                ndev = alloc_netdev_mqs(size + txq_size,
                                        name, name_assign_type,