Commit de8da230 authored by Johannes Berg's avatar Johannes Berg Committed by Luca Coelho

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent dabf9844
...@@ -925,7 +925,7 @@ static void iwl_mvm_rx_he(struct iwl_mvm *mvm, struct sk_buff *skb, ...@@ -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 *he = NULL;
struct ieee80211_radiotap_he_mu *he_mu = NULL; struct ieee80211_radiotap_he_mu *he_mu = NULL;
u32 he_type = 0xffffffff; u32 he_type = 0xffffffff;
u8 stbc; u8 stbc, ltf;
static const struct ieee80211_radiotap_he known = { static const struct ieee80211_radiotap_he known = {
.data1 = cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_DATA_MCS_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, ...@@ -1151,21 +1151,33 @@ static void iwl_mvm_rx_he(struct iwl_mvm *mvm, struct sk_buff *skb,
RATE_MCS_HE_GI_LTF_POS) { RATE_MCS_HE_GI_LTF_POS) {
case 0: case 0:
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_0_8; 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; break;
case 1: case 1:
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_0_8; rx_status->he_gi = NL80211_RATE_INFO_HE_GI_0_8;
ltf = IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_2X;
break; break;
case 2: case 2:
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_1_6; 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; break;
case 3: case 3:
if (rate_n_flags & RATE_MCS_SGI_MSK) if (rate_n_flags & RATE_MCS_SGI_MSK)
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_0_8; rx_status->he_gi = NL80211_RATE_INFO_HE_GI_0_8;
else else
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_3_2; rx_status->he_gi = NL80211_RATE_INFO_HE_GI_3_2;
ltf = IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_4X;
break; break;
} }
he->data5 |= le16_encode_bits(ltf, IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE);
switch (he_type) { switch (he_type) {
case RATE_MCS_HE_TYPE_SU: { case RATE_MCS_HE_TYPE_SU: {
u16 val; u16 val;
......
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