aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2008-09-05 18:37:25 +0200
committerLuis R. Rodriguez <lrodriguez@atheros.com>2008-09-05 10:53:42 -0700
commit884c73f54a2d10a49aa166daf0daa76b4b8d60d5 (patch)
tree8775a374fd4e218023f89bb0226f56a693154a87
parent6d74faaf9ff4d0e2c176da9a985d4dbb7a32caa9 (diff)
downloadcompat-wireless-2.6-old-884c73f54a2d10a49aa166daf0daa76b4b8d60d5.tar.gz
add rx status flag for short preamble
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r--include/net/mac80211.h2
-rw-r--r--net/mac80211/rx.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index f1bda8e..5043123 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -385,6 +385,7 @@ static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping)
* @RX_FLAG_TSFT: The timestamp passed in the RX status (@mactime field)
* is valid. This is useful in monitor mode and necessary for beacon frames
* to enable IBSS merging.
+ * @RX_FLAG_SHORTPRE: Short preamble was used for this frame
*/
enum mac80211_rx_flags {
RX_FLAG_MMIC_ERROR = 1<<0,
@@ -395,6 +396,7 @@ enum mac80211_rx_flags {
RX_FLAG_FAILED_FCS_CRC = 1<<5,
RX_FLAG_FAILED_PLCP_CRC = 1<<6,
RX_FLAG_TSFT = 1<<7,
+ RX_FLAG_SHORTPRE = 1<<8
};
/**
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index a736550..ab0243c 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -143,6 +143,8 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
/* IEEE80211_RADIOTAP_FLAGS */
if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS)
*pos |= IEEE80211_RADIOTAP_F_FCS;
+ if (status->flag & RX_FLAG_SHORTPRE)
+ *pos |= IEEE80211_RADIOTAP_F_SHORTPRE;
pos++;
/* IEEE80211_RADIOTAP_RATE */
@@ -155,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;