e955cb3a25a3d1240562102e75c45810c233d56b
[openwrt/staging/mans0n.git] /
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Fri, 9 Feb 2018 19:46:54 +0100
3 Subject: [PATCH] mac80211: round IEEE80211_TX_STATUS_HEADROOM up to multiple
4 of 4
5
6 This ensures that mac80211 allocated management frames are properly
7 aligned, which makes copying them more efficient.
8 For instance, mt76 uses iowrite32_copy to copy beacon frames to beacon
9 template memory on the chip.
10 Misaligned 32-bit accesses cause CPU exceptions on MIPS and should be
11 avoided.
12
13 Signed-off-by: Felix Fietkau <nbd@nbd.name>
14 ---
15
16 --- a/include/net/mac80211.h
17 +++ b/include/net/mac80211.h
18 @@ -4145,7 +4145,7 @@ void ieee80211_sta_uapsd_trigger(struct
19 * The TX headroom reserved by mac80211 for its own tx_status functions.
20 * This is enough for the radiotap header.
21 */
22 -#define IEEE80211_TX_STATUS_HEADROOM 14
23 +#define IEEE80211_TX_STATUS_HEADROOM ALIGN(14, 4)
24
25 /**
26 * ieee80211_sta_set_buffered - inform mac80211 about driver-buffered frames