Commit 93cc712a authored by Johannes Berg's avatar Johannes Berg Committed by Luca Coelho

iwlwifi: mvm: properly decode HE GI duration

The GI duration depends on the frame type in some cases,
take that into account when decoding for radiotap.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent de8da230
......@@ -1150,25 +1150,35 @@ static void iwl_mvm_rx_he(struct iwl_mvm *mvm, struct sk_buff *skb,
switch ((rate_n_flags & RATE_MCS_HE_GI_LTF_MSK) >>
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_TRIG)
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_1_6;
else
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;
if (he_type == RATE_MCS_HE_TYPE_TRIG)
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_1_6;
else
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)
if (he_type == RATE_MCS_HE_TYPE_TRIG) {
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_3_2;
ltf = IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_4X;
else
} else {
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_1_6;
ltf = IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_2X;
}
break;
case 3:
if (rate_n_flags & RATE_MCS_SGI_MSK)
if ((he_type == RATE_MCS_HE_TYPE_SU ||
he_type == RATE_MCS_HE_TYPE_EXT_SU) &&
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment