|
|
deb259 |
From 1eebf4ab32c4f817b1fa5fadbec1445c5dec2fb9 Mon Sep 17 00:00:00 2001
|
|
|
deb259 |
From: Eugene Syromiatnikov <esyr@redhat.com>
|
|
|
deb259 |
Date: Fri, 6 Sep 2019 01:14:17 +0200
|
|
|
deb259 |
Subject: [PATCH 41/43] Revert "iwlwifi: mvm: add radiotap data for HE"
|
|
|
deb259 |
|
|
|
deb259 |
This reverts commit e5721e3f770f0ca527c6232c7d19e8cabd1f79b8.
|
|
|
deb259 |
---
|
|
|
deb259 |
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 155 +-------------------------
|
|
|
deb259 |
1 file changed, 4 insertions(+), 151 deletions(-)
|
|
|
deb259 |
|
|
|
deb259 |
Index: src/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
|
|
|
deb259 |
===================================================================
|
|
|
deb259 |
--- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c 2019-09-06 01:25:47.254269638 +0200
|
|
|
deb259 |
+++ src/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c 2019-09-06 01:25:47.447267176 +0200
|
|
|
deb259 |
@@ -916,8 +916,6 @@
|
|
|
deb259 |
struct ieee80211_sta *sta = NULL;
|
|
|
deb259 |
struct sk_buff *skb;
|
|
|
deb259 |
u8 crypt_len = 0;
|
|
|
deb259 |
- struct ieee80211_radiotap_he *he = NULL;
|
|
|
deb259 |
- struct ieee80211_radiotap_he_mu *he_mu = NULL;
|
|
|
deb259 |
u32 he_type = 0xffffffff;
|
|
|
deb259 |
/* this is invalid e.g. because puncture type doesn't allow 0b11 */
|
|
|
deb259 |
#define HE_PHY_DATA_INVAL ((u64)-1)
|
|
|
deb259 |
@@ -949,43 +947,10 @@
|
|
|
deb259 |
rx_status = IEEE80211_SKB_RXCB(skb);
|
|
|
deb259 |
|
|
|
deb259 |
if (rate_n_flags & RATE_MCS_HE_MSK) {
|
|
|
deb259 |
- static const struct ieee80211_radiotap_he known = {
|
|
|
deb259 |
- .data1 = cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_DATA_MCS_KNOWN |
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_DATA1_DATA_DCM_KNOWN |
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_DATA1_STBC_KNOWN |
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_DATA1_CODING_KNOWN),
|
|
|
deb259 |
- .data2 = cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_GI_KNOWN |
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_DATA2_TXBF_KNOWN),
|
|
|
deb259 |
- };
|
|
|
deb259 |
- static const struct ieee80211_radiotap_he_mu mu_known = {
|
|
|
deb259 |
- .flags1 = cpu_to_le16(IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_MCS_KNOWN |
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_DCM_KNOWN |
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_SYMS_USERS_KNOWN |
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_COMP_KNOWN),
|
|
|
deb259 |
- .flags2 = cpu_to_le16(IEEE80211_RADIOTAP_HE_MU_FLAGS2_PUNC_FROM_SIG_A_BW_KNOWN),
|
|
|
deb259 |
- };
|
|
|
deb259 |
- unsigned int radiotap_len = 0;
|
|
|
deb259 |
-
|
|
|
deb259 |
- he = skb_put_data(skb, &known, sizeof(known));
|
|
|
deb259 |
- radiotap_len += sizeof(known);
|
|
|
deb259 |
- rx_status->flag |= RX_FLAG_RADIOTAP_HE;
|
|
|
deb259 |
-
|
|
|
deb259 |
- he_type = rate_n_flags & RATE_MCS_HE_TYPE_MSK;
|
|
|
deb259 |
-
|
|
|
deb259 |
- if (phy_info & IWL_RX_MPDU_PHY_TSF_OVERLOAD) {
|
|
|
deb259 |
+ if (phy_info & IWL_RX_MPDU_PHY_TSF_OVERLOAD)
|
|
|
deb259 |
he_phy_data =
|
|
|
deb259 |
le64_to_cpu(desc->he_phy_data);
|
|
|
deb259 |
-
|
|
|
deb259 |
- if (he_type == RATE_MCS_HE_TYPE_MU) {
|
|
|
deb259 |
- he_mu = skb_put_data(skb, &mu_known,
|
|
|
deb259 |
- sizeof(mu_known));
|
|
|
deb259 |
- radiotap_len += sizeof(mu_known);
|
|
|
deb259 |
- rx_status->flag |= RX_FLAG_RADIOTAP_HE_MU;
|
|
|
deb259 |
- }
|
|
|
deb259 |
- }
|
|
|
deb259 |
-
|
|
|
deb259 |
- /* temporarily hide the radiotap data */
|
|
|
deb259 |
- __skb_pull(skb, radiotap_len);
|
|
|
deb259 |
+ he_type = rate_n_flags & RATE_MCS_HE_TYPE_MSK;
|
|
|
deb259 |
}
|
|
|
deb259 |
|
|
|
deb259 |
if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, phy_info, desc,
|
|
|
deb259 |
@@ -1015,13 +980,6 @@
|
|
|
deb259 |
/* TSF as indicated by the firmware is at INA time */
|
|
|
deb259 |
rx_status->flag |= RX_FLAG_MACTIME_PLCP_START;
|
|
|
deb259 |
} else if (he_type == RATE_MCS_HE_TYPE_SU) {
|
|
|
deb259 |
- he->data1 |=
|
|
|
deb259 |
- cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_UL_DL_KNOWN);
|
|
|
deb259 |
- if (FIELD_GET(IWL_RX_HE_PHY_UPLINK,
|
|
|
deb259 |
- le64_to_cpu(desc->he_phy_data)))
|
|
|
deb259 |
- he->data3 |=
|
|
|
deb259 |
- cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA3_UL_DL);
|
|
|
deb259 |
-
|
|
|
deb259 |
if (!queue && !(phy_info & IWL_RX_MPDU_PHY_AMPDU)) {
|
|
|
deb259 |
rx_status->ampdu_reference = mvm->ampdu_ref;
|
|
|
deb259 |
mvm->ampdu_ref++;
|
|
|
deb259 |
@@ -1032,28 +990,8 @@
|
|
|
deb259 |
le64_to_cpu(desc->he_phy_data)))
|
|
|
deb259 |
rx_status->flag |= RX_FLAG_AMPDU_EOF_BIT;
|
|
|
deb259 |
}
|
|
|
deb259 |
- } else if (he_mu && he_phy_data != HE_PHY_DATA_INVAL) {
|
|
|
deb259 |
- he_mu->flags1 |=
|
|
|
deb259 |
- le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_SIBG_SYM_OR_USER_NUM_MASK,
|
|
|
deb259 |
- he_phy_data),
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_MU_FLAGS2_SIG_B_SYMS_USERS);
|
|
|
deb259 |
- he_mu->flags1 |=
|
|
|
deb259 |
- le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_SIGB_DCM,
|
|
|
deb259 |
- he_phy_data),
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_DCM);
|
|
|
deb259 |
- he_mu->flags1 |=
|
|
|
deb259 |
- le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_SIGB_MCS_MASK,
|
|
|
deb259 |
- he_phy_data),
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_MCS);
|
|
|
deb259 |
- he_mu->flags2 |=
|
|
|
deb259 |
- le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_SIGB_COMPRESSION,
|
|
|
deb259 |
- he_phy_data),
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_MU_FLAGS2_SIG_B_COMP);
|
|
|
deb259 |
- he_mu->flags2 |=
|
|
|
deb259 |
- le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_PREAMBLE_PUNC_TYPE_MASK,
|
|
|
deb259 |
- he_phy_data),
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_MU_FLAGS2_PUNC_FROM_SIG_A_BW);
|
|
|
deb259 |
}
|
|
|
deb259 |
+
|
|
|
deb259 |
rx_status->device_timestamp = le32_to_cpu(desc->gp2_on_air_rise);
|
|
|
deb259 |
rx_status->band = desc->channel > 14 ? NL80211_BAND_5GHZ :
|
|
|
deb259 |
NL80211_BAND_2GHZ;
|
|
|
deb259 |
@@ -1258,17 +1196,6 @@
|
|
|
deb259 |
rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_2x996;
|
|
|
deb259 |
break;
|
|
|
deb259 |
}
|
|
|
deb259 |
- he->data2 |=
|
|
|
deb259 |
- le16_encode_bits(offs,
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_DATA2_RU_OFFSET);
|
|
|
deb259 |
- he->data2 |=
|
|
|
deb259 |
- cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_KNOWN);
|
|
|
deb259 |
- if (he_phy_data & IWL_RX_HE_PHY_RU_ALLOC_SEC80)
|
|
|
deb259 |
- he->data2 |=
|
|
|
deb259 |
- cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_SEC);
|
|
|
deb259 |
- } else if (he) {
|
|
|
deb259 |
- he->data1 |=
|
|
|
deb259 |
- cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_BW_RU_ALLOC_KNOWN);
|
|
|
deb259 |
}
|
|
|
deb259 |
|
|
|
deb259 |
if (!(rate_n_flags & RATE_MCS_CCK_MSK) &&
|
|
|
deb259 |
@@ -1295,7 +1222,7 @@
|
|
|
deb259 |
rx_status->enc_flags |= stbc << RX_ENC_FLAG_STBC_SHIFT;
|
|
|
deb259 |
if (rate_n_flags & RATE_MCS_BF_MSK)
|
|
|
deb259 |
rx_status->enc_flags |= RX_ENC_FLAG_BF;
|
|
|
deb259 |
- } else if (he) {
|
|
|
deb259 |
+ } else if (rate_n_flags & RATE_MCS_HE_MSK) {
|
|
|
deb259 |
u8 stbc = (rate_n_flags & RATE_MCS_STBC_MSK) >>
|
|
|
deb259 |
RATE_MCS_STBC_POS;
|
|
|
deb259 |
rx_status->nss =
|
|
|
deb259 |
@@ -1310,20 +1237,6 @@
|
|
|
deb259 |
rx_status->he_dcm =
|
|
|
deb259 |
!!(rate_n_flags & RATE_HE_DUAL_CARRIER_MODE_MSK);
|
|
|
deb259 |
|
|
|
deb259 |
-#define CHECK_TYPE(F) \
|
|
|
deb259 |
- BUILD_BUG_ON(IEEE80211_RADIOTAP_HE_DATA1_FORMAT_ ## F != \
|
|
|
deb259 |
- (RATE_MCS_HE_TYPE_ ## F >> RATE_MCS_HE_TYPE_POS))
|
|
|
deb259 |
-
|
|
|
deb259 |
- CHECK_TYPE(SU);
|
|
|
deb259 |
- CHECK_TYPE(EXT_SU);
|
|
|
deb259 |
- CHECK_TYPE(MU);
|
|
|
deb259 |
- CHECK_TYPE(TRIG);
|
|
|
deb259 |
-
|
|
|
deb259 |
- he->data1 |= cpu_to_le16(he_type >> RATE_MCS_HE_TYPE_POS);
|
|
|
deb259 |
-
|
|
|
deb259 |
- if (rate_n_flags & RATE_MCS_BF_POS)
|
|
|
deb259 |
- he->data5 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA5_TXBF);
|
|
|
deb259 |
-
|
|
|
deb259 |
switch ((rate_n_flags & RATE_MCS_HE_GI_LTF_MSK) >>
|
|
|
deb259 |
RATE_MCS_HE_GI_LTF_POS) {
|
|
|
deb259 |
case 0:
|
|
|
deb259 |
@@ -1342,65 +1255,6 @@
|
|
|
deb259 |
rx_status->he_gi = NL80211_RATE_INFO_HE_GI_3_2;
|
|
|
deb259 |
break;
|
|
|
deb259 |
}
|
|
|
deb259 |
-
|
|
|
deb259 |
- switch (he_type) {
|
|
|
deb259 |
- case RATE_MCS_HE_TYPE_SU: {
|
|
|
deb259 |
- u16 val;
|
|
|
deb259 |
-
|
|
|
deb259 |
- /* LTF syms correspond to streams */
|
|
|
deb259 |
- he->data2 |=
|
|
|
deb259 |
- cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_NUM_LTF_SYMS_KNOWN);
|
|
|
deb259 |
- switch (rx_status->nss) {
|
|
|
deb259 |
- case 1:
|
|
|
deb259 |
- val = 0;
|
|
|
deb259 |
- break;
|
|
|
deb259 |
- case 2:
|
|
|
deb259 |
- val = 1;
|
|
|
deb259 |
- break;
|
|
|
deb259 |
- case 3:
|
|
|
deb259 |
- case 4:
|
|
|
deb259 |
- val = 2;
|
|
|
deb259 |
- break;
|
|
|
deb259 |
- case 5:
|
|
|
deb259 |
- case 6:
|
|
|
deb259 |
- val = 3;
|
|
|
deb259 |
- break;
|
|
|
deb259 |
- case 7:
|
|
|
deb259 |
- case 8:
|
|
|
deb259 |
- val = 4;
|
|
|
deb259 |
- break;
|
|
|
deb259 |
- default:
|
|
|
deb259 |
- WARN_ONCE(1, "invalid nss: %d\n",
|
|
|
deb259 |
- rx_status->nss);
|
|
|
deb259 |
- val = 0;
|
|
|
deb259 |
- }
|
|
|
deb259 |
- he->data5 |=
|
|
|
deb259 |
- le16_encode_bits(val,
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_DATA5_NUM_LTF_SYMS);
|
|
|
deb259 |
- }
|
|
|
deb259 |
- break;
|
|
|
deb259 |
- case RATE_MCS_HE_TYPE_MU: {
|
|
|
deb259 |
- u16 val;
|
|
|
deb259 |
-
|
|
|
deb259 |
- if (he_phy_data == HE_PHY_DATA_INVAL)
|
|
|
deb259 |
- break;
|
|
|
deb259 |
-
|
|
|
deb259 |
- val = FIELD_GET(IWL_RX_HE_PHY_HE_LTF_NUM_MASK,
|
|
|
deb259 |
- le64_to_cpu(desc->he_phy_data));
|
|
|
deb259 |
-
|
|
|
deb259 |
- he->data2 |=
|
|
|
deb259 |
- cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_NUM_LTF_SYMS_KNOWN);
|
|
|
deb259 |
- he->data5 |=
|
|
|
deb259 |
- cpu_to_le16(FIELD_PREP(
|
|
|
deb259 |
- IEEE80211_RADIOTAP_HE_DATA5_NUM_LTF_SYMS,
|
|
|
deb259 |
- val));
|
|
|
deb259 |
- }
|
|
|
deb259 |
- break;
|
|
|
deb259 |
- case RATE_MCS_HE_TYPE_EXT_SU:
|
|
|
deb259 |
- case RATE_MCS_HE_TYPE_TRIG:
|
|
|
deb259 |
- /* not supported yet */
|
|
|
deb259 |
- break;
|
|
|
deb259 |
- }
|
|
|
deb259 |
} else {
|
|
|
deb259 |
int rate = iwl_mvm_legacy_rate_to_mac80211_idx(rate_n_flags,
|
|
|
deb259 |
rx_status->band);
|
|
|
deb259 |
@@ -1412,7 +1266,6 @@
|
|
|
deb259 |
goto out;
|
|
|
deb259 |
}
|
|
|
deb259 |
rx_status->rate_idx = rate;
|
|
|
deb259 |
-
|
|
|
deb259 |
}
|
|
|
deb259 |
|
|
|
deb259 |
/* management stuff on default queue */
|