[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1387358347.4694.2.camel@jlt4.sipsolutions.net>
Date: Wed, 18 Dec 2013 10:19:07 +0100
From: Johannes Berg <johannes@...solutions.net>
To: Joe Perches <joe@...ches.com>
Cc: Jiri Benc <jbenc@...hat.com>,
linux-wireless <linux-wireless@...r.kernel.org>,
netdev <netdev@...r.kernel.org>
Subject: Re: ieee80211_i.h: shouldn't struct ps_data.tim be aligned unsigned
long?
On Wed, 2013-12-18 at 00:16 -0800, Joe Perches wrote:
> Perhaps the
> u8 tim[sizeof...]
> member should be marked
> __aligned(sizeof(unsigned long))
> so that the cast to ulong when bitmap_empty
> is actually forced to be ulong aligned?
yeah, I suppose that's true.
> diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> index ed5bf8b..e5a9c51 100644
> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -245,7 +245,8 @@ struct ps_data {
> /* yes, this looks ugly, but guarantees that we can later use
> * bitmap_empty :)
> * NB: don't touch this bitmap, use sta_info_{set,clear}_tim_bit */
> - u8 tim[sizeof(unsigned long) * BITS_TO_LONGS(IEEE80211_MAX_AID + 1)];
> + u8 tim[sizeof(unsigned long) * BITS_TO_LONGS(IEEE80211_MAX_AID + 1)]
> + __aligned(sizeof(unsigned long));
Care to send a proper patch? Otherwise I'll just re-do it and pick it up
that way ...
johannes
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists