linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: use 16 bit alignment for the if_ibss bssid field
@ 2012-03-01 10:23 Felix Fietkau
  2012-03-01 10:24 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2012-03-01 10:23 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, johannes

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>
---
 net/mac80211/ieee80211_i.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index cee0c74..c413058 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -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;
-- 
1.7.3.2


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

* Re: [PATCH] mac80211: use 16 bit alignment for the if_ibss bssid field
  2012-03-01 10:23 [PATCH] mac80211: use 16 bit alignment for the if_ibss bssid field Felix Fietkau
@ 2012-03-01 10:24 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2012-03-01 10:24 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, linville

On Thu, 2012-03-01 at 11:23 +0100, Felix Fietkau wrote:
> 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>

> ---
>  net/mac80211/ieee80211_i.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> index cee0c74..c413058 100644
> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -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;



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

end of thread, other threads:[~2012-03-01 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 10:23 [PATCH] mac80211: use 16 bit alignment for the if_ibss bssid field Felix Fietkau
2012-03-01 10:24 ` 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).