diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-12-02 15:44:03 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-12-02 15:44:03 -0500 |
commit | d7a4858c0fde8383f7aa494eda0fba6bef3f2fec (patch) | |
tree | 2cbf6915ea069ada4e3e1bca0b91b12e06500681 /net/mac80211/rx.c | |
parent | ba5736a5e9ac20c378ae4179e8a0ed3cc4b44351 (diff) | |
parent | 9995ffe5f5fdddcc73e4465cc3f8b38714df8108 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/libertas/cfg.c
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 1e231e95f46..daf5cde65b3 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -141,8 +141,9 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, pos++; /* IEEE80211_RADIOTAP_RATE */ - if (status->flag & RX_FLAG_HT) { + if (!rate || status->flag & RX_FLAG_HT) { /* + * Without rate information don't add it. If we have, * MCS information is a separate field in radiotap, * added below. The byte here is needed as padding * for the channel though, so initialise it to 0. @@ -163,12 +164,14 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, else if (status->flag & RX_FLAG_HT) put_unaligned_le16(IEEE80211_CHAN_DYN | IEEE80211_CHAN_2GHZ, pos); - else if (rate->flags & IEEE80211_RATE_ERP_G) + else if (rate && rate->flags & IEEE80211_RATE_ERP_G) put_unaligned_le16(IEEE80211_CHAN_OFDM | IEEE80211_CHAN_2GHZ, pos); - else + else if (rate) put_unaligned_le16(IEEE80211_CHAN_CCK | IEEE80211_CHAN_2GHZ, pos); + else + put_unaligned_le16(IEEE80211_CHAN_2GHZ, pos); pos += 2; /* IEEE80211_RADIOTAP_DBM_ANTSIGNAL */ |