Skip to contentSkip to conversation

wifi: mac80211_hwsim: reserve headroom for software encryption

PATCH New Felix Fietkau 1 participant 1 message Sep 30

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: mac80211_hwsim: reserve headroom for software encryption

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.

---
 drivers/net/wireless/virtual/mac80211_hwsim_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/virtual/mac80211_hwsim_main.c +1 -0
index b9446577ff49..c98c862678a2 100644
@@ -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);
Signature · 1 line
2.47.3