iwlwifi: mvm: put LTF symbol size into HE radiotap

I evidently completely confused "number of LTF symbols" and "LTF size".
Radiotap was reporting the former, while I thought it was the latter,
and we really need both.

Add the LTF symbol size into the newly defined field in radiotap.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
Johannes Berg 2018-05-02 11:20:00 +02:00 committed by Luca Coelho
parent dabf984438
commit de8da23060
1 changed files with 13 additions and 1 deletions
drivers/net/wireless/intel/iwlwifi/mvm

View File

@ -925,7 +925,7 @@ static void iwl_mvm_rx_he(struct iwl_mvm *mvm, struct sk_buff *skb,
struct ieee80211_radiotap_he *he = NULL;
struct ieee80211_radiotap_he_mu *he_mu = NULL;
u32 he_type = 0xffffffff;
u8 stbc;
u8 stbc, ltf;
static const struct ieee80211_radiotap_he known = {
.data1 = cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_DATA_MCS_KNOWN |
@ -1151,21 +1151,33 @@ static void iwl_mvm_rx_he(struct iwl_mvm *mvm, struct sk_buff *skb,
RATE_MCS_HE_GI_LTF_POS) {
case 0:
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_0_8;
if (he_type == RATE_MCS_HE_TYPE_MU)
ltf = IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_4X;
else
ltf = IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_1X;
break;
case 1:
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_0_8;
ltf = IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_2X;
break;
case 2:
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_1_6;
if (he_type == RATE_MCS_HE_TYPE_TRIG)
ltf = IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_4X;
else
ltf = IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_2X;
break;
case 3:
if (rate_n_flags & RATE_MCS_SGI_MSK)
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_0_8;
else
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_3_2;
ltf = IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_4X;
break;
}
he->data5 |= le16_encode_bits(ltf, IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE);
switch (he_type) {
case RATE_MCS_HE_TYPE_SU: {
u16 val;