mac80211: use more bits for ack_frame_id
authorJohannes Berg <johannes.berg@intel.com>
Wed, 15 Jan 2020 11:25:50 +0000 (12:25 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 7 Feb 2020 10:32:27 +0000 (11:32 +0100)
commitf2b18baca9539c6a3116d48b70972c7a2ba5d766
tree35a61cd2351716f3c4c5301a4bb95c295a0072ac
parentdf373702bc0f8f2d83980ea441e71639fc1efcf8
mac80211: use more bits for ack_frame_id

It turns out that this wasn't a good idea, I hit a test failure in
hwsim due to this. That particular failure was easily worked around,
but it raised questions: if an AP needs to, for example, send action
frames to each connected station, the current limit is nowhere near
enough (especially if those stations are sleeping and the frames are
queued for a while.)

Shuffle around some bits to make more room for ack_frame_id to allow
up to 8192 queued up frames, that's enough for queueing 4 frames to
each connected station, even at the maximum of 2007 stations on a
single AP.

We take the bits from band (which currently only 2 but I leave 3 in
case we add another band) and from the hw_queue, which can only need
4 since it has a limit of 16 queues.

Fixes: 6912daed05e1 ("mac80211: Shrink the size of ack_frame_id to make room for tx_time_est")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20200115122549.b9a4ef9f4980.Ied52ed90150220b83a280009c590b65d125d087c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/cfg.c
net/mac80211/tx.c