Skip to contentSkip to conversation

mac80211: make local->tx_headroom a multiple of 4

PATCH In review Felix Fietkau 2 participants 2 messages Jul 30, 2015 – Aug 13, 2015 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: make local->tx_headroom a multiple of 4

This ensures that mac80211 generated management frames and beacons are aligned before being passed to the driver

---
 net/mac80211/main.c | 1 +
 1 file changed, 1 insertion(+)
net/mac80211/main.c +1 -0
index ff79a13..e8b9224 100644
@@ -1034,6 +1034,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 	 */
 	local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom,
 				   IEEE80211_TX_STATUS_HEADROOM);
+	local->tx_headroom = ALIGN(local->tx_headroom, 4);
 
 	debugfs_hw_add(local);
 
Signature · 1 line
2.2.2
maintainer
#1 lore raw
Quoted 3 lines · Felix Fietkau

This ensures that mac80211 generated management frames and beacons are aligned before being passed to the driver

I'm not convinced this is appropriate. Drivers may or may not require alignment, so I don't really see why we should in general enforce that? Having less headroom requirement is better in general.

johannes