diff options
author | Luciano Coelho <coelho@ti.com> | 2012-04-12 09:09:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-16 14:16:58 -0400 |
commit | bb3e10fb585f1911fedf5fcc4411dcf8d8d63f54 (patch) | |
tree | 84cba10f31d122cf986537c6d8cacf21399dba6c /net/mac80211/iface.c | |
parent | 8e8b41f9d8c8e63fc92f899ace8da91a490ac573 (diff) |
mac80211: check IEEE80211_HW_QUEUE_CONTROL in ieee80211_check_queues()
Commit 3a25a8c8 (mac80211: add improved HW queue control) introduced a
bug when running in AP mode without the IEEE80211_HW_QUEUE_CONTROL
flag set. The ieee80211_check_queues() function always returns
-EINVAL, preventing AP mode from starting. To fix this, check whether
this flag is set before checking if cab_queue is set properly.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 6e85faed053d..23d1da376eb3 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -163,7 +163,8 @@ static int ieee80211_check_queues(struct ieee80211_sub_if_data *sdata) | |||
163 | return -EINVAL; | 163 | return -EINVAL; |
164 | } | 164 | } |
165 | 165 | ||
166 | if (sdata->vif.type != NL80211_IFTYPE_AP) { | 166 | if ((sdata->vif.type != NL80211_IFTYPE_AP) || |
167 | !(sdata->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL)) { | ||
167 | sdata->vif.cab_queue = IEEE80211_INVAL_HW_QUEUE; | 168 | sdata->vif.cab_queue = IEEE80211_INVAL_HW_QUEUE; |
168 | return 0; | 169 | return 0; |
169 | } | 170 | } |