From bb3e10fb585f1911fedf5fcc4411dcf8d8d63f54 Mon Sep 17 00:00:00 2001 From: Luciano Coelho Date: Thu, 12 Apr 2012 16:09:49 +0300 Subject: 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 Signed-off-by: John W. Linville --- net/mac80211/iface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'net') 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) return -EINVAL; } - if (sdata->vif.type != NL80211_IFTYPE_AP) { + if ((sdata->vif.type != NL80211_IFTYPE_AP) || + !(sdata->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL)) { sdata->vif.cab_queue = IEEE80211_INVAL_HW_QUEUE; return 0; } -- cgit v1.2.1