iwlwifi: mvm: fix HE radiotap data4 for HE-TB PPDUs
authorJohannes Berg <johannes.berg@intel.com>
Fri, 11 Jan 2019 09:58:37 +0000 (10:58 +0100)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 14 Feb 2019 09:29:49 +0000 (11:29 +0200)
In HE-TB PPDUs (labeled HE-TRIG in radiotap), we were overwriting
the data4.spatial_reuse_1 field with the spatial reuse data that
the firmware gives us for SU/MU PPDUs. Fix that by moving that,
we are already setting the data4.spatial_reuse_{1,2,3,4} fields
in the TB PPDU case.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: 69f3ca8ed33d ("iwlwifi: mvm: show more HE radiotap data for TB PPDUs")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c

index 557a0b5a08ac4648861d71d26dcb6eb1acbf40ca..b0a8d910c5c40253214dcbb194f8321453e37d2d 100644 (file)
@@ -1093,7 +1093,6 @@ static void iwl_mvm_decode_he_phy_data(struct iwl_mvm *mvm,
        case IWL_RX_PHY_INFO_TYPE_HE_TB:
                /* HE common */
                he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_LDPC_XSYMSEG_KNOWN |
-                                        IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE_KNOWN |
                                         IEEE80211_RADIOTAP_HE_DATA1_DOPPLER_KNOWN |
                                         IEEE80211_RADIOTAP_HE_DATA1_BSS_COLOR_KNOWN);
                he->data2 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRE_FEC_PAD_KNOWN |
@@ -1113,9 +1112,6 @@ static void iwl_mvm_decode_he_phy_data(struct iwl_mvm *mvm,
                he->data3 |= le16_encode_bits(le32_get_bits(phy_data->d0,
                                                            IWL_RX_PHY_DATA0_HE_LDPC_EXT_SYM),
                                              IEEE80211_RADIOTAP_HE_DATA3_LDPC_XSYMSEG);
-               he->data4 |= le16_encode_bits(le32_get_bits(phy_data->d0,
-                                                           IWL_RX_PHY_DATA0_HE_SPATIAL_REUSE_MASK),
-                                             IEEE80211_RADIOTAP_HE_DATA4_SU_MU_SPTL_REUSE);
                he->data5 |= le16_encode_bits(le32_get_bits(phy_data->d0,
                                                            IWL_RX_PHY_DATA0_HE_PRE_FEC_PAD_MASK),
                                              IEEE80211_RADIOTAP_HE_DATA5_PRE_FEC_PAD);
@@ -1134,6 +1130,20 @@ static void iwl_mvm_decode_he_phy_data(struct iwl_mvm *mvm,
                break;
        }
 
+       switch (phy_data->info_type) {
+       case IWL_RX_PHY_INFO_TYPE_HE_MU_EXT:
+       case IWL_RX_PHY_INFO_TYPE_HE_MU:
+       case IWL_RX_PHY_INFO_TYPE_HE_SU:
+               he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE_KNOWN);
+               he->data4 |= le16_encode_bits(le32_get_bits(phy_data->d0,
+                                                           IWL_RX_PHY_DATA0_HE_SPATIAL_REUSE_MASK),
+                                             IEEE80211_RADIOTAP_HE_DATA4_SU_MU_SPTL_REUSE);
+               break;
+       default:
+               /* nothing here */
+               break;
+       }
+
        switch (phy_data->info_type) {
        case IWL_RX_PHY_INFO_TYPE_HE_MU_EXT:
                he_mu->flags1 |=