diff options
author | Bruno Randolf <br1@einfach.org> | 2008-07-30 17:20:06 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-22 16:29:50 -0400 |
commit | 9deb1ae572364a37d054d916c5bae858f91a3f9a (patch) | |
tree | 5ec264a7d19694940ae1da97a7aaca32d6499418 /net/mac80211/rx.c | |
parent | b4f28bbb9bf0b2c829ecf97ce2173f204fde4f10 (diff) | |
download | kernel_samsung_smdk4412-9deb1ae572364a37d054d916c5bae858f91a3f9a.zip kernel_samsung_smdk4412-9deb1ae572364a37d054d916c5bae858f91a3f9a.tar.gz kernel_samsung_smdk4412-9deb1ae572364a37d054d916c5bae858f91a3f9a.tar.bz2 |
mac80211: radiotap: assume modulation from rates
use the rates ERP flag to derive CCK or OFDM modulation for the radiotap
header.
(it might be more correct to get this information from the hardware itself, but it
seems safe to assume this in most practical cases.)
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index ad47a61..60e9ea1 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -157,8 +157,11 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, if (status->band == IEEE80211_BAND_5GHZ) *(__le16 *)pos = cpu_to_le16(IEEE80211_CHAN_OFDM | IEEE80211_CHAN_5GHZ); + else if (rate->flags & IEEE80211_RATE_ERP_G) + *(__le16 *)pos = cpu_to_le16(IEEE80211_CHAN_OFDM | + IEEE80211_CHAN_2GHZ); else - *(__le16 *)pos = cpu_to_le16(IEEE80211_CHAN_DYN | + *(__le16 *)pos = cpu_to_le16(IEEE80211_CHAN_CCK | IEEE80211_CHAN_2GHZ); pos += 2; |