mac80211: set beamforming bit in radiotap
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 4 Mar 2014 08:35:25 +0000 (10:35 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 19 Mar 2014 20:29:57 +0000 (21:29 +0100)
Add a bit in rx_status.vht_flags to let the low level driver
notify mac80211 about a beamformed packet. Propagate this
to the radiotap header.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/rx.c

index f6988fe8dfd21b1edc2c031fad47e012ebac99d6..2de7ff42ff3aae4f0e7e8f5eb140d4269853228a 100644 (file)
@@ -877,11 +877,13 @@ enum mac80211_rx_flags {
  * @RX_VHT_FLAG_80MHZ: 80 MHz was used
  * @RX_VHT_FLAG_80P80MHZ: 80+80 MHz was used
  * @RX_VHT_FLAG_160MHZ: 160 MHz was used
+ * @RX_VHT_FLAG_BF: packet was beamformed
  */
 enum mac80211_rx_vht_flags {
        RX_VHT_FLAG_80MHZ               = BIT(0),
        RX_VHT_FLAG_80P80MHZ            = BIT(1),
        RX_VHT_FLAG_160MHZ              = BIT(2),
+       RX_VHT_FLAG_BF                  = BIT(3),
 };
 
 /**
index f3719e66989327790b032f146ef7df4d8c1015ce..ac8322818b282c54decd57437b2d9dae8a81a4af 100644 (file)
@@ -333,6 +333,8 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
                /* in VHT, STBC is binary */
                if (status->flag & RX_FLAG_STBC_MASK)
                        *pos |= IEEE80211_RADIOTAP_VHT_FLAG_STBC;
+               if (status->vht_flag & RX_VHT_FLAG_BF)
+                       *pos |= IEEE80211_RADIOTAP_VHT_FLAG_BEAMFORMED;
                pos++;
                /* bandwidth */
                if (status->vht_flag & RX_VHT_FLAG_80MHZ)