linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211 hwsim: fix endianness bug
@ 2008-07-10  9:56 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2008-07-10  9:56 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, Jouni Malinen

Radiotap is entirely little endian. Found with sparse.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 drivers/net/wireless/mac80211_hwsim.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- everything.orig/drivers/net/wireless/mac80211_hwsim.c	2008-07-10 11:55:14.000000000 +0200
+++ everything/drivers/net/wireless/mac80211_hwsim.c	2008-07-10 11:55:16.000000000 +0200
@@ -126,7 +126,7 @@ static void mac80211_hwsim_monitor_rx(st
 					  (1 << IEEE80211_RADIOTAP_CHANNEL));
 	hdr->rt_flags = 0;
 	hdr->rt_rate = txrate->bitrate / 5;
-	hdr->rt_channel = data->channel->center_freq;
+	hdr->rt_channel = cpu_to_le16(data->channel->center_freq);
 	flags = IEEE80211_CHAN_2GHZ;
 	if (txrate->flags & IEEE80211_RATE_ERP_G)
 		flags |= IEEE80211_CHAN_OFDM;



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-10  9:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-10  9:56 [PATCH] mac80211 hwsim: fix endianness 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;
as well as URLs for NNTP newsgroup(s).