diff mbox

mac80211: make local->tx_headroom a multiple of 4

Message ID 1438258487-74594-1-git-send-email-nbd@openwrt.org (mailing list archive)
State Rejected
Delegated to: Johannes Berg
Headers show

Commit Message

Felix Fietkau July 30, 2015, 12:14 p.m. UTC
This ensures that mac80211 generated management frames and beacons are
aligned before being passed to the driver

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 net/mac80211/main.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Johannes Berg Aug. 13, 2015, 9:17 a.m. UTC | #1
On Thu, 2015-07-30 at 14:14 +0200, Felix Fietkau wrote:
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index ff79a13..e8b9224 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -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);