* [PATCH 2.6.30] mac80211: fix alignment calculation bug
@ 2009-04-20 23:36 Johannes Berg
0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2009-04-20 23:36 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
When checking whether or not a given frame needs to be
moved to be properly aligned to a 4-byte boundary, we
use & 4 which wasn't intended, this code should check
the lowest two bits.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- wireless-testing.orig/net/mac80211/rx.c 2009-04-21 01:32:59.000000000 +0200
+++ wireless-testing/net/mac80211/rx.c 2009-04-21 01:33:22.000000000 +0200
@@ -1397,7 +1397,7 @@ ieee80211_deliver_skb(struct ieee80211_r
* mac80211. That also explains the __skb_push()
* below.
*/
- align = (unsigned long)skb->data & 4;
+ align = (unsigned long)skb->data & 3;
if (align) {
if (WARN_ON(skb_headroom(skb) < 3)) {
dev_kfree_skb(skb);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-20 23:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-20 23:36 [PATCH 2.6.30] mac80211: fix alignment calculation bug Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox