OSDN Git Service

iwlwifi: mvm: fix mac80211 queue tracking
authorJohannes Berg <johannes.berg@intel.com>
Mon, 19 Jun 2017 20:31:56 +0000 (22:31 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 29 Jun 2017 17:37:43 +0000 (20:37 +0300)
commit37e474acc9b6f645d92d8dc35014ff1baed3b1bc
tree7d6ca8c358c093a0fd16d9517e5347d29e037197
parent275896ab5fbffcbe9d148ec054efe1af3fb4a29d
iwlwifi: mvm: fix mac80211 queue tracking

In the driver, we track which hardware queue is associated with
which mac80211 "hw_queue", in order to be able to stop and wake
it. When moving these bitmaps out of the queue_info structures,
the type of the bitmap was erroneously changed from u32 to u8,
presumably in order to save memory.

Turns out that u32 isn't needed, because the highest queue we
can ever tell mac80211 is always < 16, but a u16 definitely is
needed, queues >=8 do happen.

While at it, throw a BUILD_BUG_ON() into the place where we set
the limit (mvm->first_agg_queue) and a warning when it actually
gets put into the bitmap.

The consequence of this bug is that full HW queues associated
with such a too-high mac80211 number never stop higher layer
queues when full, and thus would simply drop all packets that
couldn't be enqueued to the hardware queue.

Fixes: 34e10860ae8d ("iwlwifi: mvm: remove references to queue_info in new TX path")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/ops.c
drivers/net/wireless/intel/iwlwifi/mvm/utils.c