Commit [5b2b11] v20120515  Maximize  Restore  History

common: Fix hw-queue check for MAC80211_VERSION >= (3,4,0)

Latest wireless-testing (22a101d2) introduced a check
"vif.hw_queue[i] >= n_queues" in ieee80211_check_queues(), which is
related to QoS/AC support.

This checks then fails on ifup with following warning and declines the
setup of the interface:
[ 737.117785] WARNING: at net/mac80211/iface.c:162 ieee80211_check_queues+0x76/0x103 mac80211

Currently the driver only supports one hw-queue and no QoS. Normally this
is also configured accordingly via ieee80211_hw->queues=1 and

Anyhow mac80211 setups by default a default mapping in iface.c/ieee80211_set_default_queues(),
assuming 4 available queues (although only one is configured).

This finally leads to the failure condition checked in

Two possibilities were checked:

1) Configure ieee80211_hw->queues=4

Seems to works, but doesn't actually reflect reality

2) Modify vif.hw_queue[i] mapping to refer all ACs to queue 0,
when vif is added via acx_op_add_interface()

Doesn't work and crashes subsequently with an Oops
May 15 18:55:05 lapix kernel: [ 2454.220023] [<c1207878>] ? __netif_schedule+0xd/0x18
May 15 18:55:05 lapix kernel: [ 2454.220023] [<f8353731>] ? ieee80211_propagate_queue_wake+0x9f/0xc0 [mac80211]

Therefore go for 2) guarded by an #if MAC80211_VERSION >= (3,4,0)

Signed-off-by: Oliver Winker <>

Oliver Winker Oliver Winker 2012-05-15

changed mem.c
changed pci.c
changed usb.c
mem.c Diff Switch to side-by-side view
pci.c Diff Switch to side-by-side view
usb.c Diff Switch to side-by-side view

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks