2021-04-09 09:40:55

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 00/15] cfg80211/mac80211 patches from our internal tree 2021-04-09

From: Luca Coelho <[email protected]>

Hi,

A bunch of patches with mac80211 and cfg80211 changes from our
internal tree.

As we discussed, a couple of these break ath11k compilation, but since
you're the original author, it's easier (at least for me :P) if you
fix them before applying.

Please review, though you have already reviewed (or even written!)
most if not all of them. ;)

Thanks!

Cheers,
Luca.


Avraham Stern (2):
nl80211/cfg80211: add a flag to negotiate for LMR feedback in NDP
ranging
ieee80211: add the values of ranging parameters max LTF total field

Emmanuel Grumbach (5):
mac80211: properly drop the connection in case of invalid CSA IE
cfg80211: don't WARN if a self-managed device doesn't have a regdom
mac80211: make ieee80211_vif_to_wdev work when the vif isn't in the
driver
cfg80211: allow to specifying a reason for hw_rfkill
mac80211: clear the beacon's CRC after channel switch

Ilan Peer (2):
nl80211: Add new RSNXE related nl80211 extended features
cfg80211: Remove wrong RNR IE validation check

Johannes Berg (5):
wireless: align some HE capabilities with the spec
wireless: align HE capabilities A-MPDU Length Exponent Extension
mac80211: bail out if cipher schemes are invalid
wireless: fix spelling of A-MSDU in HE capabilities
mac80211: aes_cmac: check crypto_shash_setkey() return value

Naftali Goldstein (1):
mac80211: drop the connection if firmware crashed while in CSA

backport-include/net/cfg80211.h | 17 +++++++++
.../wireless/intel/iwlwifi/iwl-nvm-parse.c | 12 +++---
drivers/net/wireless/mac80211_hwsim.c | 16 ++++----
include/linux/ieee80211.h | 33 ++++++++++-------
include/net/cfg80211.h | 16 +++++++-
include/net/mac80211.h | 5 +--
include/uapi/linux/nl80211.h | 17 +++++++++
net/mac80211/aes_cmac.c | 11 +++++-
net/mac80211/debugfs_sta.c | 37 ++++++++++---------
net/mac80211/ieee80211_i.h | 2 +
net/mac80211/main.c | 16 ++++++--
net/mac80211/mlme.c | 16 ++++----
net/mac80211/util.c | 10 +----
net/wireless/core.c | 7 ++--
net/wireless/nl80211.c | 5 ++-
net/wireless/pmsr.c | 12 +++++-
net/wireless/scan.c | 2 +-
17 files changed, 154 insertions(+), 80 deletions(-)
create mode 100644 backport-include/net/cfg80211.h

--
2.31.0


2021-04-09 09:40:56

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 02/15] nl80211: Add new RSNXE related nl80211 extended features

From: Ilan Peer <[email protected]>

Draft P802.11ax_D2.5 defines the following capabilities that
can be negotiated using RSNXE capabilities:

- Secure LTF measurement exchange protocol.
- Secure RTT measurement exchange protocol.
- Management frame protection for all management frames exchanged
during the negotiation and range measurement procedure.

Extend the nl80211 API to allow drivers to declare support for
these new capabilities as part of extended feature.

Signed-off-by: Ilan Peer <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
include/uapi/linux/nl80211.h | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index ac78da99fccd..325f2c621840 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -5937,6 +5937,16 @@ enum nl80211_feature_flags {
* @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate
* configuration (AP/mesh) with HE rates.
*
+ * @NL80211_EXT_FEATURE_SECURE_LTF: Device supports secure LTF measurement
+ * exchange protocol.
+ *
+ * @NL80211_EXT_FEATURE_SECURE_RTT: Device supports secure RTT measurement
+ * exchange protocol.
+ *
+ * @NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE: Device supports management
+ * frame protection for all management frames exchanged during the
+ * negotiation and range measurement procedure.
+ *
* @NUM_NL80211_EXT_FEATURES: number of extended features.
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
*/
@@ -5998,6 +6008,9 @@ enum nl80211_ext_feature_index {
NL80211_EXT_FEATURE_FILS_DISCOVERY,
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP,
NL80211_EXT_FEATURE_BEACON_RATE_HE,
+ NL80211_EXT_FEATURE_SECURE_LTF,
+ NL80211_EXT_FEATURE_SECURE_RTT,
+ NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,

/* add new features before the definition below */
NUM_NL80211_EXT_FEATURES,
--
2.31.0

2021-04-09 09:40:57

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 03/15] mac80211: properly drop the connection in case of invalid CSA IE

From: Emmanuel Grumbach <[email protected]>

In case the frequency is invalid, ieee80211_parse_ch_switch_ie
will fail and we may not even reach the check in
ieee80211_sta_process_chanswitch. Drop the connection
in case ieee80211_parse_ch_switch_ie failed, but still
take into account the CSA mode to remember not to send
a deauth frame in case if it is forbidden to.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
net/mac80211/mlme.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index c569a10a1bbb..9b85adbf2cc2 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1400,11 +1400,8 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
ch_switch.delay = csa_ie.max_switch_time;
}

- if (res < 0) {
- ieee80211_queue_work(&local->hw,
- &ifmgd->csa_connection_drop_work);
- return;
- }
+ if (res < 0)
+ goto lock_and_drop_connection;

if (beacon && sdata->vif.csa_active && !ifmgd->csa_waiting_bcn) {
if (res)
--
2.31.0

2021-04-09 09:40:58

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 04/15] wireless: align some HE capabilities with the spec

From: Johannes Berg <[email protected]>

Some names were changed, align that with the spec as of
802.11ax-D6.1.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Luca Coelho <luci[email protected]>
---
.../wireless/intel/iwlwifi/iwl-nvm-parse.c | 6 +++---
include/linux/ieee80211.h | 14 +++++++-------
net/mac80211/debugfs_sta.c | 19 ++++++++++---------
3 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index af684f80b0cc..632f20d4027d 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -583,11 +583,11 @@ static const struct ieee80211_sband_iftype_data iwl_he_capa[] = {
IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2 |
IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2,
.phy_cap_info[6] =
- IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB |
- IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB |
+ IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB |
+ IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB |
IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT,
.phy_cap_info[7] =
- IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR |
+ IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP |
IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI |
IEEE80211_HE_PHY_CAP7_MAX_NC_1,
.phy_cap_info[8] =
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 72ff75fb1971..0c15fb64e7c2 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -2020,7 +2020,7 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,
#define IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG 0x01
#define IEEE80211_HE_MAC_CAP4_QTP 0x02
#define IEEE80211_HE_MAC_CAP4_BQR 0x04
-#define IEEE80211_HE_MAC_CAP4_SRP_RESP 0x08
+#define IEEE80211_HE_MAC_CAP4_PSR_RESP 0x08
#define IEEE80211_HE_MAC_CAP4_NDP_FB_REP 0x10
#define IEEE80211_HE_MAC_CAP4_OPS 0x20
#define IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU 0x40
@@ -2031,7 +2031,7 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,

#define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40 0x01
#define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B41 0x02
-#define IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION 0x04
+#define IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION 0x04
#define IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU 0x08
#define IEEE80211_HE_MAC_CAP5_OM_CTRL_UL_MU_DATA_DIS_RX 0x10
#define IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS 0x20
@@ -2089,7 +2089,7 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,
#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK 0x18
#define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 0x00
#define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_2 0x20
-#define IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA 0x40
+#define IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU 0x40
#define IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER 0x80

#define IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE 0x01
@@ -2136,15 +2136,15 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,

#define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU 0x01
#define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU 0x02
-#define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB 0x04
-#define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB 0x08
+#define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB 0x04
+#define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB 0x08
#define IEEE80211_HE_PHY_CAP6_TRIG_CQI_FB 0x10
#define IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE 0x20
#define IEEE80211_HE_PHY_CAP6_PARTIAL_BANDWIDTH_DL_MUMIMO 0x40
#define IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT 0x80

-#define IEEE80211_HE_PHY_CAP7_SRP_BASED_SR 0x01
-#define IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR 0x02
+#define IEEE80211_HE_PHY_CAP7_PSR_BASED_SR 0x01
+#define IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP 0x02
#define IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI 0x04
#define IEEE80211_HE_PHY_CAP7_MAX_NC_1 0x08
#define IEEE80211_HE_PHY_CAP7_MAX_NC_2 0x10
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 5a27c61a7b38..d350224d45e8 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -732,15 +732,15 @@ static ssize_t sta_he_capa_read(struct file *file, char __user *userbuf,
PFLAG(MAC, 4, BSRP_BQRP_A_MPDU_AGG, "BSRP-BQRP-A-MPDU-AGG");
PFLAG(MAC, 4, QTP, "QTP");
PFLAG(MAC, 4, BQR, "BQR");
- PFLAG(MAC, 4, SRP_RESP, "SRP-RESP");
+ PFLAG(MAC, 4, PSR_RESP, "PSR-RESP");
PFLAG(MAC, 4, NDP_FB_REP, "NDP-FB-REP");
PFLAG(MAC, 4, OPS, "OPS");
PFLAG(MAC, 4, AMDSU_IN_AMPDU, "AMSDU-IN-AMPDU");

PRINT("MULTI-TID-AGG-TX-QOS-%d", ((cap[5] << 1) | (cap[4] >> 7)) & 0x7);

- PFLAG(MAC, 5, SUBCHAN_SELECVITE_TRANSMISSION,
- "SUBCHAN-SELECVITE-TRANSMISSION");
+ PFLAG(MAC, 5, SUBCHAN_SELECTIVE_TRANSMISSION,
+ "SUBCHAN-SELECTIVE-TRANSMISSION");
PFLAG(MAC, 5, UL_2x996_TONE_RU, "UL-2x996-TONE-RU");
PFLAG(MAC, 5, OM_CTRL_UL_MU_DATA_DIS_RX, "OM-CTRL-UL-MU-DATA-DIS-RX");
PFLAG(MAC, 5, HE_DYNAMIC_SM_PS, "HE-DYNAMIC-SM-PS");
@@ -832,8 +832,8 @@ static ssize_t sta_he_capa_read(struct file *file, char __user *userbuf,

PFLAG(PHY, 3, DCM_MAX_RX_NSS_1, "DCM-MAX-RX-NSS-1");
PFLAG(PHY, 3, DCM_MAX_RX_NSS_2, "DCM-MAX-RX-NSS-2");
- PFLAG(PHY, 3, RX_HE_MU_PPDU_FROM_NON_AP_STA,
- "RX-HE-MU-PPDU-FROM-NON-AP-STA");
+ PFLAG(PHY, 3, RX_PARTIAL_BW_SU_IN_20MHZ_MU,
+ "RX-PARTIAL-BW-SU-IN-20MHZ-MU");
PFLAG(PHY, 3, SU_BEAMFORMER, "SU-BEAMFORMER");

PFLAG(PHY, 4, SU_BEAMFORMEE, "SU-BEAMFORMEE");
@@ -853,16 +853,17 @@ static ssize_t sta_he_capa_read(struct file *file, char __user *userbuf,

PFLAG(PHY, 6, CODEBOOK_SIZE_42_SU, "CODEBOOK-SIZE-42-SU");
PFLAG(PHY, 6, CODEBOOK_SIZE_75_MU, "CODEBOOK-SIZE-75-MU");
- PFLAG(PHY, 6, TRIG_SU_BEAMFORMER_FB, "TRIG-SU-BEAMFORMER-FB");
- PFLAG(PHY, 6, TRIG_MU_BEAMFORMER_FB, "TRIG-MU-BEAMFORMER-FB");
+ PFLAG(PHY, 6, TRIG_SU_BEAMFORMING_FB, "TRIG-SU-BEAMFORMING-FB");
+ PFLAG(PHY, 6, TRIG_MU_BEAMFORMING_PARTIAL_BW_FB,
+ "MU-BEAMFORMING-PARTIAL-BW-FB");
PFLAG(PHY, 6, TRIG_CQI_FB, "TRIG-CQI-FB");
PFLAG(PHY, 6, PARTIAL_BW_EXT_RANGE, "PARTIAL-BW-EXT-RANGE");
PFLAG(PHY, 6, PARTIAL_BANDWIDTH_DL_MUMIMO,
"PARTIAL-BANDWIDTH-DL-MUMIMO");
PFLAG(PHY, 6, PPE_THRESHOLD_PRESENT, "PPE-THRESHOLD-PRESENT");

- PFLAG(PHY, 7, SRP_BASED_SR, "SRP-BASED-SR");
- PFLAG(PHY, 7, POWER_BOOST_FACTOR_AR, "POWER-BOOST-FACTOR-AR");
+ PFLAG(PHY, 7, PSR_BASED_SR, "PSR-BASED-SR");
+ PFLAG(PHY, 7, POWER_BOOST_FACTOR_SUPP, "POWER-BOOST-FACTOR-SUPP");
PFLAG(PHY, 7, HE_SU_MU_PPDU_4XLTF_AND_08_US_GI,
"HE-SU-MU-PPDU-4XLTF-AND-08-US-GI");
PFLAG_RANGE(PHY, 7, MAX_NC, 0, 1, 1, "MAX-NC-%d");
--
2.31.0

2021-04-09 09:40:59

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 05/15] cfg80211: don't WARN if a self-managed device doesn't have a regdom

From: Emmanuel Grumbach <[email protected]>

This can happen if it booted in RF-Kill and didn't have a
chance to get its regulatory domain yet.
This can happen for example if hostapd is started on a device
that is blocked by RF-Kill.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
net/wireless/nl80211.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 521d36bb0803..f56307185b8a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -7742,8 +7742,8 @@ static int nl80211_get_reg_do(struct sk_buff *skb, struct genl_info *info)
REGULATORY_WIPHY_SELF_MANAGED;
regdom = get_wiphy_regdom(wiphy);

- /* a self-managed-reg device must have a private regdom */
- if (WARN_ON(!regdom && self_managed)) {
+ /* a self-managed-reg device should have a private regdom */
+ if (!regdom && self_managed) {
nlmsg_free(msg);
rtnl_unlock();
return -EINVAL;
--
2.31.0

2021-04-09 09:41:14

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 06/15] mac80211: make ieee80211_vif_to_wdev work when the vif isn't in the driver

From: Emmanuel Grumbach <[email protected]>

This will allow the low level driver to get the wdev during
the add_interface flow.
In order to do that, remove a few checks from there and do
not return NULL for vifs that were not yet added to the
driver. Note that all the current callers of this helper
function assume that the vif already exists:
- The callers from the drivers already have a vif pointer.
Before this change, ieee80211_vif_to_wdev would return NULL
in some cases, but those callers don't even check they
get a non-NULL pointer from ieee80211_vif_to_wdev.
- The callers from net/mac80211/cfg.c assume the vif is
already added to the driver as well.

So, this change has no impact on existing callers of this
helper function.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
include/net/mac80211.h | 5 +----
net/mac80211/util.c | 10 +---------
2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 2d1d629e5d14..d28f5087c8fa 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1768,10 +1768,7 @@ struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev);
*
* This can be used by mac80211 drivers with direct cfg80211 APIs
* (like the vendor commands) that needs to get the wdev for a vif.
- *
- * Note that this function may return %NULL if the given wdev isn't
- * associated with a vif that the driver knows about (e.g. monitor
- * or AP_VLAN interfaces.)
+ * This can also be useful to get the netdev associated to a vif.
*/
struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif);

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index f080fcf60e45..7e36b7363564 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -888,18 +888,10 @@ EXPORT_SYMBOL_GPL(wdev_to_ieee80211_vif);

struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif)
{
- struct ieee80211_sub_if_data *sdata;
-
if (!vif)
return NULL;

- sdata = vif_to_sdata(vif);
-
- if (!ieee80211_sdata_running(sdata) ||
- !(sdata->flags & IEEE80211_SDATA_IN_DRIVER))
- return NULL;
-
- return &sdata->wdev;
+ return &vif_to_sdata(vif)->wdev;
}
EXPORT_SYMBOL_GPL(ieee80211_vif_to_wdev);

--
2.31.0

2021-04-09 09:41:20

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 07/15] wireless: align HE capabilities A-MPDU Length Exponent Extension

From: Johannes Berg <[email protected]>

The A-MPDU length exponent extension is defined differently in
802.11ax D6.1, align with that.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
.../net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 4 ++--
drivers/net/wireless/mac80211_hwsim.c | 8 ++++----
include/linux/ieee80211.h | 10 ++++------
net/mac80211/debugfs_sta.c | 16 ++++++++--------
4 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index 632f20d4027d..d2058cdcb0d8 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -550,7 +550,7 @@ static const struct ieee80211_sband_iftype_data iwl_he_capa[] = {
IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP,
.mac_cap_info[3] =
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2,
.mac_cap_info[4] =
IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU |
IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39,
@@ -636,7 +636,7 @@ static const struct ieee80211_sband_iftype_data iwl_he_capa[] = {
IEEE80211_HE_MAC_CAP2_BSR,
.mac_cap_info[3] =
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2,
.mac_cap_info[4] =
IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
.mac_cap_info[5] =
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index fa7d4c20dc13..3039baa43f4c 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2795,7 +2795,7 @@ static const struct ieee80211_sband_iftype_data he_capa_2ghz[] = {
IEEE80211_HE_MAC_CAP2_ACK_EN,
.mac_cap_info[3] =
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
.phy_cap_info[1] =
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
@@ -2839,7 +2839,7 @@ static const struct ieee80211_sband_iftype_data he_capa_2ghz[] = {
IEEE80211_HE_MAC_CAP2_ACK_EN,
.mac_cap_info[3] =
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
.phy_cap_info[1] =
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
@@ -2885,7 +2885,7 @@ static const struct ieee80211_sband_iftype_data he_capa_5ghz[] = {
IEEE80211_HE_MAC_CAP2_ACK_EN,
.mac_cap_info[3] =
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
.phy_cap_info[0] =
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
@@ -2933,7 +2933,7 @@ static const struct ieee80211_sband_iftype_data he_capa_5ghz[] = {
IEEE80211_HE_MAC_CAP2_ACK_EN,
.mac_cap_info[3] =
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
.phy_cap_info[0] =
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 0c15fb64e7c2..9aa6a6c02100 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -2006,17 +2006,15 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,
* A-MDPU Length Exponent field in the HT capabilities, VHT capabilities and the
* same field in the HE capabilities.
*/
-#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_USE_VHT 0x00
-#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_1 0x08
-#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2 0x10
-#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_RESERVED 0x18
+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_0 0x00
+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1 0x08
+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2 0x10
+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3 0x18
#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK 0x18
#define IEEE80211_HE_MAC_CAP3_AMSDU_FRAG 0x20
#define IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED 0x40
#define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS 0x80

-#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT 3
-
#define IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG 0x01
#define IEEE80211_HE_MAC_CAP4_QTP 0x02
#define IEEE80211_HE_MAC_CAP4_BQR 0x04
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index d350224d45e8..25b3d4822aed 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -711,17 +711,17 @@ static ssize_t sta_he_capa_read(struct file *file, char __user *userbuf,
PFLAG(MAC, 3, OFDMA_RA, "OFDMA-RA");

switch (cap[3] & IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) {
- case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_USE_VHT:
- PRINT("MAX-AMPDU-LEN-EXP-USE-VHT");
+ case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_0:
+ PRINT("MAX-AMPDU-LEN-EXP-USE-EXT-0");
break;
- case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_1:
- PRINT("MAX-AMPDU-LEN-EXP-VHT-1");
+ case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1:
+ PRINT("MAX-AMPDU-LEN-EXP-VHT-EXT-1");
break;
- case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2:
- PRINT("MAX-AMPDU-LEN-EXP-VHT-2");
+ case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2:
+ PRINT("MAX-AMPDU-LEN-EXP-VHT-EXT-2");
break;
- case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_RESERVED:
- PRINT("MAX-AMPDU-LEN-EXP-RESERVED");
+ case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3:
+ PRINT("MAX-AMPDU-LEN-EXP-VHT-EXT-3");
break;
}

--
2.31.0

2021-04-09 09:43:16

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 08/15] cfg80211: allow to specifying a reason for hw_rfkill

From: Emmanuel Grumbach <[email protected]>

rfkill now allows to report a reason for the hw_rfkill state.
Allow cfg80211 drivers to specify this reason.
Keep the current API to use the default reason
(RFKILL_HARD_BLOCK_SIGNAL).

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
backport-include/net/cfg80211.h | 17 +++++++++++++++++
include/net/cfg80211.h | 11 ++++++++++-
net/wireless/core.c | 7 ++++---
3 files changed, 31 insertions(+), 4 deletions(-)
create mode 100644 backport-include/net/cfg80211.h

diff --git a/backport-include/net/cfg80211.h b/backport-include/net/cfg80211.h
new file mode 100644
index 000000000000..9c55ba7feb4b
--- /dev/null
+++ b/backport-include/net/cfg80211.h
@@ -0,0 +1,17 @@
+#ifndef __BACKPORT_CFG80211_
+#define __BACKPORT_CFG80211_
+
+#if LINUX_VERSION_IS_LESS(5,11,0)
+/* This is really really awkward but we need to include include/linux/rkfill.h
+ * here only for backport purposes. There is content in
+ * backport-include/linux/rfkill.h that should have gone
+ * to uapi/linux/rfkill.h but we couldn't put it there because
+ * include_next gets totally confused and can't include the right
+ * file. So we had to put that content in linux/rfkill.h. In a real
+ * kernel we wouldn't need to include this from cfg80211.h.
+ */
+#include <linux/rfkill.h>
+#endif
+#include_next <net/cfg80211.h>
+
+#endif /* __BACKPORT_CFG80211 */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 911fae42b0c0..955a4f711fdd 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -10,6 +10,7 @@
* Copyright (C) 2018-2020 Intel Corporation
*/

+#include <uapi/linux/rfkill.h>
#include <linux/ethtool.h>
#include <linux/netdevice.h>
#include <linux/debugfs.h>
@@ -6636,8 +6637,16 @@ void cfg80211_notify_new_peer_candidate(struct net_device *dev,
* wiphy_rfkill_set_hw_state - notify cfg80211 about hw block state
* @wiphy: the wiphy
* @blocked: block status
+ * @reason: one of reasons in &enum rfkill_hard_block_reasons
*/
-void wiphy_rfkill_set_hw_state(struct wiphy *wiphy, bool blocked);
+void wiphy_rfkill_set_hw_state_reason(struct wiphy *wiphy, bool blocked,
+ enum rfkill_hard_block_reasons reason);
+
+static inline void wiphy_rfkill_set_hw_state(struct wiphy *wiphy, bool blocked)
+{
+ wiphy_rfkill_set_hw_state_reason(wiphy, blocked,
+ RFKILL_HARD_BLOCK_SIGNAL);
+}

/**
* wiphy_rfkill_start_polling - start polling rfkill
diff --git a/net/wireless/core.c b/net/wireless/core.c
index a2785379df6e..adfbcb33fb8f 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -1092,14 +1092,15 @@ void wiphy_free(struct wiphy *wiphy)
}
EXPORT_SYMBOL(wiphy_free);

-void wiphy_rfkill_set_hw_state(struct wiphy *wiphy, bool blocked)
+void wiphy_rfkill_set_hw_state_reason(struct wiphy *wiphy, bool blocked,
+ enum rfkill_hard_block_reasons reason)
{
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);

- if (rfkill_set_hw_state(rdev->rfkill, blocked))
+ if (rfkill_set_hw_state_reason(rdev->rfkill, blocked, reason))
schedule_work(&rdev->rfkill_block);
}
-EXPORT_SYMBOL(wiphy_rfkill_set_hw_state);
+EXPORT_SYMBOL(wiphy_rfkill_set_hw_state_reason);

void cfg80211_cqm_config_free(struct wireless_dev *wdev)
{
--
2.31.0

2021-04-09 09:43:16

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 09/15] cfg80211: Remove wrong RNR IE validation check

From: Ilan Peer <[email protected]>

Remove a wrong length check for RNR information element as it
can have arbitrary length.

Signed-off-by: Ilan Peer <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
net/wireless/scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 019952d4fc7d..c3b51efff5c6 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -589,7 +589,7 @@ static int cfg80211_parse_colocated_ap(const struct cfg80211_bss_ies *ies,

elem = cfg80211_find_elem(WLAN_EID_REDUCED_NEIGHBOR_REPORT, ies->data,
ies->len);
- if (!elem || elem->datalen > IEEE80211_MAX_SSID_LEN)
+ if (!elem)
return 0;

pos = elem->data;
--
2.31.0

2021-04-09 09:47:54

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 08/15] cfg80211: allow to specifying a reason for hw_rfkill

On Fri, 2021-04-09 at 12:40 +0300, Luca Coelho wrote:
>
> ---
>  backport-include/net/cfg80211.h | 17 +++++++++++++++++

Umm :)

johannes

2021-04-09 09:56:59

by Luca Coelho

[permalink] [raw]
Subject: Re: [PATCH 08/15] cfg80211: allow to specifying a reason for hw_rfkill

On Fri, 2021-04-09 at 11:47 +0200, Johannes Berg wrote:
> On Fri, 2021-04-09 at 12:40 +0300, Luca Coelho wrote:
> >
> > ---
> >  backport-include/net/cfg80211.h | 17 +++++++++++++++++
>
> Umm :)

Ooops, sorry. I usually cut them off, but since this was a new file, I
missed it. Wonder what people would say if they suddenly saw a new
directory at the root of the tree! 8-|

--
Luca.

2021-04-09 10:08:03

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 13/15] ieee80211: add the values of ranging parameters max LTF total field

From: Avraham Stern <[email protected]>

Add an enum with the values of the ranging parameters max LTF total
field, as defined in IEEE802.11az_D2.6, table Table 9-322h23fc.

Signed-off-by: Avraham Stern <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
include/linux/ieee80211.h | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 63252fba3f90..2967437f1b11 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -3859,4 +3859,11 @@ struct ieee80211_neighbor_ap_info {
u8 channel;
} __packed;

+enum ieee80211_range_params_max_total_ltf {
+ IEEE80211_RANGE_PARAMS_MAX_TOTAL_LTF_4 = 0,
+ IEEE80211_RANGE_PARAMS_MAX_TOTAL_LTF_8,
+ IEEE80211_RANGE_PARAMS_MAX_TOTAL_LTF_16,
+ IEEE80211_RANGE_PARAMS_MAX_TOTAL_LTF_UNSPECIFIED,
+};
+
#endif /* LINUX_IEEE80211_H */
--
2.31.0

2021-04-09 10:08:03

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 10/15] mac80211: bail out if cipher schemes are invalid

From: Johannes Berg <[email protected]>

If any of the cipher schemes specified by the driver are invalid, bail
out and fail the registration rather than just warning. Otherwise, we
might later crash when we try to use the invalid cipher scheme, e.g.
if the hdr_len is (significantly) less than the pn_offs + pn_len, we'd
have an out-of-bounds access in RX validation.

Fixes: 2475b1cc0d52 ("mac80211: add generic cipher scheme support")
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
net/mac80211/main.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index f27aed37ed2b..ba624cb250b3 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1137,8 +1137,11 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
if (local->hw.wiphy->max_scan_ie_len)
local->hw.wiphy->max_scan_ie_len -= local->scan_ies_len;

- WARN_ON(!ieee80211_cs_list_valid(local->hw.cipher_schemes,
- local->hw.n_cipher_schemes));
+ if (WARN_ON(!ieee80211_cs_list_valid(local->hw.cipher_schemes,
+ local->hw.n_cipher_schemes))) {
+ result = -EINVAL;
+ goto fail_workqueue;
+ }

result = ieee80211_init_cipher_suites(local);
if (result < 0)
--
2.31.0

2021-04-09 10:08:05

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 14/15] mac80211: clear the beacon's CRC after channel switch

From: Emmanuel Grumbach <[email protected]>

After channel switch, we should consider any beacon with a
CSA IE as a new switch. If the CSA IE is a leftover from
before the switch that the AP forgot to remove, we'll get
a CSA-to-Self.

This caused issues in iwlwifi where the firmware saw a beacon
with a CSA-to-Self with mode = 1 on the new channel after a
switch. The firmware considered this a new switch and closed
its queues. Since the beacon didn't change between before and
after the switch, we wouldn't handle it (the CRC is the same)
and we wouldn't let the firmware open its queues again or
disconnect if the CSA IE stays for too long.

Clear the CRC valid state after we switch to make sure that
we handle the beacon and handle the CSA IE as required.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
net/mac80211/mlme.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 9b85adbf2cc2..792a92feeaeb 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1295,6 +1295,11 @@ static void ieee80211_chswitch_post_beacon(struct ieee80211_sub_if_data *sdata)

sdata->vif.csa_active = false;
ifmgd->csa_waiting_bcn = false;
+ /*
+ * If the CSA IE is still present on the beacon after the switch,
+ * we need to consider it as a new CSA (possibly to self).
+ */
+ ifmgd->beacon_crc_valid = false;

ret = drv_post_channel_switch(sdata);
if (ret) {
--
2.31.0

2021-04-09 10:08:10

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 11/15] wireless: fix spelling of A-MSDU in HE capabilities

From: Johannes Berg <[email protected]>

In the HE capabilities, spell A-MSDU correctly, not "A-MDSU".

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 2 +-
drivers/net/wireless/mac80211_hwsim.c | 8 ++++----
include/linux/ieee80211.h | 2 +-
net/mac80211/debugfs_sta.c | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index d2058cdcb0d8..c7ea5b35f9f9 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -552,7 +552,7 @@ static const struct ieee80211_sband_iftype_data iwl_he_capa[] = {
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2,
.mac_cap_info[4] =
- IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU |
+ IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU |
IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39,
.mac_cap_info[5] =
IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40 |
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 3039baa43f4c..f85a879d738b 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2796,7 +2796,7 @@ static const struct ieee80211_sband_iftype_data he_capa_2ghz[] = {
.mac_cap_info[3] =
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
- .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
+ .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU,
.phy_cap_info[1] =
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
@@ -2840,7 +2840,7 @@ static const struct ieee80211_sband_iftype_data he_capa_2ghz[] = {
.mac_cap_info[3] =
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
- .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
+ .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU,
.phy_cap_info[1] =
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
@@ -2886,7 +2886,7 @@ static const struct ieee80211_sband_iftype_data he_capa_5ghz[] = {
.mac_cap_info[3] =
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
- .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
+ .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU,
.phy_cap_info[0] =
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G |
@@ -2934,7 +2934,7 @@ static const struct ieee80211_sband_iftype_data he_capa_5ghz[] = {
.mac_cap_info[3] =
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
- .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
+ .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU,
.phy_cap_info[0] =
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 9aa6a6c02100..63252fba3f90 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -2021,7 +2021,7 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,
#define IEEE80211_HE_MAC_CAP4_PSR_RESP 0x08
#define IEEE80211_HE_MAC_CAP4_NDP_FB_REP 0x10
#define IEEE80211_HE_MAC_CAP4_OPS 0x20
-#define IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU 0x40
+#define IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU 0x40
/* Multi TID agg TX is split between byte #4 and #5
* The value is a combination of B39,B40,B41
*/
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 25b3d4822aed..936c9dfa86c8 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -735,7 +735,7 @@ static ssize_t sta_he_capa_read(struct file *file, char __user *userbuf,
PFLAG(MAC, 4, PSR_RESP, "PSR-RESP");
PFLAG(MAC, 4, NDP_FB_REP, "NDP-FB-REP");
PFLAG(MAC, 4, OPS, "OPS");
- PFLAG(MAC, 4, AMDSU_IN_AMPDU, "AMSDU-IN-AMPDU");
+ PFLAG(MAC, 4, AMSDU_IN_AMPDU, "AMSDU-IN-AMPDU");

PRINT("MULTI-TID-AGG-TX-QOS-%d", ((cap[5] << 1) | (cap[4] >> 7)) & 0x7);

--
2.31.0

2021-04-09 10:11:55

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 12/15] nl80211/cfg80211: add a flag to negotiate for LMR feedback in NDP ranging

From: Avraham Stern <[email protected]>

Add a flag that indicates that the ISTA shall indicate support for
LMR feedback in NDP ranging negotiation.

Signed-off-by: Avraham Stern <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
include/net/cfg80211.h | 5 ++++-
include/uapi/linux/nl80211.h | 4 ++++
net/wireless/nl80211.c | 1 +
net/wireless/pmsr.c | 12 +++++++++++-
4 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 955a4f711fdd..78aeeefe77b6 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3521,6 +3521,8 @@ struct cfg80211_pmsr_result {
* @non_trigger_based: use non trigger based ranging for the measurement
* If neither @trigger_based nor @non_trigger_based is set,
* EDCA based ranging will be used.
+ * @lmr_feedback: negotiate for I2R LMR feedback. Only valid if either
+ * @trigger_based or @non_trigger_based is set.
*
* See also nl80211 for the respective attribute documentation.
*/
@@ -3532,7 +3534,8 @@ struct cfg80211_pmsr_ftm_request_peer {
request_lci:1,
request_civicloc:1,
trigger_based:1,
- non_trigger_based:1;
+ non_trigger_based:1,
+ lmr_feedback:1;
u8 num_bursts_exp;
u8 burst_duration;
u8 ftms_per_burst;
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 325f2c621840..bc41cea9f2fa 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -6904,6 +6904,9 @@ enum nl80211_peer_measurement_ftm_capa {
* if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor
* %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based
* ranging will be used.
+ * @NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK: negotiate for LMR feedback. Only
+ * valid if either %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED or
+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
*
* @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
* @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
@@ -6922,6 +6925,7 @@ enum nl80211_peer_measurement_ftm_req {
NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC,
NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED,
NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,
+ NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,

/* keep last */
NUM_NL80211_PMSR_FTM_REQ_ATTR,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index f56307185b8a..c5d1c93ddfae 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -309,6 +309,7 @@ nl80211_pmsr_ftm_req_attr_policy[NL80211_PMSR_FTM_REQ_ATTR_MAX + 1] = {
[NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC] = { .type = NLA_FLAG },
[NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED] = { .type = NLA_FLAG },
[NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED] = { .type = NLA_FLAG },
+ [NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK] = { .type = NLA_FLAG },
};

static const struct nla_policy
diff --git a/net/wireless/pmsr.c b/net/wireless/pmsr.c
index a95c79d18349..d570453b6dad 100644
--- a/net/wireless/pmsr.c
+++ b/net/wireless/pmsr.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2018 - 2019 Intel Corporation
+ * Copyright (C) 2018 - 2020 Intel Corporation
*/
#ifndef __PMSR_H
#define __PMSR_H
@@ -158,6 +158,16 @@ static int pmsr_parse_ftm(struct cfg80211_registered_device *rdev,
return -EINVAL;
}

+ out->ftm.lmr_feedback =
+ !!tb[NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK];
+ if (!out->ftm.trigger_based && !out->ftm.non_trigger_based &&
+ out->ftm.lmr_feedback) {
+ NL_SET_ERR_MSG_ATTR(info->extack,
+ tb[NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK],
+ "FTM: LMR feedback set for EDCA based ranging");
+ return -EINVAL;
+ }
+
return 0;
}

--
2.31.0

2021-04-09 10:12:48

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 15/15] mac80211: aes_cmac: check crypto_shash_setkey() return value

From: Johannes Berg <[email protected]>

As crypto_shash_setkey() can fail, we should check the return value.

Addresses-Coverity-ID: 1401813 ("Unchecked return value")
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
net/mac80211/aes_cmac.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/aes_cmac.c b/net/mac80211/aes_cmac.c
index b31f1021ad9c..48c04f89de20 100644
--- a/net/mac80211/aes_cmac.c
+++ b/net/mac80211/aes_cmac.c
@@ -2,6 +2,7 @@
/*
* AES-128-CMAC with TLen 16 for IEEE 802.11w BIP
* Copyright 2008, Jouni Malinen <[email protected]>
+ * Copyright (C) 2020 Intel Corporation
*/

#include <linux/kernel.h>
@@ -73,8 +74,14 @@ struct crypto_shash *ieee80211_aes_cmac_key_setup(const u8 key[],
struct crypto_shash *tfm;

tfm = crypto_alloc_shash("cmac(aes)", 0, 0);
- if (!IS_ERR(tfm))
- crypto_shash_setkey(tfm, key, key_len);
+ if (!IS_ERR(tfm)) {
+ int err = crypto_shash_setkey(tfm, key, key_len);
+
+ if (err) {
+ crypto_free_shash(tfm);
+ return ERR_PTR(err);
+ }
+ }

return tfm;
}
--
2.31.0

2021-04-09 12:27:21

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 04/15] wireless: align some HE capabilities with the spec

Hi Luca,

I love your patch! Yet something to improve:

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on mac80211/master wireless-drivers-next/master wireless-drivers/master v5.12-rc6 next-20210408]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/13582e33bee8630eb3f2d4299b14e989bc06d297
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
git checkout 13582e33bee8630eb3f2d4299b14e989bc06d297
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_mac_filter_he_cap_mesh':
>> drivers/net/wireless/ath/ath11k/mac.c:3810:6: error: 'IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION' undeclared (first use in this function); did you mean 'IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION'?
3810 | m = IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION
drivers/net/wireless/ath/ath11k/mac.c:3810:6: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/wireless/ath/ath11k/mac.c:3820:6: error: 'IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA' undeclared (first use in this function)
3820 | m = IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath11k/mac.c:3832:6: error: 'IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB' undeclared (first use in this function); did you mean 'IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB'?
3832 | IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB
>> drivers/net/wireless/ath/ath11k/mac.c:3837:6: error: 'IEEE80211_HE_PHY_CAP7_SRP_BASED_SR' undeclared (first use in this function); did you mean 'IEEE80211_HE_PHY_CAP7_PSR_BASED_SR'?
3837 | m = IEEE80211_HE_PHY_CAP7_SRP_BASED_SR |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_PHY_CAP7_PSR_BASED_SR
>> drivers/net/wireless/ath/ath11k/mac.c:3838:6: error: 'IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR' undeclared (first use in this function); did you mean 'IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP'?
3838 | IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP


vim +3810 drivers/net/wireless/ath/ath11k/mac.c

9f056ed8ee01ad John Crispin 2019-11-25 3786
13591a1c3899cf Sven Eckelmann 2019-12-10 3787 static void
13591a1c3899cf Sven Eckelmann 2019-12-10 3788 ath11k_mac_filter_he_cap_mesh(struct ieee80211_he_cap_elem *he_cap_elem)
13591a1c3899cf Sven Eckelmann 2019-12-10 3789 {
13591a1c3899cf Sven Eckelmann 2019-12-10 3790 u8 m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3791
13591a1c3899cf Sven Eckelmann 2019-12-10 3792 m = IEEE80211_HE_MAC_CAP0_TWT_RES |
13591a1c3899cf Sven Eckelmann 2019-12-10 3793 IEEE80211_HE_MAC_CAP0_TWT_REQ;
13591a1c3899cf Sven Eckelmann 2019-12-10 3794 he_cap_elem->mac_cap_info[0] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3795
13591a1c3899cf Sven Eckelmann 2019-12-10 3796 m = IEEE80211_HE_MAC_CAP2_TRS |
13591a1c3899cf Sven Eckelmann 2019-12-10 3797 IEEE80211_HE_MAC_CAP2_BCAST_TWT |
13591a1c3899cf Sven Eckelmann 2019-12-10 3798 IEEE80211_HE_MAC_CAP2_MU_CASCADING;
13591a1c3899cf Sven Eckelmann 2019-12-10 3799 he_cap_elem->mac_cap_info[2] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3800
13591a1c3899cf Sven Eckelmann 2019-12-10 3801 m = IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED |
13591a1c3899cf Sven Eckelmann 2019-12-10 3802 IEEE80211_HE_MAC_CAP2_BCAST_TWT |
13591a1c3899cf Sven Eckelmann 2019-12-10 3803 IEEE80211_HE_MAC_CAP2_MU_CASCADING;
13591a1c3899cf Sven Eckelmann 2019-12-10 3804 he_cap_elem->mac_cap_info[3] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3805
13591a1c3899cf Sven Eckelmann 2019-12-10 3806 m = IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG |
13591a1c3899cf Sven Eckelmann 2019-12-10 3807 IEEE80211_HE_MAC_CAP4_BQR;
13591a1c3899cf Sven Eckelmann 2019-12-10 3808 he_cap_elem->mac_cap_info[4] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3809
13591a1c3899cf Sven Eckelmann 2019-12-10 @3810 m = IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION |
13591a1c3899cf Sven Eckelmann 2019-12-10 3811 IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU |
13591a1c3899cf Sven Eckelmann 2019-12-10 3812 IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING |
13591a1c3899cf Sven Eckelmann 2019-12-10 3813 IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX;
13591a1c3899cf Sven Eckelmann 2019-12-10 3814 he_cap_elem->mac_cap_info[5] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3815
13591a1c3899cf Sven Eckelmann 2019-12-10 3816 m = IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO |
13591a1c3899cf Sven Eckelmann 2019-12-10 3817 IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO;
13591a1c3899cf Sven Eckelmann 2019-12-10 3818 he_cap_elem->phy_cap_info[2] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3819
13591a1c3899cf Sven Eckelmann 2019-12-10 @3820 m = IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA |
13591a1c3899cf Sven Eckelmann 2019-12-10 3821 IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK |
13591a1c3899cf Sven Eckelmann 2019-12-10 3822 IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK;
13591a1c3899cf Sven Eckelmann 2019-12-10 3823 he_cap_elem->phy_cap_info[3] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3824
13591a1c3899cf Sven Eckelmann 2019-12-10 3825 m = IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER;
13591a1c3899cf Sven Eckelmann 2019-12-10 3826 he_cap_elem->phy_cap_info[4] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3827
13591a1c3899cf Sven Eckelmann 2019-12-10 3828 m = IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK;
13591a1c3899cf Sven Eckelmann 2019-12-10 3829 he_cap_elem->phy_cap_info[5] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3830
13591a1c3899cf Sven Eckelmann 2019-12-10 3831 m = IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU |
13591a1c3899cf Sven Eckelmann 2019-12-10 @3832 IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB |
13591a1c3899cf Sven Eckelmann 2019-12-10 3833 IEEE80211_HE_PHY_CAP6_TRIG_CQI_FB |
13591a1c3899cf Sven Eckelmann 2019-12-10 3834 IEEE80211_HE_PHY_CAP6_PARTIAL_BANDWIDTH_DL_MUMIMO;
13591a1c3899cf Sven Eckelmann 2019-12-10 3835 he_cap_elem->phy_cap_info[6] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3836
13591a1c3899cf Sven Eckelmann 2019-12-10 @3837 m = IEEE80211_HE_PHY_CAP7_SRP_BASED_SR |
13591a1c3899cf Sven Eckelmann 2019-12-10 @3838 IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR |
13591a1c3899cf Sven Eckelmann 2019-12-10 3839 IEEE80211_HE_PHY_CAP7_STBC_TX_ABOVE_80MHZ |
13591a1c3899cf Sven Eckelmann 2019-12-10 3840 IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ;
13591a1c3899cf Sven Eckelmann 2019-12-10 3841 he_cap_elem->phy_cap_info[7] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3842
13591a1c3899cf Sven Eckelmann 2019-12-10 3843 m = IEEE80211_HE_PHY_CAP8_HE_ER_SU_PPDU_4XLTF_AND_08_US_GI |
13591a1c3899cf Sven Eckelmann 2019-12-10 3844 IEEE80211_HE_PHY_CAP8_20MHZ_IN_40MHZ_HE_PPDU_IN_2G |
13591a1c3899cf Sven Eckelmann 2019-12-10 3845 IEEE80211_HE_PHY_CAP8_20MHZ_IN_160MHZ_HE_PPDU |
13591a1c3899cf Sven Eckelmann 2019-12-10 3846 IEEE80211_HE_PHY_CAP8_80MHZ_IN_160MHZ_HE_PPDU;
13591a1c3899cf Sven Eckelmann 2019-12-10 3847 he_cap_elem->phy_cap_info[8] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3848
13591a1c3899cf Sven Eckelmann 2019-12-10 3849 m = IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM |
13591a1c3899cf Sven Eckelmann 2019-12-10 3850 IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK |
13591a1c3899cf Sven Eckelmann 2019-12-10 3851 IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU |
13591a1c3899cf Sven Eckelmann 2019-12-10 3852 IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU |
13591a1c3899cf Sven Eckelmann 2019-12-10 3853 IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB |
13591a1c3899cf Sven Eckelmann 2019-12-10 3854 IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB;
13591a1c3899cf Sven Eckelmann 2019-12-10 3855 he_cap_elem->phy_cap_info[9] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3856 }
13591a1c3899cf Sven Eckelmann 2019-12-10 3857

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (9.63 kB)
.config.gz (58.49 kB)
Download all attachments

2021-04-09 13:41:38

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 07/15] wireless: align HE capabilities A-MPDU Length Exponent Extension

Hi Luca,

I love your patch! Yet something to improve:

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on mac80211/master wireless-drivers-next/master wireless-drivers/master v5.12-rc6 next-20210408]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/14d0d9bb385498f53ad9d73ebac33c6ef919be7c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
git checkout 14d0d9bb385498f53ad9d73ebac33c6ef919be7c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_h_he':
>> drivers/net/wireless/ath/ath11k/mac.c:1270:4: error: 'IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT' undeclared (first use in this function); did you mean 'IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3'?
1270 | IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3
drivers/net/wireless/ath/ath11k/mac.c:1270:4: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_mac_filter_he_cap_mesh':
drivers/net/wireless/ath/ath11k/mac.c:3810:6: error: 'IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION' undeclared (first use in this function); did you mean 'IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION'?
3810 | m = IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION
drivers/net/wireless/ath/ath11k/mac.c:3820:6: error: 'IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA' undeclared (first use in this function)
3820 | m = IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath11k/mac.c:3832:6: error: 'IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB' undeclared (first use in this function); did you mean 'IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB'?
3832 | IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB
drivers/net/wireless/ath/ath11k/mac.c:3837:6: error: 'IEEE80211_HE_PHY_CAP7_SRP_BASED_SR' undeclared (first use in this function); did you mean 'IEEE80211_HE_PHY_CAP7_PSR_BASED_SR'?
3837 | m = IEEE80211_HE_PHY_CAP7_SRP_BASED_SR |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_PHY_CAP7_PSR_BASED_SR
drivers/net/wireless/ath/ath11k/mac.c:3838:6: error: 'IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR' undeclared (first use in this function); did you mean 'IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP'?
3838 | IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP


vim +1270 drivers/net/wireless/ath/ath11k/mac.c

d5c65159f28953 Kalle Valo 2019-11-23 1233
d5c65159f28953 Kalle Valo 2019-11-23 1234 static void ath11k_peer_assoc_h_he(struct ath11k *ar,
d5c65159f28953 Kalle Valo 2019-11-23 1235 struct ieee80211_vif *vif,
d5c65159f28953 Kalle Valo 2019-11-23 1236 struct ieee80211_sta *sta,
d5c65159f28953 Kalle Valo 2019-11-23 1237 struct peer_assoc_params *arg)
d5c65159f28953 Kalle Valo 2019-11-23 1238 {
9f056ed8ee01ad John Crispin 2019-11-25 1239 const struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
af6d39db1b046a Tamizh Chelvam 2020-09-08 1240 u8 ampdu_factor;
9f056ed8ee01ad John Crispin 2019-11-25 1241 u16 v;
9f056ed8ee01ad John Crispin 2019-11-25 1242
9f056ed8ee01ad John Crispin 2019-11-25 1243 if (!he_cap->has_he)
9f056ed8ee01ad John Crispin 2019-11-25 1244 return;
9f056ed8ee01ad John Crispin 2019-11-25 1245
9f056ed8ee01ad John Crispin 2019-11-25 1246 arg->he_flag = true;
9f056ed8ee01ad John Crispin 2019-11-25 1247
9f056ed8ee01ad John Crispin 2019-11-25 1248 memcpy(&arg->peer_he_cap_macinfo, he_cap->he_cap_elem.mac_cap_info,
9f056ed8ee01ad John Crispin 2019-11-25 1249 sizeof(arg->peer_he_cap_macinfo));
9f056ed8ee01ad John Crispin 2019-11-25 1250 memcpy(&arg->peer_he_cap_phyinfo, he_cap->he_cap_elem.phy_cap_info,
9f056ed8ee01ad John Crispin 2019-11-25 1251 sizeof(arg->peer_he_cap_phyinfo));
60689de46c7f6a Rajkumar Manoharan 2020-04-24 1252 arg->peer_he_ops = vif->bss_conf.he_oper.params;
9f056ed8ee01ad John Crispin 2019-11-25 1253
9f056ed8ee01ad John Crispin 2019-11-25 1254 /* the top most byte is used to indicate BSS color info */
9f056ed8ee01ad John Crispin 2019-11-25 1255 arg->peer_he_ops &= 0xffffff;
9f056ed8ee01ad John Crispin 2019-11-25 1256
af6d39db1b046a Tamizh Chelvam 2020-09-08 1257 /* As per section 26.6.1 11ax Draft5.0, if the Max AMPDU Exponent Extension
af6d39db1b046a Tamizh Chelvam 2020-09-08 1258 * in HE cap is zero, use the arg->peer_max_mpdu as calculated while parsing
af6d39db1b046a Tamizh Chelvam 2020-09-08 1259 * VHT caps(if VHT caps is present) or HT caps (if VHT caps is not present).
af6d39db1b046a Tamizh Chelvam 2020-09-08 1260 *
af6d39db1b046a Tamizh Chelvam 2020-09-08 1261 * For non-zero value of Max AMPDU Extponent Extension in HE MAC caps,
af6d39db1b046a Tamizh Chelvam 2020-09-08 1262 * if a HE STA sends VHT cap and HE cap IE in assoc request then, use
af6d39db1b046a Tamizh Chelvam 2020-09-08 1263 * MAX_AMPDU_LEN_FACTOR as 20 to calculate max_ampdu length.
af6d39db1b046a Tamizh Chelvam 2020-09-08 1264 * If a HE STA that does not send VHT cap, but HE and HT cap in assoc
af6d39db1b046a Tamizh Chelvam 2020-09-08 1265 * request, then use MAX_AMPDU_LEN_FACTOR as 16 to calculate max_ampdu
af6d39db1b046a Tamizh Chelvam 2020-09-08 1266 * length.
af6d39db1b046a Tamizh Chelvam 2020-09-08 1267 */
af6d39db1b046a Tamizh Chelvam 2020-09-08 1268 ampdu_factor = (he_cap->he_cap_elem.mac_cap_info[3] &
af6d39db1b046a Tamizh Chelvam 2020-09-08 1269 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) >>
af6d39db1b046a Tamizh Chelvam 2020-09-08 @1270 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT;
af6d39db1b046a Tamizh Chelvam 2020-09-08 1271
af6d39db1b046a Tamizh Chelvam 2020-09-08 1272 if (ampdu_factor) {
af6d39db1b046a Tamizh Chelvam 2020-09-08 1273 if (sta->vht_cap.vht_supported)
af6d39db1b046a Tamizh Chelvam 2020-09-08 1274 arg->peer_max_mpdu = (1 << (IEEE80211_HE_VHT_MAX_AMPDU_FACTOR +
af6d39db1b046a Tamizh Chelvam 2020-09-08 1275 ampdu_factor)) - 1;
af6d39db1b046a Tamizh Chelvam 2020-09-08 1276 else if (sta->ht_cap.ht_supported)
af6d39db1b046a Tamizh Chelvam 2020-09-08 1277 arg->peer_max_mpdu = (1 << (IEEE80211_HE_HT_MAX_AMPDU_FACTOR +
af6d39db1b046a Tamizh Chelvam 2020-09-08 1278 ampdu_factor)) - 1;
af6d39db1b046a Tamizh Chelvam 2020-09-08 1279 }
af6d39db1b046a Tamizh Chelvam 2020-09-08 1280
9f056ed8ee01ad John Crispin 2019-11-25 1281 if (he_cap->he_cap_elem.phy_cap_info[6] &
9f056ed8ee01ad John Crispin 2019-11-25 1282 IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT) {
9f056ed8ee01ad John Crispin 2019-11-25 1283 int bit = 7;
9f056ed8ee01ad John Crispin 2019-11-25 1284 int nss, ru;
9f056ed8ee01ad John Crispin 2019-11-25 1285
9f056ed8ee01ad John Crispin 2019-11-25 1286 arg->peer_ppet.numss_m1 = he_cap->ppe_thres[0] &
9f056ed8ee01ad John Crispin 2019-11-25 1287 IEEE80211_PPE_THRES_NSS_MASK;
9f056ed8ee01ad John Crispin 2019-11-25 1288 arg->peer_ppet.ru_bit_mask =
9f056ed8ee01ad John Crispin 2019-11-25 1289 (he_cap->ppe_thres[0] &
9f056ed8ee01ad John Crispin 2019-11-25 1290 IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK) >>
9f056ed8ee01ad John Crispin 2019-11-25 1291 IEEE80211_PPE_THRES_RU_INDEX_BITMASK_POS;
9f056ed8ee01ad John Crispin 2019-11-25 1292
9f056ed8ee01ad John Crispin 2019-11-25 1293 for (nss = 0; nss <= arg->peer_ppet.numss_m1; nss++) {
9f056ed8ee01ad John Crispin 2019-11-25 1294 for (ru = 0; ru < 4; ru++) {
9f056ed8ee01ad John Crispin 2019-11-25 1295 u32 val = 0;
9f056ed8ee01ad John Crispin 2019-11-25 1296 int i;
9f056ed8ee01ad John Crispin 2019-11-25 1297
9f056ed8ee01ad John Crispin 2019-11-25 1298 if ((arg->peer_ppet.ru_bit_mask & BIT(ru)) == 0)
9f056ed8ee01ad John Crispin 2019-11-25 1299 continue;
9f056ed8ee01ad John Crispin 2019-11-25 1300 for (i = 0; i < 6; i++) {
9f056ed8ee01ad John Crispin 2019-11-25 1301 val >>= 1;
9f056ed8ee01ad John Crispin 2019-11-25 1302 val |= ((he_cap->ppe_thres[bit / 8] >>
9f056ed8ee01ad John Crispin 2019-11-25 1303 (bit % 8)) & 0x1) << 5;
9f056ed8ee01ad John Crispin 2019-11-25 1304 bit++;
9f056ed8ee01ad John Crispin 2019-11-25 1305 }
9f056ed8ee01ad John Crispin 2019-11-25 1306 arg->peer_ppet.ppet16_ppet8_ru3_ru0[nss] |=
9f056ed8ee01ad John Crispin 2019-11-25 1307 val << (ru * 6);
9f056ed8ee01ad John Crispin 2019-11-25 1308 }
9f056ed8ee01ad John Crispin 2019-11-25 1309 }
9f056ed8ee01ad John Crispin 2019-11-25 1310 }
9f056ed8ee01ad John Crispin 2019-11-25 1311
6d293d447670da John Crispin 2019-11-25 1312 if (he_cap->he_cap_elem.mac_cap_info[0] & IEEE80211_HE_MAC_CAP0_TWT_RES)
6d293d447670da John Crispin 2019-11-25 1313 arg->twt_responder = true;
6d293d447670da John Crispin 2019-11-25 1314 if (he_cap->he_cap_elem.mac_cap_info[0] & IEEE80211_HE_MAC_CAP0_TWT_REQ)
6d293d447670da John Crispin 2019-11-25 1315 arg->twt_requester = true;
6d293d447670da John Crispin 2019-11-25 1316
9f056ed8ee01ad John Crispin 2019-11-25 1317 switch (sta->bandwidth) {
9f056ed8ee01ad John Crispin 2019-11-25 1318 case IEEE80211_STA_RX_BW_160:
9f056ed8ee01ad John Crispin 2019-11-25 1319 if (he_cap->he_cap_elem.phy_cap_info[0] &
9f056ed8ee01ad John Crispin 2019-11-25 1320 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G) {
9f056ed8ee01ad John Crispin 2019-11-25 1321 v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80p80);
9f056ed8ee01ad John Crispin 2019-11-25 1322 arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1323
9f056ed8ee01ad John Crispin 2019-11-25 1324 v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_80p80);
9f056ed8ee01ad John Crispin 2019-11-25 1325 arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1326
9f056ed8ee01ad John Crispin 2019-11-25 1327 arg->peer_he_mcs_count++;
9f056ed8ee01ad John Crispin 2019-11-25 1328 }
9f056ed8ee01ad John Crispin 2019-11-25 1329 v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_160);
9f056ed8ee01ad John Crispin 2019-11-25 1330 arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1331
9f056ed8ee01ad John Crispin 2019-11-25 1332 v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_160);
9f056ed8ee01ad John Crispin 2019-11-25 1333 arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1334
9f056ed8ee01ad John Crispin 2019-11-25 1335 arg->peer_he_mcs_count++;
0b294aebb6a00b Gustavo A. R. Silva 2020-07-27 1336 fallthrough;
9f056ed8ee01ad John Crispin 2019-11-25 1337
9f056ed8ee01ad John Crispin 2019-11-25 1338 default:
9f056ed8ee01ad John Crispin 2019-11-25 1339 v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80);
9f056ed8ee01ad John Crispin 2019-11-25 1340 arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1341
9f056ed8ee01ad John Crispin 2019-11-25 1342 v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_80);
9f056ed8ee01ad John Crispin 2019-11-25 1343 arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1344
9f056ed8ee01ad John Crispin 2019-11-25 1345 arg->peer_he_mcs_count++;
9f056ed8ee01ad John Crispin 2019-11-25 1346 break;
9f056ed8ee01ad John Crispin 2019-11-25 1347 }
d5c65159f28953 Kalle Valo 2019-11-23 1348 }
d5c65159f28953 Kalle Valo 2019-11-23 1349

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (14.00 kB)
.config.gz (58.49 kB)
Download all attachments

2021-04-09 19:06:12

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 11/15] wireless: fix spelling of A-MSDU in HE capabilities

Hi Luca,

I love your patch! Yet something to improve:

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on mac80211/master wireless-drivers-next/master wireless-drivers/master v5.12-rc6 next-20210409]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: x86_64-randconfig-a005-20210409 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/ab7f3700d2d0fefb429cfbb3763930761035754c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
git checkout ab7f3700d2d0fefb429cfbb3763930761035754c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

>> drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c:641:6: error: use of undeclared identifier 'IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU'
IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
^
>> drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c:759:47: error: invalid application of 'sizeof' to an incomplete type 'const struct ieee80211_sband_iftype_data []'
BUILD_BUG_ON(sizeof(data->iftd.low) != sizeof(iwl_he_capa));
^~~~~~~~~~~~~
include/linux/build_bug.h:50:19: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c:760:48: error: invalid application of 'sizeof' to an incomplete type 'const struct ieee80211_sband_iftype_data []'
BUILD_BUG_ON(sizeof(data->iftd.high) != sizeof(iwl_he_capa));
^~~~~~~~~~~~~
include/linux/build_bug.h:50:19: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c:775:41: error: invalid application of 'sizeof' to an incomplete type 'const struct ieee80211_sband_iftype_data []'
memcpy(iftype_data, iwl_he_capa, sizeof(iwl_he_capa));
^~~~~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c:778:25: error: invalid application of 'sizeof' to an incomplete type 'const struct ieee80211_sband_iftype_data []'
sband->n_iftype_data = ARRAY_SIZE(iwl_he_capa);
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:49:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
5 errors generated.


vim +/IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU +641 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c

33158fefc88e58 drivers/net/wireless/iwlwifi/iwl-nvm-parse.c Eytan Lifshitz 2013-02-20 536
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 537 static const struct ieee80211_sband_iftype_data iwl_he_capa[] = {
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 538 {
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 539 .types_mask = BIT(NL80211_IFTYPE_STATION),
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 540 .he_cap = {
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 541 .has_he = true,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 542 .he_cap_elem = {
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 543 .mac_cap_info[0] =
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 544 IEEE80211_HE_MAC_CAP0_HTC_HE |
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 545 IEEE80211_HE_MAC_CAP0_TWT_REQ,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 546 .mac_cap_info[1] =
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 547 IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US |
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 548 IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 549 .mac_cap_info[2] =
38af8d5a90a8c3 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Ilan Peer 2020-04-17 550 IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 551 .mac_cap_info[3] =
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 552 IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
14d0d9bb385498 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2021-04-09 553 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2,
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 554 .mac_cap_info[4] =
ab7f3700d2d0fe drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2021-04-09 555 IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU |
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 556 IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39,
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 557 .mac_cap_info[5] =
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 558 IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40 |
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 559 IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B41 |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 560 IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 561 IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 562 IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 563 .phy_cap_info[0] =
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 564 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G |
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 565 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 566 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 567 .phy_cap_info[1] =
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 568 IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 569 IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 570 IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 571 .phy_cap_info[2] =
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 572 IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 573 .phy_cap_info[3] =
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 574 IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_NO_DCM |
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 575 IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_1 |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 576 IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_NO_DCM |
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 577 IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 578 .phy_cap_info[4] =
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 579 IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE |
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 580 IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_8 |
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 581 IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_8,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 582 .phy_cap_info[5] =
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 583 IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2 |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 584 IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 585 .phy_cap_info[6] =
13582e33bee863 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2021-04-09 586 IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB |
13582e33bee863 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2021-04-09 587 IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB |
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 588 IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 589 .phy_cap_info[7] =
13582e33bee863 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2021-04-09 590 IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP |
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 591 IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI |
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 592 IEEE80211_HE_PHY_CAP7_MAX_NC_1,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 593 .phy_cap_info[8] =
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 594 IEEE80211_HE_PHY_CAP8_HE_ER_SU_PPDU_4XLTF_AND_08_US_GI |
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 595 IEEE80211_HE_PHY_CAP8_20MHZ_IN_40MHZ_HE_PPDU_IN_2G |
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 596 IEEE80211_HE_PHY_CAP8_20MHZ_IN_160MHZ_HE_PPDU |
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 597 IEEE80211_HE_PHY_CAP8_80MHZ_IN_160MHZ_HE_PPDU |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 598 IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_2x996,
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 599 .phy_cap_info[9] =
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 600 IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK |
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 601 IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 602 IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 603 IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_RESERVED,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 604 },
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 605 /*
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 606 * Set default Tx/Rx HE MCS NSS Support field.
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 607 * Indicate support for up to 2 spatial streams and all
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 608 * MCS, without any special cases
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 609 */
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 610 .he_mcs_nss_supp = {
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 611 .rx_mcs_80 = cpu_to_le16(0xfffa),
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 612 .tx_mcs_80 = cpu_to_le16(0xfffa),
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 613 .rx_mcs_160 = cpu_to_le16(0xfffa),
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 614 .tx_mcs_160 = cpu_to_le16(0xfffa),
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 615 .rx_mcs_80p80 = cpu_to_le16(0xffff),
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 616 .tx_mcs_80p80 = cpu_to_le16(0xffff),
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 617 },
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 618 /*
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 619 * Set default PPE thresholds, with PPET16 set to 0,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 620 * PPET8 set to 7
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 621 */
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 622 .ppe_thres = {0x61, 0x1c, 0xc7, 0x71},
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 623 },
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 624 },
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 625 {
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 626 .types_mask = BIT(NL80211_IFTYPE_AP),
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 627 .he_cap = {
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 628 .has_he = true,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 629 .he_cap_elem = {
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 630 .mac_cap_info[0] =
7360f99e0b99e3 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Emmanuel Grumbach 2018-09-12 631 IEEE80211_HE_MAC_CAP0_HTC_HE,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 632 .mac_cap_info[1] =
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 633 IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US |
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 634 IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 635 .mac_cap_info[2] =
38af8d5a90a8c3 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Ilan Peer 2020-04-17 636 IEEE80211_HE_MAC_CAP2_BSR,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 637 .mac_cap_info[3] =
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 638 IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
14d0d9bb385498 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2021-04-09 639 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 640 .mac_cap_info[4] =
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 @641 IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 642 .mac_cap_info[5] =
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 643 IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 644 .phy_cap_info[0] =
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 645 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G |
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 646 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 647 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 648 .phy_cap_info[1] =
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 649 IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 650 .phy_cap_info[2] =
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 651 IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 652 .phy_cap_info[3] =
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 653 IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_NO_DCM |
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 654 IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_1 |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 655 IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_NO_DCM |
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 656 IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 657 .phy_cap_info[4] =
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 658 IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE |
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 659 IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_8 |
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 660 IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_8,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 661 .phy_cap_info[5] =
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 662 IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2 |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 663 IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 664 .phy_cap_info[6] =
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 665 IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 666 .phy_cap_info[7] =
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 667 IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI |
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 668 IEEE80211_HE_PHY_CAP7_MAX_NC_1,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 669 .phy_cap_info[8] =
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 670 IEEE80211_HE_PHY_CAP8_HE_ER_SU_PPDU_4XLTF_AND_08_US_GI |
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 671 IEEE80211_HE_PHY_CAP8_20MHZ_IN_40MHZ_HE_PPDU_IN_2G |
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 672 IEEE80211_HE_PHY_CAP8_20MHZ_IN_160MHZ_HE_PPDU |
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 673 IEEE80211_HE_PHY_CAP8_80MHZ_IN_160MHZ_HE_PPDU |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 674 IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_2x996,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 675 .phy_cap_info[9] =
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 676 IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 677 IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB |
77ff2c6b49843b drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Liad Kaufman 2019-02-06 678 IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_RESERVED,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 679 },
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 680 /*
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 681 * Set default Tx/Rx HE MCS NSS Support field.
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 682 * Indicate support for up to 2 spatial streams and all
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 683 * MCS, without any special cases
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 684 */
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 685 .he_mcs_nss_supp = {
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 686 .rx_mcs_80 = cpu_to_le16(0xfffa),
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 687 .tx_mcs_80 = cpu_to_le16(0xfffa),
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 688 .rx_mcs_160 = cpu_to_le16(0xfffa),
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 689 .tx_mcs_160 = cpu_to_le16(0xfffa),
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 690 .rx_mcs_80p80 = cpu_to_le16(0xffff),
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 691 .tx_mcs_80p80 = cpu_to_le16(0xffff),
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 692 },
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 693 /*
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 694 * Set default PPE thresholds, with PPET16 set to 0,
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 695 * PPET8 set to 7
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 696 */
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 697 .ppe_thres = {0x61, 0x1c, 0xc7, 0x71},
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 698 },
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 699 },
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 700 };
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 701
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 702 static void iwl_init_he_6ghz_capa(struct iwl_trans *trans,
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 703 struct iwl_nvm_data *data,
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 704 struct ieee80211_supported_band *sband,
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 705 u8 tx_chains, u8 rx_chains)
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 706 {
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 707 struct ieee80211_sta_ht_cap ht_cap;
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 708 struct ieee80211_sta_vht_cap vht_cap = {};
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 709 struct ieee80211_sband_iftype_data *iftype_data;
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 710 u16 he_6ghz_capa = 0;
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 711 u32 exp;
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 712 int i;
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 713
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 714 if (sband->band != NL80211_BAND_6GHZ)
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 715 return;
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 716
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 717 /* grab HT/VHT capabilities and calculate HE 6 GHz capabilities */
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 718 iwl_init_ht_hw_capab(trans, data, &ht_cap, NL80211_BAND_5GHZ,
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 719 tx_chains, rx_chains);
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 720 WARN_ON(!ht_cap.ht_supported);
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 721 iwl_init_vht_hw_capab(trans, data, &vht_cap, tx_chains, rx_chains);
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 722 WARN_ON(!vht_cap.vht_supported);
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 723
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 724 he_6ghz_capa |=
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 725 u16_encode_bits(ht_cap.ampdu_density,
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 726 IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START);
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 727 exp = u32_get_bits(vht_cap.cap,
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 728 IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK);
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 729 he_6ghz_capa |=
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 730 u16_encode_bits(exp, IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP);
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 731 exp = u32_get_bits(vht_cap.cap, IEEE80211_VHT_CAP_MAX_MPDU_MASK);
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 732 he_6ghz_capa |=
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 733 u16_encode_bits(exp, IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN);
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 734 /* we don't support extended_ht_cap_info anywhere, so no RD_RESPONDER */
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 735 if (vht_cap.cap & IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN)
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 736 he_6ghz_capa |= IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS;
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 737 if (vht_cap.cap & IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN)
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 738 he_6ghz_capa |= IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS;
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 739
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 740 IWL_DEBUG_EEPROM(trans->dev, "he_6ghz_capa=0x%x\n", he_6ghz_capa);
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 741
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 742 /* we know it's writable - we set it before ourselves */
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 743 iftype_data = (void *)sband->iftype_data;
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 744 for (i = 0; i < sband->n_iftype_data; i++)
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 745 iftype_data[i].he_6ghz_capa.capa = cpu_to_le16(he_6ghz_capa);
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 746 }
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 747
df658908566455 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2019-11-05 748 static void iwl_init_he_hw_capab(struct iwl_trans *trans,
df658908566455 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2019-11-05 749 struct iwl_nvm_data *data,
df658908566455 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2019-11-05 750 struct ieee80211_supported_band *sband,
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 751 u8 tx_chains, u8 rx_chains)
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 752 {
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 753 struct ieee80211_sband_iftype_data *iftype_data;
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 754
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 755 /* should only initialize once */
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 756 if (WARN_ON(sband->iftype_data))
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 757 return;
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 758
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 @759 BUILD_BUG_ON(sizeof(data->iftd.low) != sizeof(iwl_he_capa));
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 760 BUILD_BUG_ON(sizeof(data->iftd.high) != sizeof(iwl_he_capa));
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 761
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 762 switch (sband->band) {
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 763 case NL80211_BAND_2GHZ:
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 764 iftype_data = data->iftd.low;
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 765 break;
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 766 case NL80211_BAND_5GHZ:
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 767 case NL80211_BAND_6GHZ:
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 768 iftype_data = data->iftd.high;
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 769 break;
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 770 default:
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 771 WARN_ON(1);
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 772 return;
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 773 }
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 774
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 775 memcpy(iftype_data, iwl_he_capa, sizeof(iwl_he_capa));
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 776
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 777 sband->iftype_data = iftype_data;
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 778 sband->n_iftype_data = ARRAY_SIZE(iwl_he_capa);
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 779
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 780 /* If not 2x2, we need to indicate 1x1 in the Midamble RX Max NSTS */
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 781 if ((tx_chains & rx_chains) != ANT_AB) {
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 782 int i;
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 783
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 784 for (i = 0; i < sband->n_iftype_data; i++) {
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 785 iftype_data[i].he_cap.he_cap_elem.phy_cap_info[1] &=
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 786 ~IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS;
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 787 iftype_data[i].he_cap.he_cap_elem.phy_cap_info[2] &=
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 788 ~IEEE80211_HE_PHY_CAP2_MIDAMBLE_RX_TX_MAX_NSTS;
d43ab298efc639 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Johannes Berg 2020-12-09 789 iftype_data[i].he_cap.he_cap_elem.phy_cap_info[7] &=
add7453ad62f05 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-09-05 790 ~IEEE80211_HE_PHY_CAP7_MAX_NC_MASK;
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 791 }
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 792 }
eae94cf82d7456 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2020-12-10 793 iwl_init_he_6ghz_capa(trans, data, sband, tx_chains, rx_chains);
57a3a454f30368 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Shaul Triebitz 2018-08-20 794 }
514c30696fbc25 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c Luca Coelho 2018-06-24 795

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (40.60 kB)
.config.gz (38.22 kB)
Download all attachments

2021-04-09 23:32:19

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 04/15] wireless: align some HE capabilities with the spec

Hi Luca,

I love your patch! Yet something to improve:

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on mac80211/master wireless-drivers-next/master wireless-drivers/master v5.12-rc6 next-20210409]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: x86_64-randconfig-a006-20210409 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/13582e33bee8630eb3f2d4299b14e989bc06d297
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
git checkout 13582e33bee8630eb3f2d4299b14e989bc06d297
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

>> drivers/net/wireless/ath/ath11k/mac.c:3810:6: error: use of undeclared identifier 'IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION'
m = IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION |
^
>> drivers/net/wireless/ath/ath11k/mac.c:3820:6: error: use of undeclared identifier 'IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA'
m = IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA |
^
>> drivers/net/wireless/ath/ath11k/mac.c:3832:6: error: use of undeclared identifier 'IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB'
IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB |
^
>> drivers/net/wireless/ath/ath11k/mac.c:3837:6: error: use of undeclared identifier 'IEEE80211_HE_PHY_CAP7_SRP_BASED_SR'
m = IEEE80211_HE_PHY_CAP7_SRP_BASED_SR |
^
>> drivers/net/wireless/ath/ath11k/mac.c:3838:6: error: use of undeclared identifier 'IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR'
IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR |
^
5 errors generated.


vim +/IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION +3810 drivers/net/wireless/ath/ath11k/mac.c

9f056ed8ee01ad John Crispin 2019-11-25 3786
13591a1c3899cf Sven Eckelmann 2019-12-10 3787 static void
13591a1c3899cf Sven Eckelmann 2019-12-10 3788 ath11k_mac_filter_he_cap_mesh(struct ieee80211_he_cap_elem *he_cap_elem)
13591a1c3899cf Sven Eckelmann 2019-12-10 3789 {
13591a1c3899cf Sven Eckelmann 2019-12-10 3790 u8 m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3791
13591a1c3899cf Sven Eckelmann 2019-12-10 3792 m = IEEE80211_HE_MAC_CAP0_TWT_RES |
13591a1c3899cf Sven Eckelmann 2019-12-10 3793 IEEE80211_HE_MAC_CAP0_TWT_REQ;
13591a1c3899cf Sven Eckelmann 2019-12-10 3794 he_cap_elem->mac_cap_info[0] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3795
13591a1c3899cf Sven Eckelmann 2019-12-10 3796 m = IEEE80211_HE_MAC_CAP2_TRS |
13591a1c3899cf Sven Eckelmann 2019-12-10 3797 IEEE80211_HE_MAC_CAP2_BCAST_TWT |
13591a1c3899cf Sven Eckelmann 2019-12-10 3798 IEEE80211_HE_MAC_CAP2_MU_CASCADING;
13591a1c3899cf Sven Eckelmann 2019-12-10 3799 he_cap_elem->mac_cap_info[2] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3800
13591a1c3899cf Sven Eckelmann 2019-12-10 3801 m = IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED |
13591a1c3899cf Sven Eckelmann 2019-12-10 3802 IEEE80211_HE_MAC_CAP2_BCAST_TWT |
13591a1c3899cf Sven Eckelmann 2019-12-10 3803 IEEE80211_HE_MAC_CAP2_MU_CASCADING;
13591a1c3899cf Sven Eckelmann 2019-12-10 3804 he_cap_elem->mac_cap_info[3] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3805
13591a1c3899cf Sven Eckelmann 2019-12-10 3806 m = IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG |
13591a1c3899cf Sven Eckelmann 2019-12-10 3807 IEEE80211_HE_MAC_CAP4_BQR;
13591a1c3899cf Sven Eckelmann 2019-12-10 3808 he_cap_elem->mac_cap_info[4] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3809
13591a1c3899cf Sven Eckelmann 2019-12-10 @3810 m = IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION |
13591a1c3899cf Sven Eckelmann 2019-12-10 3811 IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU |
13591a1c3899cf Sven Eckelmann 2019-12-10 3812 IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING |
13591a1c3899cf Sven Eckelmann 2019-12-10 3813 IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX;
13591a1c3899cf Sven Eckelmann 2019-12-10 3814 he_cap_elem->mac_cap_info[5] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3815
13591a1c3899cf Sven Eckelmann 2019-12-10 3816 m = IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO |
13591a1c3899cf Sven Eckelmann 2019-12-10 3817 IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO;
13591a1c3899cf Sven Eckelmann 2019-12-10 3818 he_cap_elem->phy_cap_info[2] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3819
13591a1c3899cf Sven Eckelmann 2019-12-10 @3820 m = IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA |
13591a1c3899cf Sven Eckelmann 2019-12-10 3821 IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK |
13591a1c3899cf Sven Eckelmann 2019-12-10 3822 IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK;
13591a1c3899cf Sven Eckelmann 2019-12-10 3823 he_cap_elem->phy_cap_info[3] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3824
13591a1c3899cf Sven Eckelmann 2019-12-10 3825 m = IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER;
13591a1c3899cf Sven Eckelmann 2019-12-10 3826 he_cap_elem->phy_cap_info[4] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3827
13591a1c3899cf Sven Eckelmann 2019-12-10 3828 m = IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK;
13591a1c3899cf Sven Eckelmann 2019-12-10 3829 he_cap_elem->phy_cap_info[5] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3830
13591a1c3899cf Sven Eckelmann 2019-12-10 3831 m = IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU |
13591a1c3899cf Sven Eckelmann 2019-12-10 @3832 IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB |
13591a1c3899cf Sven Eckelmann 2019-12-10 3833 IEEE80211_HE_PHY_CAP6_TRIG_CQI_FB |
13591a1c3899cf Sven Eckelmann 2019-12-10 3834 IEEE80211_HE_PHY_CAP6_PARTIAL_BANDWIDTH_DL_MUMIMO;
13591a1c3899cf Sven Eckelmann 2019-12-10 3835 he_cap_elem->phy_cap_info[6] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3836
13591a1c3899cf Sven Eckelmann 2019-12-10 @3837 m = IEEE80211_HE_PHY_CAP7_SRP_BASED_SR |
13591a1c3899cf Sven Eckelmann 2019-12-10 @3838 IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR |
13591a1c3899cf Sven Eckelmann 2019-12-10 3839 IEEE80211_HE_PHY_CAP7_STBC_TX_ABOVE_80MHZ |
13591a1c3899cf Sven Eckelmann 2019-12-10 3840 IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ;
13591a1c3899cf Sven Eckelmann 2019-12-10 3841 he_cap_elem->phy_cap_info[7] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3842
13591a1c3899cf Sven Eckelmann 2019-12-10 3843 m = IEEE80211_HE_PHY_CAP8_HE_ER_SU_PPDU_4XLTF_AND_08_US_GI |
13591a1c3899cf Sven Eckelmann 2019-12-10 3844 IEEE80211_HE_PHY_CAP8_20MHZ_IN_40MHZ_HE_PPDU_IN_2G |
13591a1c3899cf Sven Eckelmann 2019-12-10 3845 IEEE80211_HE_PHY_CAP8_20MHZ_IN_160MHZ_HE_PPDU |
13591a1c3899cf Sven Eckelmann 2019-12-10 3846 IEEE80211_HE_PHY_CAP8_80MHZ_IN_160MHZ_HE_PPDU;
13591a1c3899cf Sven Eckelmann 2019-12-10 3847 he_cap_elem->phy_cap_info[8] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3848
13591a1c3899cf Sven Eckelmann 2019-12-10 3849 m = IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM |
13591a1c3899cf Sven Eckelmann 2019-12-10 3850 IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK |
13591a1c3899cf Sven Eckelmann 2019-12-10 3851 IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU |
13591a1c3899cf Sven Eckelmann 2019-12-10 3852 IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU |
13591a1c3899cf Sven Eckelmann 2019-12-10 3853 IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB |
13591a1c3899cf Sven Eckelmann 2019-12-10 3854 IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB;
13591a1c3899cf Sven Eckelmann 2019-12-10 3855 he_cap_elem->phy_cap_info[9] &= ~m;
13591a1c3899cf Sven Eckelmann 2019-12-10 3856 }
13591a1c3899cf Sven Eckelmann 2019-12-10 3857

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (8.93 kB)
.config.gz (35.97 kB)
Download all attachments

2021-04-10 09:21:30

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 07/15] wireless: align HE capabilities A-MPDU Length Exponent Extension

Hi Luca,

I love your patch! Yet something to improve:

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on mac80211/master wireless-drivers-next/master wireless-drivers/master v5.12-rc6 next-20210409]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: x86_64-randconfig-a006-20210409 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/14d0d9bb385498f53ad9d73ebac33c6ef919be7c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
git checkout 14d0d9bb385498f53ad9d73ebac33c6ef919be7c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

>> drivers/net/wireless/ath/ath11k/mac.c:1270:4: error: use of undeclared identifier 'IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT'
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT;
^
drivers/net/wireless/ath/ath11k/mac.c:3810:6: error: use of undeclared identifier 'IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION'
m = IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION |
^
drivers/net/wireless/ath/ath11k/mac.c:3820:6: error: use of undeclared identifier 'IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA'
m = IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA |
^
drivers/net/wireless/ath/ath11k/mac.c:3832:6: error: use of undeclared identifier 'IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB'
IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB |
^
drivers/net/wireless/ath/ath11k/mac.c:3837:6: error: use of undeclared identifier 'IEEE80211_HE_PHY_CAP7_SRP_BASED_SR'
m = IEEE80211_HE_PHY_CAP7_SRP_BASED_SR |
^
drivers/net/wireless/ath/ath11k/mac.c:3838:6: error: use of undeclared identifier 'IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR'
IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR |
^
6 errors generated.


vim +/IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT +1270 drivers/net/wireless/ath/ath11k/mac.c

d5c65159f28953 Kalle Valo 2019-11-23 1233
d5c65159f28953 Kalle Valo 2019-11-23 1234 static void ath11k_peer_assoc_h_he(struct ath11k *ar,
d5c65159f28953 Kalle Valo 2019-11-23 1235 struct ieee80211_vif *vif,
d5c65159f28953 Kalle Valo 2019-11-23 1236 struct ieee80211_sta *sta,
d5c65159f28953 Kalle Valo 2019-11-23 1237 struct peer_assoc_params *arg)
d5c65159f28953 Kalle Valo 2019-11-23 1238 {
9f056ed8ee01ad John Crispin 2019-11-25 1239 const struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
af6d39db1b046a Tamizh Chelvam 2020-09-08 1240 u8 ampdu_factor;
9f056ed8ee01ad John Crispin 2019-11-25 1241 u16 v;
9f056ed8ee01ad John Crispin 2019-11-25 1242
9f056ed8ee01ad John Crispin 2019-11-25 1243 if (!he_cap->has_he)
9f056ed8ee01ad John Crispin 2019-11-25 1244 return;
9f056ed8ee01ad John Crispin 2019-11-25 1245
9f056ed8ee01ad John Crispin 2019-11-25 1246 arg->he_flag = true;
9f056ed8ee01ad John Crispin 2019-11-25 1247
9f056ed8ee01ad John Crispin 2019-11-25 1248 memcpy(&arg->peer_he_cap_macinfo, he_cap->he_cap_elem.mac_cap_info,
9f056ed8ee01ad John Crispin 2019-11-25 1249 sizeof(arg->peer_he_cap_macinfo));
9f056ed8ee01ad John Crispin 2019-11-25 1250 memcpy(&arg->peer_he_cap_phyinfo, he_cap->he_cap_elem.phy_cap_info,
9f056ed8ee01ad John Crispin 2019-11-25 1251 sizeof(arg->peer_he_cap_phyinfo));
60689de46c7f6a Rajkumar Manoharan 2020-04-24 1252 arg->peer_he_ops = vif->bss_conf.he_oper.params;
9f056ed8ee01ad John Crispin 2019-11-25 1253
9f056ed8ee01ad John Crispin 2019-11-25 1254 /* the top most byte is used to indicate BSS color info */
9f056ed8ee01ad John Crispin 2019-11-25 1255 arg->peer_he_ops &= 0xffffff;
9f056ed8ee01ad John Crispin 2019-11-25 1256
af6d39db1b046a Tamizh Chelvam 2020-09-08 1257 /* As per section 26.6.1 11ax Draft5.0, if the Max AMPDU Exponent Extension
af6d39db1b046a Tamizh Chelvam 2020-09-08 1258 * in HE cap is zero, use the arg->peer_max_mpdu as calculated while parsing
af6d39db1b046a Tamizh Chelvam 2020-09-08 1259 * VHT caps(if VHT caps is present) or HT caps (if VHT caps is not present).
af6d39db1b046a Tamizh Chelvam 2020-09-08 1260 *
af6d39db1b046a Tamizh Chelvam 2020-09-08 1261 * For non-zero value of Max AMPDU Extponent Extension in HE MAC caps,
af6d39db1b046a Tamizh Chelvam 2020-09-08 1262 * if a HE STA sends VHT cap and HE cap IE in assoc request then, use
af6d39db1b046a Tamizh Chelvam 2020-09-08 1263 * MAX_AMPDU_LEN_FACTOR as 20 to calculate max_ampdu length.
af6d39db1b046a Tamizh Chelvam 2020-09-08 1264 * If a HE STA that does not send VHT cap, but HE and HT cap in assoc
af6d39db1b046a Tamizh Chelvam 2020-09-08 1265 * request, then use MAX_AMPDU_LEN_FACTOR as 16 to calculate max_ampdu
af6d39db1b046a Tamizh Chelvam 2020-09-08 1266 * length.
af6d39db1b046a Tamizh Chelvam 2020-09-08 1267 */
af6d39db1b046a Tamizh Chelvam 2020-09-08 1268 ampdu_factor = (he_cap->he_cap_elem.mac_cap_info[3] &
af6d39db1b046a Tamizh Chelvam 2020-09-08 1269 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) >>
af6d39db1b046a Tamizh Chelvam 2020-09-08 @1270 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT;
af6d39db1b046a Tamizh Chelvam 2020-09-08 1271
af6d39db1b046a Tamizh Chelvam 2020-09-08 1272 if (ampdu_factor) {
af6d39db1b046a Tamizh Chelvam 2020-09-08 1273 if (sta->vht_cap.vht_supported)
af6d39db1b046a Tamizh Chelvam 2020-09-08 1274 arg->peer_max_mpdu = (1 << (IEEE80211_HE_VHT_MAX_AMPDU_FACTOR +
af6d39db1b046a Tamizh Chelvam 2020-09-08 1275 ampdu_factor)) - 1;
af6d39db1b046a Tamizh Chelvam 2020-09-08 1276 else if (sta->ht_cap.ht_supported)
af6d39db1b046a Tamizh Chelvam 2020-09-08 1277 arg->peer_max_mpdu = (1 << (IEEE80211_HE_HT_MAX_AMPDU_FACTOR +
af6d39db1b046a Tamizh Chelvam 2020-09-08 1278 ampdu_factor)) - 1;
af6d39db1b046a Tamizh Chelvam 2020-09-08 1279 }
af6d39db1b046a Tamizh Chelvam 2020-09-08 1280
9f056ed8ee01ad John Crispin 2019-11-25 1281 if (he_cap->he_cap_elem.phy_cap_info[6] &
9f056ed8ee01ad John Crispin 2019-11-25 1282 IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT) {
9f056ed8ee01ad John Crispin 2019-11-25 1283 int bit = 7;
9f056ed8ee01ad John Crispin 2019-11-25 1284 int nss, ru;
9f056ed8ee01ad John Crispin 2019-11-25 1285
9f056ed8ee01ad John Crispin 2019-11-25 1286 arg->peer_ppet.numss_m1 = he_cap->ppe_thres[0] &
9f056ed8ee01ad John Crispin 2019-11-25 1287 IEEE80211_PPE_THRES_NSS_MASK;
9f056ed8ee01ad John Crispin 2019-11-25 1288 arg->peer_ppet.ru_bit_mask =
9f056ed8ee01ad John Crispin 2019-11-25 1289 (he_cap->ppe_thres[0] &
9f056ed8ee01ad John Crispin 2019-11-25 1290 IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK) >>
9f056ed8ee01ad John Crispin 2019-11-25 1291 IEEE80211_PPE_THRES_RU_INDEX_BITMASK_POS;
9f056ed8ee01ad John Crispin 2019-11-25 1292
9f056ed8ee01ad John Crispin 2019-11-25 1293 for (nss = 0; nss <= arg->peer_ppet.numss_m1; nss++) {
9f056ed8ee01ad John Crispin 2019-11-25 1294 for (ru = 0; ru < 4; ru++) {
9f056ed8ee01ad John Crispin 2019-11-25 1295 u32 val = 0;
9f056ed8ee01ad John Crispin 2019-11-25 1296 int i;
9f056ed8ee01ad John Crispin 2019-11-25 1297
9f056ed8ee01ad John Crispin 2019-11-25 1298 if ((arg->peer_ppet.ru_bit_mask & BIT(ru)) == 0)
9f056ed8ee01ad John Crispin 2019-11-25 1299 continue;
9f056ed8ee01ad John Crispin 2019-11-25 1300 for (i = 0; i < 6; i++) {
9f056ed8ee01ad John Crispin 2019-11-25 1301 val >>= 1;
9f056ed8ee01ad John Crispin 2019-11-25 1302 val |= ((he_cap->ppe_thres[bit / 8] >>
9f056ed8ee01ad John Crispin 2019-11-25 1303 (bit % 8)) & 0x1) << 5;
9f056ed8ee01ad John Crispin 2019-11-25 1304 bit++;
9f056ed8ee01ad John Crispin 2019-11-25 1305 }
9f056ed8ee01ad John Crispin 2019-11-25 1306 arg->peer_ppet.ppet16_ppet8_ru3_ru0[nss] |=
9f056ed8ee01ad John Crispin 2019-11-25 1307 val << (ru * 6);
9f056ed8ee01ad John Crispin 2019-11-25 1308 }
9f056ed8ee01ad John Crispin 2019-11-25 1309 }
9f056ed8ee01ad John Crispin 2019-11-25 1310 }
9f056ed8ee01ad John Crispin 2019-11-25 1311
6d293d447670da John Crispin 2019-11-25 1312 if (he_cap->he_cap_elem.mac_cap_info[0] & IEEE80211_HE_MAC_CAP0_TWT_RES)
6d293d447670da John Crispin 2019-11-25 1313 arg->twt_responder = true;
6d293d447670da John Crispin 2019-11-25 1314 if (he_cap->he_cap_elem.mac_cap_info[0] & IEEE80211_HE_MAC_CAP0_TWT_REQ)
6d293d447670da John Crispin 2019-11-25 1315 arg->twt_requester = true;
6d293d447670da John Crispin 2019-11-25 1316
9f056ed8ee01ad John Crispin 2019-11-25 1317 switch (sta->bandwidth) {
9f056ed8ee01ad John Crispin 2019-11-25 1318 case IEEE80211_STA_RX_BW_160:
9f056ed8ee01ad John Crispin 2019-11-25 1319 if (he_cap->he_cap_elem.phy_cap_info[0] &
9f056ed8ee01ad John Crispin 2019-11-25 1320 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G) {
9f056ed8ee01ad John Crispin 2019-11-25 1321 v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80p80);
9f056ed8ee01ad John Crispin 2019-11-25 1322 arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1323
9f056ed8ee01ad John Crispin 2019-11-25 1324 v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_80p80);
9f056ed8ee01ad John Crispin 2019-11-25 1325 arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1326
9f056ed8ee01ad John Crispin 2019-11-25 1327 arg->peer_he_mcs_count++;
9f056ed8ee01ad John Crispin 2019-11-25 1328 }
9f056ed8ee01ad John Crispin 2019-11-25 1329 v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_160);
9f056ed8ee01ad John Crispin 2019-11-25 1330 arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1331
9f056ed8ee01ad John Crispin 2019-11-25 1332 v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_160);
9f056ed8ee01ad John Crispin 2019-11-25 1333 arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1334
9f056ed8ee01ad John Crispin 2019-11-25 1335 arg->peer_he_mcs_count++;
0b294aebb6a00b Gustavo A. R. Silva 2020-07-27 1336 fallthrough;
9f056ed8ee01ad John Crispin 2019-11-25 1337
9f056ed8ee01ad John Crispin 2019-11-25 1338 default:
9f056ed8ee01ad John Crispin 2019-11-25 1339 v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80);
9f056ed8ee01ad John Crispin 2019-11-25 1340 arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1341
9f056ed8ee01ad John Crispin 2019-11-25 1342 v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_80);
9f056ed8ee01ad John Crispin 2019-11-25 1343 arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1344
9f056ed8ee01ad John Crispin 2019-11-25 1345 arg->peer_he_mcs_count++;
9f056ed8ee01ad John Crispin 2019-11-25 1346 break;
9f056ed8ee01ad John Crispin 2019-11-25 1347 }
d5c65159f28953 Kalle Valo 2019-11-23 1348 }
d5c65159f28953 Kalle Valo 2019-11-23 1349

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (13.06 kB)
.config.gz (35.97 kB)
Download all attachments