mac80211 hwsim: fix endianness bug

Radiotap is entirely little endian. Found with sparse.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Johannes Berg 2008-07-10 11:56:33 +02:00 коммит произвёл John W. Linville
Родитель f434b2d111
Коммит df70b4aca5
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -126,7 +126,7 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw,
(1 << IEEE80211_RADIOTAP_CHANNEL)); (1 << IEEE80211_RADIOTAP_CHANNEL));
hdr->rt_flags = 0; hdr->rt_flags = 0;
hdr->rt_rate = txrate->bitrate / 5; 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; flags = IEEE80211_CHAN_2GHZ;
if (txrate->flags & IEEE80211_RATE_ERP_G) if (txrate->flags & IEEE80211_RATE_ERP_G)
flags |= IEEE80211_CHAN_OFDM; flags |= IEEE80211_CHAN_OFDM;