aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-28 05:04:26 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-10 14:54:10 -0400
commitded81f6ba934e792e441f20178683608cbc0b5cb (patch)
tree61f464547c5eb15cbb8496a92220a2ceae40cda9 /net/mac80211/iface.c
parent54bcbc695e2ca88e1c8f05a93d38a04ac6b1aa0e (diff)
mac80211: decouple # of netdev queues from HW queues
When we get more hardware queues, we'll still want to only have netdev queues per AC, so set it up in that way. If the hardware doesn't support QoS (by not supporting at least 4 queues) the netdevs get a single queue only (this is no change in behavior as there are no drivers with 2 or 3 queues today.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 401c01f0731e..efa9409865ac 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1133,11 +1133,15 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
1133 struct net_device *ndev; 1133 struct net_device *ndev;
1134 struct ieee80211_sub_if_data *sdata = NULL; 1134 struct ieee80211_sub_if_data *sdata = NULL;
1135 int ret, i; 1135 int ret, i;
1136 int txqs = 1;
1136 1137
1137 ASSERT_RTNL(); 1138 ASSERT_RTNL();
1138 1139
1140 if (local->hw.queues >= IEEE80211_NUM_ACS)
1141 txqs = IEEE80211_NUM_ACS;
1142
1139 ndev = alloc_netdev_mqs(sizeof(*sdata) + local->hw.vif_data_size, 1143 ndev = alloc_netdev_mqs(sizeof(*sdata) + local->hw.vif_data_size,
1140 name, ieee80211_if_setup, local->hw.queues, 1); 1144 name, ieee80211_if_setup, txqs, 1);
1141 if (!ndev) 1145 if (!ndev)
1142 return -ENOMEM; 1146 return -ENOMEM;
1143 dev_net_set(ndev, wiphy_net(local->hw.wiphy)); 1147 dev_net_set(ndev, wiphy_net(local->hw.wiphy));