wifi: mac80211: reserve MME tailroom for protected beacons

Beacon protection appends an MME to beacons, but the skb
allocation does not reserve tailroom for it. If the available
tailroom is too small, the crypto path drops the beacon.

Two factors often mask this: the 256-byte TIM reservation is
rarely fully used, and dev_alloc_skb() may round up the
allocation, leaving extra tailroom. Neither guarantees enough
room for the MME.

Reserve enough room for the largest MME.

Fixes: 0a3a84360b ("mac80211: Beacon protection using the new BIGTK (AP)")
Signed-off-by: Chien Wong <m@xv97.com>
Link: https://patch.msgid.link/20261012140738.70178-3-m@xv97.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Chien Wong 2026-10-12 22:07:37 +08:00 committed by Johannes Berg
parent c49f54fd2a
commit 48002331da

View File

@ -5724,7 +5724,8 @@ __ieee80211_beacon_get_ap(struct ieee80211_hw *hw,
skb = dev_alloc_skb(local->tx_headroom + beacon->head_len +
beacon->tail_len + 256 +
local->hw.extra_beacon_tailroom + mbssid_len);
local->hw.extra_beacon_tailroom + mbssid_len +
IEEE80211_ENCRYPT_TAILROOM);
if (!skb)
return NULL;