From: Johannes Berg Date: Thu, 10 Jul 2008 09:56:33 +0000 (+0200) Subject: mac80211 hwsim: fix endianness bug X-Git-Tag: v2.6.27-rc1~969^2~159^2~17 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df70b4aca5ef8a154a32ecbdd3c322d6d41a0d33;p=linux-2.6 mac80211 hwsim: fix endianness bug Radiotap is entirely little endian. Found with sparse. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 5d30c57e39..913dc9fe08 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -126,7 +126,7 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw, (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;