Linux wireless drivers development
 help / color / mirror / Atom feed
From: Chien Wong <m@xv97.com>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, jouni.malinen@oss.qualcomm.com
Subject: [PATCH v2 2/2] wifi: mac80211: reserve MME tailroom for protected beacons
Date: Mon, 12 Oct 2026 22:07:37 +0800	[thread overview]
Message-ID: <20261012140738.70178-3-m@xv97.com> (raw)
In-Reply-To: <20261012140738.70178-1-m@xv97.com>

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: 0a3a84360b37 ("mac80211: Beacon protection using the new BIGTK (AP)")
Signed-off-by: Chien Wong <m@xv97.com>
---
 net/mac80211/tx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index d51f810dd2c5..6aad90a55722 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -5673,7 +5673,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;
 
-- 
2.56.0


      parent reply	other threads:[~2026-10-12 14:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 14:07 [PATCH v2 0/2] wifi: mac80211: reserve MME tailroom Chien Wong
2026-10-12 14:07 ` [PATCH v2 1/2] wifi: mac80211: fix encryption tailroom Chien Wong
2026-10-12 14:07 ` Chien Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261012140738.70178-3-m@xv97.com \
    --to=m@xv97.com \
    --cc=johannes@sipsolutions.net \
    --cc=jouni.malinen@oss.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox