Skip to content

Commit

Permalink
mac80211: use 16 bit alignment for the if_ibss bssid field
Browse files Browse the repository at this point in the history
Several MAC address comparison functions assume 16 bit alignment for pointers
passed to them. Since the addition of the control_port field, alignment
for the IBSS bssid was off by one, causing a severe performance hit on
architectures without efficient unaligned access (e.g. MIPS).

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Mar 5, 2012
1 parent 380aeef commit 4d196e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ struct ieee80211_if_ibss {

bool control_port;

u8 bssid[ETH_ALEN];
u8 bssid[ETH_ALEN] __aligned(2);
u8 ssid[IEEE80211_MAX_SSID_LEN];
u8 ssid_len, ie_len;
u8 *ie;
Expand Down

0 comments on commit 4d196e4

Please sign in to comment.