summaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-28 11:04:25 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-10 14:54:10 -0400
commit54bcbc695e2ca88e1c8f05a93d38a04ac6b1aa0e (patch)
tree9de43e51ce2195f5a81fa75770417c584ef50254 /net/mac80211/cfg.c
parenta3304b0a17495183a2270d4a25978795226597a4 (diff)
downloadlinux-54bcbc695e2ca88e1c8f05a93d38a04ac6b1aa0e.tar.gz
linux-54bcbc695e2ca88e1c8f05a93d38a04ac6b1aa0e.tar.bz2
linux-54bcbc695e2ca88e1c8f05a93d38a04ac6b1aa0e.zip
mac80211: refuse TX queue configuration on non-QoS HW
Drivers that don't support QoS also don't support setting up their ACs, catch that early. While at it, remove the input check since cfg80211 does it now. Also fix up the restart code to not try to set up the queues in this case. Finally also change the tx_conf array to have IEEE80211_NUM_ACS entries instead of # of queues since that's what it really needs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index ef40db5ab3c7..12226b7743c6 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1437,6 +1437,9 @@ static int ieee80211_set_txq_params(struct wiphy *wiphy,
if (!local->ops->conf_tx)
return -EOPNOTSUPP;
+ if (local->hw.queues < IEEE80211_NUM_ACS)
+ return -EOPNOTSUPP;
+
memset(&p, 0, sizeof(p));
p.aifs = params->aifs;
p.cw_max = params->cwmax;
@@ -1449,9 +1452,6 @@ static int ieee80211_set_txq_params(struct wiphy *wiphy,
*/
p.uapsd = false;
- if (params->ac >= local->hw.queues)
- return -EINVAL;
-
sdata->tx_conf[params->ac] = p;
if (drv_conf_tx(local, sdata, params->ac, &p)) {
wiphy_debug(local->hw.wiphy,