linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: make local->tx_headroom a multiple of 4
@ 2015-07-30 12:14 Felix Fietkau
  2015-08-13  9:17 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2015-07-30 12:14 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes

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(+)

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);
 
-- 
2.2.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: make local->tx_headroom a multiple of 4
  2015-07-30 12:14 [PATCH] mac80211: make local->tx_headroom a multiple of 4 Felix Fietkau
@ 2015-08-13  9:17 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-08-13  9:17 UTC (permalink / raw)
  To: Felix Fietkau, linux-wireless

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-13  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30 12:14 [PATCH] mac80211: make local->tx_headroom a multiple of 4 Felix Fietkau
2015-08-13  9:17 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).