2009-01-10 09:47:40

by Jouni Malinen

[permalink] [raw]
Subject: [PATCH] mac80211: Fix radiotap header it_present on big endian CPUs

When the IEEE80211_RADIOTAP_RATE flag was moved to be conditional, it
was mistakenly left without cpu_to_le32(). Fix that.

Signed-off-by: Jouni Malinen <[email protected]>


---
net/mac80211/rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- wireless-testing.orig/net/mac80211/rx.c 2009-01-10 11:40:33.000000000 +0200
+++ wireless-testing/net/mac80211/rx.c 2009-01-10 11:41:06.000000000 +0200
@@ -158,7 +158,7 @@ ieee80211_add_rx_radiotap_header(struct
*/
*pos = 0;
} else {
- rthdr->it_present |= (1 << IEEE80211_RADIOTAP_RATE);
+ rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_RATE);
*pos = rate->bitrate / 5;
}
pos++;

--
Jouni Malinen PGP id EFC895FA