Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH wireless-next] wifi: mac80211_hwsim: reserve headroom for software encryption
@ 2026-09-30  8:47 Felix Fietkau
  0 siblings, 0 replies; only message in thread
From: Felix Fietkau @ 2026-09-30  8:47 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes

mac80211_hwsim accepts CCMP and GCMP keys in mac80211_hwsim_set_key()
and encrypts unicast data frames itself in mac80211_hwsim_tx(), through
ieee80211_encrypt_tx_skb(). It asks mac80211 to reserve tailroom for the
MIC, but not headroom for the CCMP or GCMP header.

Reserve the header as driver headroom.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/wireless/virtual/mac80211_hwsim_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/virtual/mac80211_hwsim_main.c b/drivers/net/wireless/virtual/mac80211_hwsim_main.c
index b9446577ff49..c98c862678a2 100644
--- a/drivers/net/wireless/virtual/mac80211_hwsim_main.c
+++ b/drivers/net/wireless/virtual/mac80211_hwsim_main.c
@@ -5906,6 +5906,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
 
 	hw->queues = 5;
 	hw->offchannel_tx_hw_queue = 4;
+	hw->extra_tx_headroom = IEEE80211_CCMP_HDR_LEN;
 
 	ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
 	ieee80211_hw_set(hw, CHANCTX_STA_CSA);
-- 
2.47.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-30  8:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-30  8:47 [PATCH wireless-next] wifi: mac80211_hwsim: reserve headroom for software encryption Felix Fietkau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox