Skip to content

Commit

Permalink
mac80211: check IEEE80211_HW_QUEUE_CONTROL in ieee80211_check_queues()
Browse files Browse the repository at this point in the history
Commit 3a25a8c (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>
  • Loading branch information
Luciano Coelho authored and John W. Linville committed Apr 16, 2012
1 parent 8e8b41f commit bb3e10f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bb3e10f

Please sign in to comment.