iwlwifi: updates intended for v6.0
cover iwlwifi: updates intended for v6.0
From: Gregory Greenman <[email protected]>
Hi,
After some hiatus, we're starting to send iwlwifi patches again. Here's the first set of patches intended for v6.0. It contains the usual development, new features and cleanups.
The changes are:
* Refactoring of some wowlan related code
* Fixes and cleanups
* Adding support for BZ device family
As usual, these commits are pushed to a pending branch, for kbuild bot. I'll send a pull-request later.
Best regards,
Gregory
Haim Dreyfuss (5):
wifi: iwlwifi: mvm: don't check D0I3 version
wifi: iwlwifi: mvm: Add support for wowlan info notification
wifi: iwlwifi: mvm: Add support for wowlan wake packet notification
wifi: iwlwifi: mvm: Add support for d3 end notification
wifi: iwlwifi: mvm: enable resume based on notifications
Haim, Dreyfuss (1):
wifi: iwlwifi: mvm: trigger resume flow before wait for notifications
Ilan Peer (1):
wifi: iwlwifi: mvm: Add handling for scan offload match info
notification
Johannes Berg (5):
wifi: iwlwifi: mvm: fix typo in struct iwl_rx_no_data API
wifi: iwlwifi: mvm: rxmq: refactor mac80211 rx_status setting
wifi: iwlwifi: mvm: rxmq: further unify some VHT/HE code
wifi: iwlwifi: mvm: refactor iwl_mvm_set_sta_rate() a bit
wifi: iwlwifi: cfg: remove IWL_DEVICE_BZ_COMMON macro
Naftali Goldstein (1):
wifi: iwlwifi: mvm: d3: parse keys from wowlan info notification
Yaara Baruch (1):
wifi: iwlwifi: pcie: add support for BZ devices
Yedidya Benshimol (1):
wifi: iwlwifi: mvm: iterate over interfaces after an assert in d3
.../net/wireless/intel/iwlwifi/cfg/22000.c | 42 +- .../wireless/intel/iwlwifi/fw/api/commands.h | 5 +- .../net/wireless/intel/iwlwifi/fw/api/d3.h | 61 +- .../wireless/intel/iwlwifi/fw/api/offload.h | 17 +- .../net/wireless/intel/iwlwifi/fw/api/rx.h | 4 +- .../net/wireless/intel/iwlwifi/fw/api/scan.h | 20 +- .../net/wireless/intel/iwlwifi/iwl-config.h | 3 + drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 668 +++++++++++++----- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 25 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 18 +- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 376 +++++----- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 19 +- 13 files changed, 846 insertions(+), 413 deletions(-)
Signature · 1 line
2.35.3
PATCH 1/15 wifi: iwlwifi: pcie: add support for BZ devices
From: Yaara Baruch <[email protected]>
Add support in BZ-FM and BZ-GL devices. Adjust current structs steps to differ between the new devices.
--- .../net/wireless/intel/iwlwifi/cfg/22000.c | 33 +++++++++++++++++++ .../net/wireless/intel/iwlwifi/iwl-config.h | 3 ++ drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 19 +++++++++-- 3 files changed, 53 insertions(+), 2 deletions(-)
drivers/net/wireless/intel/iwlwifi/cfg/22000.c +33 -0
@@ -56,13 +56,16 @@#define IWL_BZ_A_GF4_A_FW_PRE "iwlwifi-bz-a0-gf4-a0-"#define IWL_BZ_A_MR_A_FW_PRE "iwlwifi-bz-a0-mr-a0-"#define IWL_BZ_A_FM_A_FW_PRE "iwlwifi-bz-a0-fm-a0-" +#define IWL_BZ_A_FM4_A_FW_PRE "iwlwifi-bz-a0-fm4-a0-"#define IWL_GL_A_FM_A_FW_PRE "iwlwifi-gl-a0-fm-a0-" +#define IWL_GL_B_FM_B_FW_PRE "iwlwifi-gl-b0-fm-b0-"#define IWL_BZ_Z_GF_A_FW_PRE "iwlwifi-bz-z0-gf-a0-"#define IWL_BNJ_A_FM_A_FW_PRE "iwlwifi-BzBnj-a0-fm-a0-"#define IWL_BNJ_A_FM4_A_FW_PRE "iwlwifi-BzBnj-a0-fm4-a0-"#define IWL_BNJ_A_GF_A_FW_PRE "iwlwifi-BzBnj-a0-gf-a0-"#define IWL_BNJ_A_GF4_A_FW_PRE "iwlwifi-BzBnj-a0-gf4-a0-"#define IWL_BNJ_A_HR_B_FW_PRE "iwlwifi-BzBnj-a0-hr-b0-" +#define IWL_BNJ_B_FM_B_FW_PRE "iwlwifi-BzBnj-b0-fm-b0-"#define IWL_QU_B_HR_B_MODULE_FIRMWARE (api) \
@@ -119,8 +122,12 @@ IWL_BZ_A_MR_A_FW_PRE __stringify(api) ".ucode"#define IWL_BZ_A_FM_A_MODULE_FIRMWARE (api) \ IWL_BZ_A_FM_A_FW_PRE __stringify(api) ".ucode" +#define IWL_BZ_A_FM4_A_MODULE_FIRMWARE (api) \ + IWL_BZ_A_FM4_A_FW_PRE __stringify(api) ".ucode"#define IWL_GL_A_FM_A_MODULE_FIRMWARE (api) \ IWL_GL_A_FM_A_FW_PRE __stringify(api) ".ucode" +#define IWL_GL_B_FM_B_MODULE_FIRMWARE (api) \ + IWL_GL_B_FM_B_FW_PRE __stringify(api) ".ucode"#define IWL_BNJ_A_FM_A_MODULE_FIRMWARE (api) \ IWL_BNJ_A_FM_A_FW_PRE __stringify(api) ".ucode"#define IWL_BNJ_A_FM4_A_MODULE_FIRMWARE (api) \
@@ -131,6 +138,8 @@ IWL_BNJ_A_GF4_A_FW_PRE __stringify(api) ".ucode"#define IWL_BNJ_A_HR_B_MODULE_FIRMWARE (api) \ IWL_BNJ_A_HR_B_FW_PRE __stringify(api) ".ucode" +#define IWL_BNJ_B_FM_B_MODULE_FIRMWARE (api) \ + IWL_BNJ_B_FM_B_FW_PRE __stringify(api) ".ucode"static const struct iwl_base_params iwl_22000_base_params = { .eeprom_size =OTP_LOW_IMAGE_SIZE_32K ,
@@ -926,6 +935,13 @@ const struct iwl_cfg iwl_cfg_bz_a0_fm_a0 = { .num_rbds = IWL_NUM_RBDS_AX210_HE, }; +const struct iwl_cfg iwl_cfg_bz_a0_fm4_a0 = { + .fw_name_pre =IWL_BZ_A_FM4_A_FW_PRE , + .uhb_supported = true, +IWL_DEVICE_BZ , + .num_rbds =IWL_NUM_RBDS_AX210_HE , +}; +const struct iwl_cfg iwl_cfg_gl_a0_fm_a0 = { .fw_name_pre =IWL_GL_A_FM_A_FW_PRE , .uhb_supported = true,
@@ -933,6 +949,13 @@ const struct iwl_cfg iwl_cfg_gl_a0_fm_a0 = { .num_rbds = IWL_NUM_RBDS_AX210_HE, }; +const struct iwl_cfg iwl_cfg_gl_b0_fm_b0 = { + .fw_name_pre =IWL_GL_B_FM_B_FW_PRE , + .uhb_supported = true, +IWL_DEVICE_BZ , + .num_rbds =IWL_NUM_RBDS_AX210_HE , +}; +const struct iwl_cfg iwl_cfg_bz_z0_gf_a0 = { .fw_name_pre =IWL_BZ_Z_GF_A_FW_PRE , .uhb_supported = true,
@@ -974,6 +997,13 @@ const struct iwl_cfg iwl_cfg_bnj_a0_hr_b0 = { IWL_DEVICE_BZ, .num_rbds = IWL_NUM_RBDS_AX210_HE, }; + +const struct iwl_cfg iwl_cfg_bnj_b0_fm_b0 = { + .fw_name_pre =IWL_BNJ_B_FM_B_FW_PRE , + .uhb_supported = true, +IWL_DEVICE_BZ , + .num_rbds =IWL_NUM_RBDS_AX210_HE , +};MODULE_FIRMWARE (IWL_QU_B_HR_B_MODULE_FIRMWARE (IWL_22000_UCODE_API_MAX ));MODULE_FIRMWARE (IWL_QNJ_B_HR_B_MODULE_FIRMWARE (IWL_22000_UCODE_API_MAX ));MODULE_FIRMWARE (IWL_QU_C_HR_B_MODULE_FIRMWARE (IWL_22000_UCODE_API_MAX ));
@@ -1007,3 +1037,6 @@ MODULE_FIRMWARE(IWL_BNJ_A_FM4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));MODULE_FIRMWARE (IWL_BNJ_A_GF_A_MODULE_FIRMWARE (IWL_22000_UCODE_API_MAX ));MODULE_FIRMWARE (IWL_BNJ_A_GF4_A_MODULE_FIRMWARE (IWL_22000_UCODE_API_MAX ));MODULE_FIRMWARE (IWL_BNJ_A_HR_B_MODULE_FIRMWARE (IWL_22000_UCODE_API_MAX )); +MODULE_FIRMWARE (IWL_BZ_A_FM4_A_MODULE_FIRMWARE (IWL_22000_UCODE_API_MAX )); +MODULE_FIRMWARE (IWL_GL_B_FM_B_MODULE_FIRMWARE (IWL_22000_UCODE_API_MAX )); +MODULE_FIRMWARE (IWL_BNJ_B_FM_B_MODULE_FIRMWARE (IWL_22000_UCODE_API_MAX ));
drivers/net/wireless/intel/iwlwifi/iwl-config.h +3 -0
@@ -649,13 +649,16 @@ extern const struct iwl_cfg iwl_cfg_bz_a0_gf_a0;extern const struct iwl_cfg iwl_cfg_bz_a0_gf4_a0;extern const struct iwl_cfg iwl_cfg_bz_a0_mr_a0;extern const struct iwl_cfg iwl_cfg_bz_a0_fm_a0; +extern const struct iwl_cfg iwl_cfg_bz_a0_fm4_a0;extern const struct iwl_cfg iwl_cfg_gl_a0_fm_a0; +extern const struct iwl_cfg iwl_cfg_gl_b0_fm_b0;extern const struct iwl_cfg iwl_cfg_bz_z0_gf_a0;extern const struct iwl_cfg iwl_cfg_bnj_a0_fm_a0;extern const struct iwl_cfg iwl_cfg_bnj_a0_fm4_a0;extern const struct iwl_cfg iwl_cfg_bnj_a0_gf_a0;extern const struct iwl_cfg iwl_cfg_bnj_a0_gf4_a0;extern const struct iwl_cfg iwl_cfg_bnj_a0_hr_b0; +extern const struct iwl_cfg iwl_cfg_bnj_b0_fm_b0;#endif /* CONFIG_IWLMVM */ #endif /* __IWL_CONFIG_H__ */
drivers/net/wireless/intel/iwlwifi/pcie/drv.c +17 -2
@@ -1155,10 +1155,20 @@ static const struct iwl_dev_info iwl_dev_info_table[] = { IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY, iwl_cfg_bz_a0_fm_a0, iwl_bz_name),_IWL_DEV_INFO (IWL_CFG_ANY ,IWL_CFG_ANY , -IWL_CFG_MAC_TYPE_GL ,IWL_CFG_ANY , +IWL_CFG_MAC_TYPE_BZ ,IWL_CFG_ANY , +IWL_CFG_RF_TYPE_FM ,IWL_CFG_ANY , +IWL_CFG_ANY ,IWL_CFG_ANY ,IWL_CFG_CDB ,IWL_CFG_NO_JACKET , + iwl_cfg_bz_a0_fm4_a0, iwl_bz_name), +_IWL_DEV_INFO (IWL_CFG_ANY ,IWL_CFG_ANY , +IWL_CFG_MAC_TYPE_GL ,SILICON_A_STEP ,IWL_CFG_RF_TYPE_FM ,IWL_CFG_ANY ,IWL_CFG_ANY ,IWL_CFG_ANY ,IWL_CFG_NO_CDB ,IWL_CFG_NO_JACKET , iwl_cfg_gl_a0_fm_a0, iwl_bz_name), +_IWL_DEV_INFO (IWL_CFG_ANY ,IWL_CFG_ANY , +IWL_CFG_MAC_TYPE_GL ,SILICON_B_STEP , +IWL_CFG_RF_TYPE_FM ,IWL_CFG_ANY , +IWL_CFG_ANY ,IWL_CFG_ANY ,IWL_CFG_NO_CDB ,IWL_CFG_NO_JACKET , + iwl_cfg_gl_b0_fm_b0, iwl_bz_name),/* BZ Z step */ _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
@@ -1169,10 +1179,15 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {/* BNJ */ _IWL_DEV_INFO (IWL_CFG_ANY ,IWL_CFG_ANY , -IWL_CFG_MAC_TYPE_GL ,IWL_CFG_ANY , +IWL_CFG_MAC_TYPE_GL ,SILICON_A_STEP ,IWL_CFG_RF_TYPE_FM ,IWL_CFG_ANY ,IWL_CFG_ANY ,IWL_CFG_ANY ,IWL_CFG_NO_CDB ,IWL_CFG_IS_JACKET , iwl_cfg_bnj_a0_fm_a0, iwl_bz_name), +_IWL_DEV_INFO (IWL_CFG_ANY ,IWL_CFG_ANY , +IWL_CFG_MAC_TYPE_GL ,SILICON_B_STEP , +IWL_CFG_RF_TYPE_FM ,IWL_CFG_ANY , +IWL_CFG_ANY ,IWL_CFG_ANY ,IWL_CFG_NO_CDB ,IWL_CFG_IS_JACKET , + iwl_cfg_bnj_b0_fm_b0, iwl_bz_name), _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY, IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY,
Signature · 1 line
2.35.3
PATCH 2/15 wifi: iwlwifi: mvm: fix typo in struct iwl_rx_no_data API
In reply to [email protected]From: Johannes Berg <[email protected]>
The version 2 is also for RX, of course, that's just a typo.
--- drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/api/rx.h +2 -2
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* -* Copyright (C) 2012-2014, 2018-2021 Intel Corporation +* Copyright (C) 2012-2014, 2018-2022 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2015-2017 Intel Deutschland GmbH */
@@ -668,7 +668,7 @@ struct iwl_rx_no_data {__le32 phy_info[2 ];__le32 rx_vec[2 ]; } __packed;/* RX_NO_DATA_NTFY_API_S_VER_1, -TX_NO_DATA_NTFY_API_S_VER_2 */ +RX_NO_DATA_NTFY_API_S_VER_2 */ struct iwl_frame_release {u8 baid;
Signature · 1 line
2.35.3
PATCH 3/15 wifi: iwlwifi: mvm: rxmq: refactor mac80211 rx_status setting
In reply to [email protected]From: Johannes Berg <[email protected]>
There's a bunch of duplicated code in the normal data RX and the no-data RX paths, refactor that.
Note that we're evidently not implementing the 6 GHz band in the no-data path correctly, need to fix that in firmware first. Also, we were setting the NSS differently, keep doing that, but just override the previous values.
Note also that we used to drop frames with bad rate data, to simplify that just report rate 0 and continue.
--- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 356 ++++++++---------- 1 file changed, 165 insertions(+), 191 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +165 -191
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* -* Copyright (C) 2012-2014, 2018-2021 Intel Corporation +* Copyright (C) 2012-2014, 2018-2022 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2015-2017 Intel Deutschland GmbH */
@@ -1191,16 +1191,22 @@ struct iwl_mvm_rx_phy_data {enum iwl_rx_phy_info_type info_type;__le32 d0, d1, d2, d3;__le16 d4; + +u32 rate_n_flags; +u32 gp2_on_air_rise; +u16 phy_info; +u8 energy_a, energy_b; +u8 channel; };static void iwl_mvm_decode_he_mu_ext (struct iwl_mvm *mvm,struct iwl_mvm_rx_phy_data *phy_data, -u32 rate_n_flags,struct ieee80211_radiotap_he_mu *he_mu) {u32 phy_data2 =le32_to_cpu (phy_data->d2);u32 phy_data3 =le32_to_cpu (phy_data->d3);u16 phy_data4 =le16_to_cpu (phy_data->d4); +u32 rate_n_flags = phy_data->rate_n_flags;if (FIELD_GET (IWL_RX_PHY_DATA4_HE_MU_EXT_CH1_CRC_OK , phy_data4)) { he_mu->flags1 |=
@@ -1246,7 +1252,6 @@ static void iwl_mvm_decode_he_mu_ext(struct iwl_mvm *mvm,static void iwl_mvm_decode_he_phy_ru_alloc (struct iwl_mvm_rx_phy_data *phy_data, -u32 rate_n_flags,struct ieee80211_radiotap_he *he,struct ieee80211_radiotap_he_mu *he_mu,struct ieee80211_rx_status *rx_status)
@@ -1260,6 +1265,7 @@ iwl_mvm_decode_he_phy_ru_alloc(struct iwl_mvm_rx_phy_data *phy_data,* the TSF/timers are not be transmitted in HE-MU. */ u8 ru =le32_get_bits (phy_data->d1,IWL_RX_PHY_DATA1_HE_RU_ALLOC_MASK ); +u32 rate_n_flags = phy_data->rate_n_flags;u32 he_type = rate_n_flags &RATE_MCS_HE_TYPE_MSK_V1 ;u8 offs =0 ;
@@ -1331,7 +1337,7 @@ static void iwl_mvm_decode_he_phy_data(struct iwl_mvm *mvm, struct ieee80211_radiotap_he *he, struct ieee80211_radiotap_he_mu *he_mu, struct ieee80211_rx_status *rx_status, - u32 rate_n_flags, int queue) + int queue) { switch (phy_data->info_type) { case IWL_RX_PHY_INFO_TYPE_NONE:
@@ -1430,7 +1436,7 @@ static void iwl_mvm_decode_he_phy_data(struct iwl_mvm *mvm,le16_encode_bits (le16_get_bits (phy_data->d4,IWL_RX_PHY_DATA4_HE_MU_EXT_PREAMBLE_PUNC_TYPE_MASK ),IEEE80211_RADIOTAP_HE_MU_FLAGS2_PUNC_FROM_SIG_A_BW ); -iwl_mvm_decode_he_mu_ext (mvm, phy_data, rate_n_flags, he_mu); +iwl_mvm_decode_he_mu_ext (mvm, phy_data, he_mu); fallthrough;case IWL_RX_PHY_INFO_TYPE_HE_MU : he_mu->flags2 |=
@@ -1444,8 +1450,7 @@ static void iwl_mvm_decode_he_phy_data(struct iwl_mvm *mvm, fallthrough;case IWL_RX_PHY_INFO_TYPE_HE_TB :case IWL_RX_PHY_INFO_TYPE_HE_TB_EXT : -iwl_mvm_decode_he_phy_ru_alloc (phy_data, rate_n_flags, - he, he_mu, rx_status); +iwl_mvm_decode_he_phy_ru_alloc (phy_data, he, he_mu, rx_status);break ;case IWL_RX_PHY_INFO_TYPE_HE_SU : he->data1 |=cpu_to_le16 (IEEE80211_RADIOTAP_HE_DATA1_BEAM_CHANGE_KNOWN );
@@ -1461,11 +1466,12 @@ static void iwl_mvm_decode_he_phy_data(struct iwl_mvm *mvm,static void iwl_mvm_rx_he (struct iwl_mvm *mvm,struct sk_buff *skb,struct iwl_mvm_rx_phy_data *phy_data, -u32 rate_n_flags,u16 phy_info,int queue) +int queue) {struct ieee80211_rx_status *rx_status =IEEE80211_SKB_RXCB (skb);struct ieee80211_radiotap_he *he =NULL ;struct ieee80211_radiotap_he_mu *he_mu =NULL ; +u32 rate_n_flags = phy_data->rate_n_flags;u32 he_type = rate_n_flags &RATE_MCS_HE_TYPE_MSK ;u8 stbc, ltf;static const struct ieee80211_radiotap_he known = {
@@ -1484,6 +1490,7 @@ static void iwl_mvm_rx_he(struct iwl_mvm *mvm, struct sk_buff *skb, .flags2 = cpu_to_le16(IEEE80211_RADIOTAP_HE_MU_FLAGS2_PUNC_FROM_SIG_A_BW_KNOWN | IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW_KNOWN), }; +u16 phy_info = phy_data->phy_info; he =skb_put_data (skb, &known,sizeof (known)); rx_status->flag |=RX_FLAG_RADIOTAP_HE ;
@@ -1504,7 +1511,7 @@ static void iwl_mvm_rx_he(struct iwl_mvm *mvm, struct sk_buff *skb,if (phy_info &IWL_RX_MPDU_PHY_TSF_OVERLOAD )iwl_mvm_decode_he_phy_data (mvm, phy_data, he, he_mu, rx_status, - rate_n_flags, queue); + queue);/* update aggregation data for monitor sake on default queue */ if (!queue && (phy_info & IWL_RX_MPDU_PHY_TSF_OVERLOAD) &&
@@ -1661,6 +1668,102 @@ static void iwl_mvm_rx_get_sta_block_tx(void *data, struct ieee80211_sta *sta) rx_sta_csa->all_sta_unblocked = false; } +/* +* Note: requires also rx_status->band to be prefilled, as well +* as phy_data (apart from phy_data->info_type) +*/ +static void iwl_mvm_rx_fill_status (struct iwl_mvm *mvm, +struct sk_buff *skb, +struct iwl_mvm_rx_phy_data *phy_data, +int queue) +{ +struct ieee80211_rx_status *rx_status =IEEE80211_SKB_RXCB (skb); +u32 rate_n_flags = phy_data->rate_n_flags; +u8 stbc =u32_get_bits (rate_n_flags,RATE_MCS_STBC_MSK ); +u32 format = rate_n_flags &RATE_MCS_MOD_TYPE_MSK ; +bool is_sgi; + + phy_data->info_type =IWL_RX_PHY_INFO_TYPE_NONE ; + +if (phy_data->phy_info &IWL_RX_MPDU_PHY_TSF_OVERLOAD ) + phy_data->info_type = +le32_get_bits (phy_data->d1, +IWL_RX_PHY_DATA1_INFO_TYPE_MASK ); + +/* This may be overridden by iwl_mvm_rx_he() to HE_RU */ +switch (rate_n_flags &RATE_MCS_CHAN_WIDTH_MSK ) { +case RATE_MCS_CHAN_WIDTH_20 : +break ; +case RATE_MCS_CHAN_WIDTH_40 : + rx_status->bw =RATE_INFO_BW_40 ; +break ; +case RATE_MCS_CHAN_WIDTH_80 : + rx_status->bw =RATE_INFO_BW_80 ; +break ; +case RATE_MCS_CHAN_WIDTH_160 : + rx_status->bw =RATE_INFO_BW_160 ; +break ; + } + +/* must be before L-SIG data */ +if (format ==RATE_MCS_HE_MSK ) +iwl_mvm_rx_he (mvm, skb, phy_data, queue); + +iwl_mvm_decode_lsig (skb, phy_data); + + rx_status->device_timestamp = phy_data->gp2_on_air_rise; + rx_status->freq =ieee80211_channel_to_frequency (phy_data->channel, + rx_status->band); +iwl_mvm_get_signal_strength (mvm, rx_status, rate_n_flags, + phy_data->energy_a, phy_data->energy_b); + +if (unlikely (mvm->monitor_on)) +iwl_mvm_add_rtap_sniffer_config (mvm, skb); + + is_sgi = format ==RATE_MCS_HE_MSK ? +iwl_he_is_sgi (rate_n_flags) : + rate_n_flags &RATE_MCS_SGI_MSK ; + +if (!(format ==RATE_MCS_CCK_MSK ) && is_sgi) + rx_status->enc_flags |=RX_ENC_FLAG_SHORT_GI ; + +if (rate_n_flags &RATE_MCS_LDPC_MSK ) + rx_status->enc_flags |=RX_ENC_FLAG_LDPC ; + +switch (format) { +case RATE_MCS_HT_MSK : + rx_status->encoding =RX_ENC_HT ; + rx_status->rate_idx =RATE_HT_MCS_INDEX (rate_n_flags); + rx_status->enc_flags |= stbc <<RX_ENC_FLAG_STBC_SHIFT ; +break ; +case RATE_MCS_VHT_MSK : + rx_status->nss = + ((rate_n_flags &RATE_MCS_NSS_MSK ) >> +RATE_MCS_NSS_POS ) +1 ; + rx_status->rate_idx = rate_n_flags &RATE_MCS_CODE_MSK ; + rx_status->encoding =RX_ENC_VHT ; + rx_status->enc_flags |= stbc <<RX_ENC_FLAG_STBC_SHIFT ; +if (rate_n_flags &RATE_MCS_BF_MSK ) + rx_status->enc_flags |=RX_ENC_FLAG_BF ; +break ; +case RATE_MCS_HE_MSK : +/* handled above */ +break ; +default : { +int rate =iwl_mvm_legacy_hw_idx_to_mac80211_idx (rate_n_flags, + rx_status->band); + + rx_status->rate_idx = rate; + +if (WARN_ONCE (rate <0 || rate >0xFF , +"Invalid rate flags 0x%x, band %d,\n" , + rate_n_flags, rx_status->band)) + rx_status->rate_idx =0 ; +break ; + } + } +} +void iwl_mvm_rx_mpdu_mq (struct iwl_mvm *mvm,struct napi_struct *napi,struct iwl_rx_cmd_buffer *rxb,int queue) {
@@ -1670,17 +1773,12 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,struct ieee80211_hdr *hdr;u32 len;u32 pkt_len =iwl_rx_packet_payload_len (pkt); -u32 rate_n_flags, gp2_on_air_rise; -u16 phy_info;struct ieee80211_sta *sta =NULL ;struct sk_buff *skb; -u8 crypt_len =0 , channel, energy_a, energy_b; +u8 crypt_len =0 ;size_t desc_size; -struct iwl_mvm_rx_phy_data phy_data = { - .info_type =IWL_RX_PHY_INFO_TYPE_NONE , - }; +struct iwl_mvm_rx_phy_data phy_data = {};u32 format; -bool is_sgi;if (unlikely (test_bit (IWL_MVM_STATUS_IN_HW_RESTART , &mvm->status)))return ;
@@ -1696,35 +1794,37 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, }if (mvm->trans->trans_cfg->device_family >=IWL_DEVICE_FAMILY_AX210 ) { - rate_n_flags =le32_to_cpu (desc->v3.rate_n_flags); - channel = desc->v3.channel; - gp2_on_air_rise =le32_to_cpu (desc->v3.gp2_on_air_rise); - energy_a = desc->v3.energy_a; - energy_b = desc->v3.energy_b; + phy_data.rate_n_flags =le32_to_cpu (desc->v3.rate_n_flags); + phy_data.channel = desc->v3.channel; + phy_data.gp2_on_air_rise =le32_to_cpu (desc->v3.gp2_on_air_rise); + phy_data.energy_a = desc->v3.energy_a; + phy_data.energy_b = desc->v3.energy_b; phy_data.d0 = desc->v3.phy_data0; phy_data.d1 = desc->v3.phy_data1; phy_data.d2 = desc->v3.phy_data2; phy_data.d3 = desc->v3.phy_data3; }else { - rate_n_flags =le32_to_cpu (desc->v1.rate_n_flags); - channel = desc->v1.channel; - gp2_on_air_rise =le32_to_cpu (desc->v1.gp2_on_air_rise); - energy_a = desc->v1.energy_a; - energy_b = desc->v1.energy_b; + phy_data.rate_n_flags =le32_to_cpu (desc->v1.rate_n_flags); + phy_data.channel = desc->v1.channel; + phy_data.gp2_on_air_rise =le32_to_cpu (desc->v1.gp2_on_air_rise); + phy_data.energy_a = desc->v1.energy_a; + phy_data.energy_b = desc->v1.energy_b; phy_data.d0 = desc->v1.phy_data0; phy_data.d1 = desc->v1.phy_data1; phy_data.d2 = desc->v1.phy_data2; phy_data.d3 = desc->v1.phy_data3; } +if (iwl_fw_lookup_notif_ver (mvm->fw,LEGACY_GROUP ,REPLY_RX_MPDU_CMD ,0 ) <4 ) { - rate_n_flags =iwl_new_rate_from_v1 (rate_n_flags); + phy_data.rate_n_flags =iwl_new_rate_from_v1 (phy_data.rate_n_flags);IWL_DEBUG_DROP (mvm,"Got old format rate, converting. New rate: 0x%x\n" , - rate_n_flags); + phy_data.rate_n_flags); } - format = rate_n_flags &RATE_MCS_MOD_TYPE_MSK ; + + format = phy_data.rate_n_flags &RATE_MCS_MOD_TYPE_MSK ; len =le16_to_cpu (desc->mpdu_len);
@@ -1733,14 +1833,9 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,return ; } - phy_info =le16_to_cpu (desc->phy_info); + phy_data.phy_info =le16_to_cpu (desc->phy_info); phy_data.d4 = desc->phy_data4; -if (phy_info &IWL_RX_MPDU_PHY_TSF_OVERLOAD ) - phy_data.info_type = -le32_get_bits (phy_data.d1, -IWL_RX_PHY_DATA1_INFO_TYPE_MASK ); - hdr = (void *)(pkt->data + desc_size);/* Dont use dev_alloc_skb(), we'll have enough headroom once * ieee80211_hdr pulled.
@@ -1763,27 +1858,6 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, rx_status =IEEE80211_SKB_RXCB (skb); -/* This may be overridden by iwl_mvm_rx_he() to HE_RU */ -switch (rate_n_flags &RATE_MCS_CHAN_WIDTH_MSK ) { -case RATE_MCS_CHAN_WIDTH_20 : -break ; -case RATE_MCS_CHAN_WIDTH_40 : - rx_status->bw =RATE_INFO_BW_40 ; -break ; -case RATE_MCS_CHAN_WIDTH_80 : - rx_status->bw =RATE_INFO_BW_80 ; -break ; -case RATE_MCS_CHAN_WIDTH_160 : - rx_status->bw =RATE_INFO_BW_160 ; -break ; - } - -if (format ==RATE_MCS_HE_MSK ) -iwl_mvm_rx_he (mvm, skb, &phy_data, rate_n_flags, - phy_info, queue); - -iwl_mvm_decode_lsig (skb, &phy_data); -/* * Keep packets with CRC errors (and with overrun) for monitor mode * (otherwise the firmware discards them) but mark them as bad.
@@ -1794,12 +1868,13 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, le32_to_cpu(desc->status)); rx_status->flag |=RX_FLAG_FAILED_FCS_CRC ; } +/* set the preamble flag if appropriate */ if (format ==RATE_MCS_CCK_MSK && - phy_info &IWL_RX_MPDU_PHY_SHORT_PREAMBLE ) + phy_data.phy_info &IWL_RX_MPDU_PHY_SHORT_PREAMBLE ) rx_status->enc_flags |=RX_ENC_FLAG_SHORTPRE ; -if (likely (!(phy_info &IWL_RX_MPDU_PHY_TSF_OVERLOAD ))) { +if (likely (!(phy_data.phy_info &IWL_RX_MPDU_PHY_TSF_OVERLOAD ))) {u64 tsf_on_air_rise; if (mvm->trans->trans_cfg->device_family >=
@@ -1813,24 +1888,20 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, rx_status->flag |=RX_FLAG_MACTIME_PLCP_START ; } - rx_status->device_timestamp = gp2_on_air_rise;if (iwl_mvm_is_band_in_rx_supported (mvm)) {u8 band =BAND_IN_RX_STATUS (desc->mac_phy_idx); rx_status->band =iwl_mvm_nl80211_band_from_rx_msdu (band); }else { - rx_status->band = channel >14 ?NL80211_BAND_5GHZ : + rx_status->band = phy_data.channel >14 ?NL80211_BAND_5GHZ :NL80211_BAND_2GHZ ; } - rx_status->freq =ieee80211_channel_to_frequency (channel, - rx_status->band); -iwl_mvm_get_signal_strength (mvm, rx_status, rate_n_flags, energy_a, - energy_b);/* update aggregation data for monitor sake on default queue */ -if (!queue && (phy_info &IWL_RX_MPDU_PHY_AMPDU )) { -bool toggle_bit = phy_info &IWL_RX_MPDU_PHY_AMPDU_TOGGLE ; +if (!queue && (phy_data.phy_info &IWL_RX_MPDU_PHY_AMPDU )) { +bool toggle_bit; + toggle_bit = phy_data.phy_info &IWL_RX_MPDU_PHY_AMPDU_TOGGLE ; rx_status->flag |=RX_FLAG_AMPDU_DETAILS ;/* * Toggle is switched whenever new aggregation starts. Make
@@ -1846,9 +1917,6 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, rx_status->ampdu_reference = mvm->ampdu_ref; } -if (unlikely (mvm->monitor_on)) -iwl_mvm_add_rtap_sniffer_config (mvm, skb); -rcu_read_lock ();if (desc->status &cpu_to_le32 (IWL_RX_MPDU_STATUS_SRC_STA_FOUND )) {
@@ -1867,13 +1935,15 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, sta =ieee80211_find_sta_by_ifaddr (mvm->hw, hdr->addr2,NULL ); } -if (iwl_mvm_rx_crypto (mvm, sta, hdr, rx_status, phy_info, desc, +if (iwl_mvm_rx_crypto (mvm, sta, hdr, rx_status, phy_data.phy_info, desc,le32_to_cpu (pkt->len_n_flags), queue, &crypt_len)) {kfree_skb (skb); goto out; } +iwl_mvm_rx_fill_status (mvm, skb, &phy_data, queue); +if (sta) {struct iwl_mvm_sta *mvmsta =iwl_mvm_sta_from_mac80211 (sta); struct ieee80211_vif *tx_blocked_vif =
@@ -1971,43 +2041,6 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, } } - is_sgi = format ==RATE_MCS_HE_MSK ? -iwl_he_is_sgi (rate_n_flags) : - rate_n_flags &RATE_MCS_SGI_MSK ; - -if (!(format ==RATE_MCS_CCK_MSK ) && is_sgi) - rx_status->enc_flags |=RX_ENC_FLAG_SHORT_GI ; -if (rate_n_flags &RATE_MCS_LDPC_MSK ) - rx_status->enc_flags |=RX_ENC_FLAG_LDPC ; -if (format ==RATE_MCS_HT_MSK ) { -u8 stbc = (rate_n_flags &RATE_MCS_STBC_MSK ) >> -RATE_MCS_STBC_POS ; - rx_status->encoding =RX_ENC_HT ; - rx_status->rate_idx =RATE_HT_MCS_INDEX (rate_n_flags); - rx_status->enc_flags |= stbc <<RX_ENC_FLAG_STBC_SHIFT ; - }else if (format ==RATE_MCS_VHT_MSK ) { -u8 stbc = (rate_n_flags &RATE_MCS_STBC_MSK ) >> -RATE_MCS_STBC_POS ; - rx_status->nss = ((rate_n_flags &RATE_MCS_NSS_MSK ) >> -RATE_MCS_NSS_POS ) +1 ; - rx_status->rate_idx = rate_n_flags &RATE_MCS_CODE_MSK ; - rx_status->encoding =RX_ENC_VHT ; - rx_status->enc_flags |= stbc <<RX_ENC_FLAG_STBC_SHIFT ; -if (rate_n_flags &RATE_MCS_BF_MSK ) - rx_status->enc_flags |=RX_ENC_FLAG_BF ; - }else if (!(format ==RATE_MCS_HE_MSK )) { -int rate =iwl_mvm_legacy_hw_idx_to_mac80211_idx (rate_n_flags, - rx_status->band); - -if (WARN (rate <0 || rate >0xFF , -"Invalid rate flags 0x%x, band %d,\n" , - rate_n_flags, rx_status->band)) { -kfree_skb (skb); - goto out; - } - rx_status->rate_idx = rate; - } -/* management stuff on default queue */ if (!queue) { if (unlikely((ieee80211_is_beacon(hdr->frame_control) ||
@@ -2039,32 +2072,32 @@ void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi,struct ieee80211_rx_status *rx_status;struct iwl_rx_packet *pkt =rxb_addr (rxb);struct iwl_rx_no_data *desc = (void *)pkt->data; -u32 rate_n_flags =le32_to_cpu (desc->rate); -u32 gp2_on_air_rise =le32_to_cpu (desc->on_air_rise_time);u32 rssi =le32_to_cpu (desc->rssi);u32 info_type =le32_to_cpu (desc->info) &RX_NO_DATA_INFO_TYPE_MSK ; -u16 phy_info =IWL_RX_MPDU_PHY_TSF_OVERLOAD ;struct ieee80211_sta *sta =NULL ;struct sk_buff *skb; -u8 channel, energy_a, energy_b; -u32 format;struct iwl_mvm_rx_phy_data phy_data = { - .info_type =le32_get_bits (desc->phy_info[1 ], -IWL_RX_PHY_DATA1_INFO_TYPE_MASK ), .d0 = desc->phy_info[0 ], .d1 = desc->phy_info[1 ], + .phy_info =IWL_RX_MPDU_PHY_TSF_OVERLOAD , + .gp2_on_air_rise =le32_to_cpu (desc->on_air_rise_time), + .rate_n_flags =le32_to_cpu (desc->rate), + .energy_a =u32_get_bits (rssi,RX_NO_DATA_CHAIN_A_MSK ), + .energy_b =u32_get_bits (rssi,RX_NO_DATA_CHAIN_B_MSK ), + .channel =u32_get_bits (rssi,RX_NO_DATA_CHANNEL_MSK ), }; -bool is_sgi; +u32 format;if (iwl_fw_lookup_notif_ver (mvm->fw,DATA_PATH_GROUP ,RX_NO_DATA_NOTIF ,0 ) <2 ) {IWL_DEBUG_DROP (mvm,"Got an old rate format. Old rate: 0x%x\n" , - rate_n_flags); - rate_n_flags =iwl_new_rate_from_v1 (rate_n_flags); + phy_data.rate_n_flags); + phy_data.rate_n_flags =iwl_new_rate_from_v1 (phy_data.rate_n_flags);IWL_DEBUG_DROP (mvm," Rate after conversion to the new format: 0x%x\n" , - rate_n_flags); + phy_data.rate_n_flags); } - format = rate_n_flags &RATE_MCS_MOD_TYPE_MSK ; + + format = phy_data.rate_n_flags &RATE_MCS_MOD_TYPE_MSK ;if (unlikely (iwl_rx_packet_payload_len (pkt) <sizeof (*desc)))return ;
@@ -2072,10 +2105,6 @@ void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi,if (unlikely (test_bit (IWL_MVM_STATUS_IN_HW_RESTART , &mvm->status)))return ; - energy_a = (rssi &RX_NO_DATA_CHAIN_A_MSK ) >>RX_NO_DATA_CHAIN_A_POS ; - energy_b = (rssi &RX_NO_DATA_CHAIN_B_MSK ) >>RX_NO_DATA_CHAIN_B_POS ; - channel = (rssi &RX_NO_DATA_CHANNEL_MSK ) >>RX_NO_DATA_CHANNEL_POS ; -/* Dont use dev_alloc_skb(), we'll have enough headroom once * ieee80211_hdr pulled. */
@@ -2106,86 +2135,31 @@ void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi,break ; } -/* This may be overridden by iwl_mvm_rx_he() to HE_RU */ -switch (rate_n_flags &RATE_MCS_CHAN_WIDTH_MSK ) { -case RATE_MCS_CHAN_WIDTH_20 : -break ; -case RATE_MCS_CHAN_WIDTH_40 : - rx_status->bw =RATE_INFO_BW_40 ; -break ; -case RATE_MCS_CHAN_WIDTH_80 : - rx_status->bw =RATE_INFO_BW_80 ; -break ; -case RATE_MCS_CHAN_WIDTH_160 : - rx_status->bw =RATE_INFO_BW_160 ; -break ; - } - -if (format ==RATE_MCS_HE_MSK ) -iwl_mvm_rx_he (mvm, skb, &phy_data, rate_n_flags, - phy_info, queue); - -iwl_mvm_decode_lsig (skb, &phy_data); - - rx_status->device_timestamp = gp2_on_air_rise; - rx_status->band = channel >14 ?NL80211_BAND_5GHZ : + rx_status->band = phy_data.channel >14 ?NL80211_BAND_5GHZ :NL80211_BAND_2GHZ ; - rx_status->freq =ieee80211_channel_to_frequency (channel, - rx_status->band); -iwl_mvm_get_signal_strength (mvm, rx_status, rate_n_flags, energy_a, - energy_b); - -rcu_read_lock (); - is_sgi = format ==RATE_MCS_HE_MSK ? -iwl_he_is_sgi (rate_n_flags) : - rate_n_flags &RATE_MCS_SGI_MSK ; +iwl_mvm_rx_fill_status (mvm, skb, &phy_data, queue); -if (!(format ==RATE_MCS_CCK_MSK ) && is_sgi) - rx_status->enc_flags |=RX_ENC_FLAG_SHORT_GI ; -if (rate_n_flags &RATE_MCS_LDPC_MSK ) - rx_status->enc_flags |=RX_ENC_FLAG_LDPC ; -if (format ==RATE_MCS_HT_MSK ) { -u8 stbc = (rate_n_flags &RATE_MCS_STBC_MSK ) >> -RATE_MCS_STBC_POS ; - rx_status->encoding =RX_ENC_HT ; - rx_status->rate_idx =RATE_HT_MCS_INDEX (rate_n_flags); - rx_status->enc_flags |= stbc <<RX_ENC_FLAG_STBC_SHIFT ; - }else if (format ==RATE_MCS_VHT_MSK ) { -u8 stbc = (rate_n_flags &RATE_MCS_STBC_MSK ) >> -RATE_MCS_STBC_POS ; - rx_status->rate_idx = rate_n_flags &RATE_MCS_CODE_MSK ; - rx_status->encoding =RX_ENC_VHT ; - rx_status->enc_flags |= stbc <<RX_ENC_FLAG_STBC_SHIFT ; -if (rate_n_flags &RATE_MCS_BF_MSK ) - rx_status->enc_flags |=RX_ENC_FLAG_BF ; -/* -* take the nss from the rx_vec since the rate_n_flags has -* only 2 bits for the nss which gives a max of 4 ss but -* there may be up to 8 spatial streams -*/ +/* +* Override the nss from the rx_vec since the rate_n_flags has +* only 2 bits for the nss which gives a max of 4 ss but there +* may be up to 8 spatial streams. +*/ +switch (format) { +case RATE_MCS_VHT_MSK : rx_status->nss =le32_get_bits (desc->rx_vec[0 ],RX_NO_DATA_RX_VEC0_VHT_NSTS_MSK ) +1 ; - }else if (format ==RATE_MCS_HE_MSK ) { +break ; +case RATE_MCS_HE_MSK : rx_status->nss =le32_get_bits (desc->rx_vec[0 ],RX_NO_DATA_RX_VEC0_HE_NSTS_MSK ) +1 ; - }else { -int rate =iwl_mvm_legacy_hw_idx_to_mac80211_idx (rate_n_flags, - rx_status->band); - -if (WARN (rate <0 || rate >0xFF , -"Invalid rate flags 0x%x, band %d,\n" , - rate_n_flags, rx_status->band)) { -kfree_skb (skb); - goto out; - } - rx_status->rate_idx = rate; +break ; } +rcu_read_lock ();ieee80211_rx_napi (mvm->hw, sta, skb, napi); -out:rcu_read_unlock (); }
Signature · 1 line
2.35.3
PATCH 4/15 wifi: iwlwifi: mvm: rxmq: further unify some VHT/HE code
In reply to [email protected]From: Johannes Berg <[email protected]>
There's some duplication here, unify it so that adding EHT becomes easier.
--- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 36 ++++++++----------- 1 file changed, 14 insertions(+), 22 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +14 -22
@@ -1473,7 +1473,7 @@ static void iwl_mvm_rx_he(struct iwl_mvm *mvm, struct sk_buff *skb,struct ieee80211_radiotap_he_mu *he_mu =NULL ;u32 rate_n_flags = phy_data->rate_n_flags;u32 he_type = rate_n_flags &RATE_MCS_HE_TYPE_MSK ; -u8 stbc, ltf; +u8 ltf;static const struct ieee80211_radiotap_he known = { .data1 = cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_DATA_MCS_KNOWN | IEEE80211_RADIOTAP_HE_DATA1_DATA_DCM_KNOWN |
@@ -1538,19 +1538,6 @@ static void iwl_mvm_rx_he(struct iwl_mvm *mvm, struct sk_buff *skb, he->data1 |=cpu_to_le16 (IEEE80211_RADIOTAP_HE_DATA1_BW_RU_ALLOC_KNOWN ); - stbc = (rate_n_flags &RATE_MCS_STBC_MSK ) >>RATE_MCS_STBC_POS ; - rx_status->nss = - ((rate_n_flags &RATE_MCS_NSS_MSK ) >> -RATE_MCS_NSS_POS ) +1 ; - rx_status->rate_idx = rate_n_flags &RATE_MCS_CODE_MSK ; - rx_status->encoding =RX_ENC_HE ; - rx_status->enc_flags |= stbc <<RX_ENC_FLAG_STBC_SHIFT ; -if (rate_n_flags &RATE_MCS_BF_MSK ) - rx_status->enc_flags |=RX_ENC_FLAG_BF ; - - rx_status->he_dcm = - !!(rate_n_flags &RATE_HE_DUAL_CARRIER_MODE_MSK ); -#define CHECK_TYPE (F ) \ BUILD_BUG_ON(IEEE80211_RADIOTAP_HE_DATA1_FORMAT_ ## F != \ (RATE_MCS_HE_TYPE_ ## F >> RATE_MCS_HE_TYPE_POS))
@@ -1730,6 +1717,17 @@ static void iwl_mvm_rx_fill_status(struct iwl_mvm *mvm,if (rate_n_flags &RATE_MCS_LDPC_MSK ) rx_status->enc_flags |=RX_ENC_FLAG_LDPC ; +switch (format) { +case RATE_MCS_VHT_MSK : + rx_status->encoding =RX_ENC_VHT ; +break ; +case RATE_MCS_HE_MSK : + rx_status->encoding =RX_ENC_HE ; + rx_status->he_dcm = + !!(rate_n_flags &RATE_HE_DUAL_CARRIER_MODE_MSK ); +break ; + } +switch (format) {case RATE_MCS_HT_MSK : rx_status->encoding =RX_ENC_HT ;
@@ -1737,17 +1735,11 @@ static void iwl_mvm_rx_fill_status(struct iwl_mvm *mvm, rx_status->enc_flags |= stbc <<RX_ENC_FLAG_STBC_SHIFT ;break ;case RATE_MCS_VHT_MSK : +case RATE_MCS_HE_MSK : rx_status->nss = - ((rate_n_flags &RATE_MCS_NSS_MSK ) >> -RATE_MCS_NSS_POS ) +1 ; +u32_get_bits (rate_n_flags,RATE_MCS_NSS_MSK ) +1 ; rx_status->rate_idx = rate_n_flags &RATE_MCS_CODE_MSK ; - rx_status->encoding =RX_ENC_VHT ; rx_status->enc_flags |= stbc <<RX_ENC_FLAG_STBC_SHIFT ; -if (rate_n_flags &RATE_MCS_BF_MSK ) - rx_status->enc_flags |=RX_ENC_FLAG_BF ; -break ; -case RATE_MCS_HE_MSK : -/* handled above */ break ;default : { int rate = iwl_mvm_legacy_hw_idx_to_mac80211_idx(rate_n_flags,
Signature · 1 line
2.35.3
PATCH 5/15 wifi: iwlwifi: mvm: refactor iwl_mvm_set_sta_rate() a bit
In reply to [email protected]From: Johannes Berg <[email protected]>
Use a switch statement over the rate type instead of the if chain, to simplify.
--- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +12 -13
@@ -4949,6 +4949,7 @@ static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx,static void iwl_mvm_set_sta_rate (u32 rate_n_flags,struct rate_info *rinfo) {u32 format = rate_n_flags &RATE_MCS_MOD_TYPE_MSK ; +u32 gi_ltf;switch (rate_n_flags &RATE_MCS_CHAN_WIDTH_MSK ) {case RATE_MCS_CHAN_WIDTH_20 :
@@ -5019,9 +5020,12 @@ static void iwl_mvm_set_sta_rate(u32 rate_n_flags, struct rate_info *rinfo) RATE_HT_MCS_INDEX(rate_n_flags) :u32_get_bits (rate_n_flags ,RATE_MCS_CODE_MSK ); -if (format ==RATE_MCS_HE_MSK ) { -u32 gi_ltf =u32_get_bits (rate_n_flags, -RATE_MCS_HE_GI_LTF_MSK ); +if (rate_n_flags &RATE_MCS_SGI_MSK ) + rinfo->flags |=RATE_INFO_FLAGS_SHORT_GI ; + +switch (format) { +case RATE_MCS_HE_MSK : + gi_ltf =u32_get_bits (rate_n_flags,RATE_MCS_HE_GI_LTF_MSK ); rinfo->flags |=RATE_INFO_FLAGS_HE_MCS ;
@@ -5060,19 +5064,14 @@ static void iwl_mvm_set_sta_rate(u32 rate_n_flags, struct rate_info *rinfo)if (rate_n_flags &RATE_HE_DUAL_CARRIER_MODE_MSK ) rinfo->he_dcm =1 ; -return ; - } - -if (rate_n_flags &RATE_MCS_SGI_MSK ) - rinfo->flags |=RATE_INFO_FLAGS_SHORT_GI ; - -if (format ==RATE_MCS_HT_MSK ) { +break ; +case RATE_MCS_HT_MSK : rinfo->flags |=RATE_INFO_FLAGS_MCS ; - - }else if (format ==RATE_MCS_VHT_MSK ) { +break ; +case RATE_MCS_VHT_MSK : rinfo->flags |=RATE_INFO_FLAGS_VHT_MCS ; +break ; } - } static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw,
Signature · 1 line
2.35.3
PATCH 6/15 wifi: iwlwifi: cfg: remove IWL_DEVICE_BZ_COMMON macro
In reply to [email protected]From: Johannes Berg <[email protected]>
We only have a single use of this inside the IWL_DEVICE_BZ macro, so just combine the contents here.
--- drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/net/wireless/intel/iwlwifi/cfg/22000.c +3 -6
@@ -249,7 +249,7 @@ static const struct iwl_ht_params iwl_22000_ht_params = { }, \ } -#define IWL_DEVICE_BZ_COMMON \ +#define IWL_DEVICE_BZ \ .ucode_api_max = IWL_22000_UCODE_API_MAX, \ .ucode_api_min = IWL_22000_UCODE_API_MIN, \ .led_mode = IWL_LED_RF_STATE, \
@@ -285,16 +285,13 @@ static const struct iwl_ht_params iwl_22000_ht_params = { .addr = LDBG_M2S_BUF_WRAP_CNT, \ .mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \ }, \ - } - -#define IWL_DEVICE_BZ \ - IWL_DEVICE_BZ_COMMON, \ + }, \ .trans.umac_prph_offset = 0x300000, \ .trans.device_family = IWL_DEVICE_FAMILY_BZ, \ .trans.base_params = &iwl_ax210_base_params, \ .min_txq_size = 128, \ .gp2_reg_addr = 0xd02c68, \ - .min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_EHT, \ + .min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_EHT, \ .mon_dram_regs = { \ .write_ptr = { \ .addr = DBGC_CUR_DBGBUF_STATUS, \
Signature · 1 line
2.35.3
PATCH 7/15 wifi: iwlwifi: mvm: don't check D0I3 version
In reply to [email protected]From: Haim Dreyfuss <[email protected]>
This code is dead, even old FW versions don't use it.
The IWL_D0I3_RESET_REQUIRE flag will be sent by the FW via a notification, instead of command, the notification handler will be introduced later in the series.
--- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 22 -------------------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 7 ------- 3 files changed, 30 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +0 -22
@@ -2551,7 +2551,6 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) .id = D0I3_END_CMD, .flags = CMD_WANT_SKB | CMD_SEND_IN_D3, }; -int len; ret =iwl_mvm_send_cmd (mvm, &cmd);if (ret <0 ) {
@@ -2559,27 +2558,6 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) ret); goto err; } -switch (mvm->cmd_ver.d0i3_resp) { -case 0 : -break ; -case 1 : - len =iwl_rx_packet_payload_len (cmd.resp_pkt); -if (len !=sizeof (u32)) { -IWL_ERR (mvm, -"Error with D0I3_END_CMD response size (%d)\n" , - len); - goto err; - } -if (IWL_D0I3_RESET_REQUIRE & -le32_to_cpu (*(__le32 *)cmd.resp_pkt->data)) { -iwl_write32 (mvm->trans,CSR_RESET , -CSR_RESET_REG_FLAG_FORCE_NMI ); -iwl_free_resp (&cmd); - } -break ; -default : -WARN_ON (1 ); - } }/* after the successful handshake, we're out of D3 */
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +0 -1
@@ -1079,7 +1079,6 @@ struct iwl_mvm {struct list_head resp_pasn_list;struct { -u8 d0i3_resp;u8 range_resp; } cmd_ver;
drivers/net/wireless/intel/iwlwifi/mvm/ops.c +0 -7
@@ -1188,13 +1188,6 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,INIT_DELAYED_WORK (&mvm->cs_tx_unblock_dwork, iwl_mvm_tx_unblock_dwork); - mvm->cmd_ver.d0i3_resp = -iwl_fw_lookup_notif_ver (mvm->fw,LEGACY_GROUP ,D0I3_END_CMD , -0 ); -/* we only support version 1 */ -if (WARN_ON_ONCE (mvm->cmd_ver.d0i3_resp >1 )) - goto out_free; - mvm->cmd_ver.range_resp =iwl_fw_lookup_notif_ver (mvm->fw,LOCATION_GROUP ,TOF_RANGE_RESPONSE_NOTIF ,5 );
Signature · 1 line
2.35.3
PATCH 8/15 wifi: iwlwifi: mvm: Add support for wowlan info notification
In reply to [email protected]From: Haim Dreyfuss <[email protected]>
IMR (Isolated Memory Regions) is a mechanism to protect memory regions from unwarranted access by agents in the system that should not have access to that memory.
When IMR is enabled, pages in the DRAM will be located within the IMR memory space, accessible only by the device.
As a side effect, during S4 (a.k.a hibernate) the IMR memory space is not retained.
While the DRAM is saved to the disk and restored by the OS upon resume, the IMR, which is hidden from the OS neither saved upon suspend nor restored upon resume.
As a consequence of the above, it turned out that commands cannot be sent as part of the resume flow, and so after ending d3 the FW needs to use notifications instead of cmd-resp.
The resume flow becomes asynchronous, with a series of notifications, starting with wowlan_info_notif, through wowlan_pkt_notif and complete the resume flow by d3_end_notif.
This patch adds the support for wowlan info notification.
The wake packet has been removed from the wowlan info struct and will be handled in a dedicated notification.
--- .../net/wireless/intel/iwlwifi/fw/api/d3.h | 39 ++- .../wireless/intel/iwlwifi/fw/api/offload.h | 7 +- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 227 ++++++++++++++---- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + 4 files changed, 230 insertions(+), 44 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/api/d3.h +38 -1
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* -* Copyright (C) 2012-2014, 2018-2021 Intel Corporation +* Copyright (C) 2012-2014, 2018-2022 Intel Corporation * Copyright (C) 2013-2014 Intel Mobile Communications GmbH * Copyright (C) 2015-2017 Intel Deutschland GmbH */
@@ -766,6 +766,43 @@ struct iwl_wowlan_status_v12 { u8 wake_packet[]; /* can be truncated from _length to _bufsize */ } __packed;/* WOWLAN_STATUSES_RSP_API_S_VER_12 */ +/** +* struct iwl_wowlan_info_notif - WoWLAN information notification +* @gtk: GTK data +* @igtk: IGTK data +* @replay_ctr: GTK rekey replay counter +* @pattern_number: number of the matched patterns +* @reserved1: reserved +* @qos_seq_ctr: QoS sequence counters to use next +* @wakeup_reasons: wakeup reasons, see &enum iwl_wowlan_wakeup_reason +* @num_of_gtk_rekeys: number of GTK rekeys +* @transmitted_ndps: number of transmitted neighbor discovery packets +* @received_beacons: number of received beacons +* @wake_packet_length: wakeup packet length +* @wake_packet_bufsize: wakeup packet buffer size +* @tid_tear_down: bit mask of tids whose BA sessions were closed +* in suspend state +* @station_id: station id +* @reserved2: reserved +*/ +struct iwl_wowlan_info_notif { +struct iwl_wowlan_gtk_status_v3 gtk[WOWLAN_GTK_KEYS_NUM ]; +struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM ]; +__le64 replay_ctr; +__le16 pattern_number; +__le16 reserved1; +__le16 qos_seq_ctr[8 ]; +__le32 wakeup_reasons; +__le32 num_of_gtk_rekeys; +__le32 transmitted_ndps; +__le32 received_beacons; +__le32 wake_packet_length; +__le32 wake_packet_bufsize; +u8 tid_tear_down; +u8 station_id; +u8 reserved2[2 ]; +} __packed;/* WOWLAN_INFO_NTFY_API_S_VER_1 */ +/* TODO: NetDetect API */ #endif /* __iwl_fw_api_d3_h__ */
drivers/net/wireless/intel/iwlwifi/fw/api/offload.h +6 -1
@@ -3,7 +3,7 @@* Copyright (C) 2012-2014 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH -* Copyright (C) 2021 Intel Corporation +* Copyright (C) 2021-2022 Intel Corporation */ #ifndef __iwl_fw_api_offload_h__#define __iwl_fw_api_offload_h__
@@ -12,6 +12,11 @@* enum iwl_prot_offload_subcmd_ids - protocol offload commands */ enum iwl_prot_offload_subcmd_ids { +/** +* @WOWLAN_INFO_NOTIFICATION: Notification in &struct iwl_wowlan_info_notif +*/ +WOWLAN_INFO_NOTIFICATION =0xFD , +/** * @STORED_BEACON_NTF: &struct iwl_stored_beacon_notif */
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +185 -42
319 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/mvm/ops.c +1 -0
@@ -574,6 +574,7 @@ static const struct iwl_hcmd_names iwl_mvm_location_names[] = {* Access is done through binary search */ static const struct iwl_hcmd_names iwl_mvm_prot_offload_names[] = { +HCMD_NAME (WOWLAN_INFO_NOTIFICATION ),HCMD_NAME (STORED_BEACON_NTF ), };
Signature · 1 line
2.35.3
PATCH 9/15 wifi: iwlwifi: mvm: Add support for wowlan wake packet notification
In reply to [email protected]From: Haim Dreyfuss <[email protected]>
The wowlan info notification is quite big.
(~750 bytes without the wake packet itself).
The max FW notification size is ~2K.
There might be cases where the wake packet gets truncated because of this limit.
Separating the wake packet from the wowlan info notification allows us to get more data without trimming it.
Note: we currently limit the wake packet to 1600 bytes.
--- .../net/wireless/intel/iwlwifi/fw/api/d3.h | 14 ++ .../wireless/intel/iwlwifi/fw/api/offload.h | 5 + drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 126 ++++++++++++++---- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + 4 files changed, 118 insertions(+), 28 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/api/d3.h +14 -0
@@ -803,6 +803,20 @@ struct iwl_wowlan_info_notif { u8 reserved2[2]; } __packed;/* WOWLAN_INFO_NTFY_API_S_VER_1 */ +/** +* struct iwl_wowlan_wake_pkt_notif - WoWLAN wake packet notification +* @wake_packet_length: wakeup packet length +* @station_id: station id +* @reserved: unused +* @wake_packet: wakeup packet +*/ +struct iwl_wowlan_wake_pkt_notif { +__le32 wake_packet_length; +u8 station_id; +u8 reserved[3 ]; +u8 wake_packet[1 ]; +} __packed;/* WOWLAN_WAKE_PKT_NTFY_API_S_VER_1 */ +/* TODO: NetDetect API */ #endif /* __iwl_fw_api_d3_h__ */
drivers/net/wireless/intel/iwlwifi/fw/api/offload.h +5 -0
@@ -12,6 +12,11 @@* enum iwl_prot_offload_subcmd_ids - protocol offload commands */ enum iwl_prot_offload_subcmd_ids { +/** +* @WOWLAN_WAKE_PKT_NOTIFICATION: Notification in &struct iwl_wowlan_wake_pkt_notif +*/ +WOWLAN_WAKE_PKT_NOTIFICATION =0xFC , +/** * @WOWLAN_INFO_NOTIFICATION: Notification in &struct iwl_wowlan_info_notif */
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +98 -28
202 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/mvm/ops.c +1 -0
@@ -574,6 +574,7 @@ static const struct iwl_hcmd_names iwl_mvm_location_names[] = {* Access is done through binary search */ static const struct iwl_hcmd_names iwl_mvm_prot_offload_names[] = { +HCMD_NAME (WOWLAN_WAKE_PKT_NOTIFICATION ),HCMD_NAME (WOWLAN_INFO_NOTIFICATION ),HCMD_NAME (STORED_BEACON_NTF ), };
Signature · 1 line
2.35.3
PATCH 10/15 wifi: iwlwifi: mvm: Add support for d3 end notification
In reply to [email protected]From: Haim Dreyfuss <[email protected]>
Due to IMR, when host returns from hibernate, commands cannot be sent as part of the resume flow, and so after ending d3 the FW needs to send notifications instead of responses. This notification indicates whether a fw reset is required.
--- .../net/wireless/intel/iwlwifi/fw/api/d3.h | 8 +++++ .../wireless/intel/iwlwifi/fw/api/offload.h | 5 +++ drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 34 ++++++++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + 4 files changed, 44 insertions(+), 4 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/api/d3.h +8 -0
@@ -817,6 +817,14 @@ struct iwl_wowlan_wake_pkt_notif { u8 wake_packet[1]; } __packed;/* WOWLAN_WAKE_PKT_NTFY_API_S_VER_1 */ +/** +* struct iwl_mvm_d3_end_notif - d3 end notification +* @flags: See &enum iwl_d0i3_flags +*/ +struct iwl_mvm_d3_end_notif { +__le32 flags; +} __packed; +/* TODO: NetDetect API */ #endif /* __iwl_fw_api_d3_h__ */
drivers/net/wireless/intel/iwlwifi/fw/api/offload.h +5 -0
@@ -22,6 +22,11 @@ enum iwl_prot_offload_subcmd_ids {*/ WOWLAN_INFO_NOTIFICATION =0xFD , +/** +* @D3_END_NOTIFICATION: End D3 state notification +*/ + D3_END_NOTIFICATION = 0xFE, +/** * @STORED_BEACON_NTF: &struct iwl_stored_beacon_notif */
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +30 -4
@@ -2517,16 +2517,21 @@ static bool iwl_mvm_check_rt_status(struct iwl_mvm *mvm,* enum iwl_d3_notif - d3 notifications * @IWL_D3_NOTIF_WOWLAN_INFO: WOWLAN_INFO_NOTIF was received * @IWL_D3_NOTIF_WOWLAN_WAKE_PKT: WOWLAN_WAKE_PKT_NOTIF was received +* @IWL_D3_NOTIF_PROT_OFFLOAD: PROT_OFFLOAD_NOTIF was received +* @IWL_D3_NOTIF_D3_END_NOTIF: D3_END_NOTIF was received */ enum iwl_d3_notif {IWL_D3_NOTIF_WOWLAN_INFO =BIT (0 ),IWL_D3_NOTIF_WOWLAN_WAKE_PKT =BIT (1 ), +IWL_D3_NOTIF_PROT_OFFLOAD =BIT (2 ), +IWL_D3_NOTIF_D3_END_NOTIF =BIT (3 ) };/* manage d3 resume data */ struct iwl_d3_data {struct iwl_wowlan_status_data *status;bool test; +u32 d3_end_flags;u32 notif_expected;/* bitmap - see &enum iwl_d3_notif */ u32 notif_received;/* bitmap - see &enum iwl_d3_notif */ };
@@ -2670,6 +2675,14 @@ static bool iwl_mvm_wait_d3_notif(struct iwl_notif_wait_data *notif_wait,break ; } +case WIDE_ID (PROT_OFFLOAD_GROUP ,D3_END_NOTIFICATION ): { +struct iwl_mvm_d3_end_notif *notif = (void *)pkt->data; + + d3_data->d3_end_flags =__le32_to_cpu (notif->flags); + d3_data->notif_received |=IWL_D3_NOTIF_D3_END_NOTIF ; + +break ; + }default :WARN_ON (1 ); }
@@ -2686,7 +2699,8 @@ static int iwl_mvm_d3_notif_wait(struct iwl_mvm *mvm, {static const u16 d3_resume_notif[] = {WIDE_ID (PROT_OFFLOAD_GROUP ,WOWLAN_INFO_NOTIFICATION ), -WIDE_ID (PROT_OFFLOAD_GROUP ,WOWLAN_WAKE_PKT_NOTIFICATION ) +WIDE_ID (PROT_OFFLOAD_GROUP ,WOWLAN_WAKE_PKT_NOTIFICATION ), +WIDE_ID (PROT_OFFLOAD_GROUP ,D3_END_NOTIFICATION ) };struct iwl_notification_wait wait_d3_notif;int ret;
@@ -2718,7 +2732,9 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)enum iwl_d3_status d3_status;struct iwl_d3_data d3_data = { .test = test, - .notif_expected =IWL_D3_NOTIF_WOWLAN_INFO , + .notif_expected = +IWL_D3_NOTIF_WOWLAN_INFO | +IWL_D3_NOTIF_D3_END_NOTIF , };bool unified_image =fw_has_capa (&mvm->fw->ucode_capa,IWL_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG );
@@ -2788,6 +2804,10 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)/* after the successful handshake, we're out of D3 */ mvm->trans->system_pm_mode =IWL_PLAT_PM_MODE_DISABLED ; +/* when reset is required we can't send these following commands */ +if (d3_data.d3_end_flags &IWL_D0I3_RESET_REQUIRE ) + goto query_wakeup_reasons; +/* * Query the current location and source from the D3 firmware so we * can play it back when we re-intiailize the D0 firmware
@@ -2812,6 +2832,7 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) false); } +query_wakeup_reasons:iwl_mvm_choose_query_wakeup_reasons (mvm, vif, &d3_data, d3_data.test);/* has unlocked the mutex, so skip that */ goto out;
@@ -2832,9 +2853,14 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)if (d0i3_first)return 0 ; - ret =iwl_mvm_send_cmd_pdu (mvm,D0I3_END_CMD ,0 ,0 ,NULL ); -if (!ret) +if (!iwl_fw_lookup_notif_ver (mvm->fw,PROT_OFFLOAD_GROUP , +D3_END_NOTIFICATION ,0 )) { + ret =iwl_mvm_send_cmd_pdu (mvm,D0I3_END_CMD ,0 ,0 ,NULL ); +if (!ret) +return 0 ; + }else if (!(d3_data.d3_end_flags &IWL_D0I3_RESET_REQUIRE )) {return 0 ; + } }/*
drivers/net/wireless/intel/iwlwifi/mvm/ops.c +1 -0
@@ -576,6 +576,7 @@ static const struct iwl_hcmd_names iwl_mvm_location_names[] = {static const struct iwl_hcmd_names iwl_mvm_prot_offload_names[] = {HCMD_NAME (WOWLAN_WAKE_PKT_NOTIFICATION ),HCMD_NAME (WOWLAN_INFO_NOTIFICATION ), +HCMD_NAME (D3_END_NOTIFICATION ),HCMD_NAME (STORED_BEACON_NTF ), };
Signature · 1 line
2.35.3
PATCH 11/15 wifi: iwlwifi: mvm: enable resume based on notifications
In reply to [email protected]From: Haim Dreyfuss <[email protected]>
We have recently added support for resume based on notifications. Enable it.
--- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +11 -2
@@ -2725,6 +2725,16 @@ static int iwl_mvm_d3_notif_wait(struct iwl_mvm *mvm, IWL_MVM_D3_NOTIF_TIMEOUT); } +static inline bool iwl_mvm_d3_resume_notif_based (struct iwl_mvm *mvm) +{ +return iwl_fw_lookup_notif_ver (mvm->fw,PROT_OFFLOAD_GROUP , +WOWLAN_INFO_NOTIFICATION ,0 ) && +iwl_fw_lookup_notif_ver (mvm->fw,PROT_OFFLOAD_GROUP , +WOWLAN_WAKE_PKT_NOTIFICATION ,0 ) && +iwl_fw_lookup_notif_ver (mvm->fw,PROT_OFFLOAD_GROUP , +D3_END_NOTIFICATION ,0 ); +} +static int __iwl_mvm_resume (struct iwl_mvm *mvm,bool test) {struct ieee80211_vif *vif =NULL ;
@@ -2740,8 +2750,7 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) IWL_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG);bool d0i3_first =fw_has_capa (&mvm->fw->ucode_capa,IWL_UCODE_TLV_CAPA_D0I3_END_FIRST ); -/* currently disabled */ -bool resume_notif_based = false; +bool resume_notif_based =iwl_mvm_d3_resume_notif_based (mvm);mutex_lock (&mvm->mutex);
Signature · 1 line
2.35.3
PATCH 12/15 wifi: iwlwifi: mvm: Add handling for scan offload match info notification
In reply to [email protected]From: Ilan Peer <[email protected]>
To support FW versions that send the scan match information as an asynchronous notification.
--- .../wireless/intel/iwlwifi/fw/api/commands.h | 5 +- .../net/wireless/intel/iwlwifi/fw/api/scan.h | 20 +- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 192 +++++++++++++----- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 8 + 4 files changed, 166 insertions(+), 59 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/api/commands.h +4 -1
@@ -2,7 +2,7 @@/* * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH -* Copyright (C) 2018-2020 Intel Corporation +* Copyright (C) 2018-2022 Intel Corporation */ #ifndef __iwl_fw_api_commands_h__#define __iwl_fw_api_commands_h__
@@ -20,6 +20,8 @@* &enum iwl_phy_ops_subcmd_ids * @DATA_PATH_GROUP: data path group, uses command IDs from * &enum iwl_data_path_subcmd_ids +* @SCAN_GROUP: scan group, uses command IDs from +* &enum iwl_scan_subcmd_ids * @NAN_GROUP: NAN group, uses command IDs from &enum iwl_nan_subcmd_ids * @LOCATION_GROUP: location group, uses command IDs from * &enum iwl_location_subcmd_ids
@@ -36,6 +38,7 @@ enum iwl_mvm_command_groups {MAC_CONF_GROUP =0x3 ,PHY_OPS_GROUP =0x4 ,DATA_PATH_GROUP =0x5 , +SCAN_GROUP =0x6 ,NAN_GROUP =0x7 ,LOCATION_GROUP =0x8 , PROT_OFFLOAD_GROUP = 0xb,
drivers/net/wireless/intel/iwlwifi/fw/api/scan.h +16 -4
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* -* Copyright (C) 2012-2014, 2018-2021 Intel Corporation +* Copyright (C) 2012-2014, 2018-2022 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH */
@@ -9,6 +9,16 @@/* Scan Commands, Responses, Notifications */ +/** +* enum iwl_scan_subcmd_ids - scan commands +*/ +enum iwl_scan_subcmd_ids { +/** +* @OFFLOAD_MATCH_INFO_NOTIF: &struct iwl_scan_offload_match_info +*/ +OFFLOAD_MATCH_INFO_NOTIF =0xFC , +}; +/* Max number of IEs for direct SSID scans in a command */ #define PROBE_OPTION_MAX 20
@@ -1188,7 +1198,7 @@ struct iwl_scan_offload_profile_match { } __packed;/* SCAN_OFFLOAD_PROFILE_MATCH_RESULTS_S_VER_2 */ /** -* struct iwl_scan_offload_profiles_query - match results query response +* struct iwl_scan_offload_match_info - match results information * @matched_profiles: bitmap of matched profiles, referencing the * matches passed in the scan offload request * @last_scan_age: age of the last offloaded scan
@@ -1200,7 +1210,7 @@ struct iwl_scan_offload_profile_match {* @reserved: reserved * @matches: array of match information, one for each match */ -struct iwl_scan_offload_profiles_query { +struct iwl_scan_offload_match_info {__le32 matched_profiles;__le32 last_scan_age;__le32 n_scans_done;
@@ -1210,7 +1220,9 @@ struct iwl_scan_offload_profiles_query {u8 self_recovery;__le16 reserved;struct iwl_scan_offload_profile_match matches[]; -} __packed;/* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_3 */ +} __packed;/* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_3 and +* SCAN_OFFLOAD_MATCH_INFO_NOTIFICATION_S_VER_1 +*/ /** * struct iwl_umac_scan_iter_complete_notif - notifies end of scanning iteration
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +138 -54
361 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/mvm/ops.c +8 -0
@@ -554,6 +554,13 @@ static const struct iwl_hcmd_names iwl_mvm_data_path_names[] = { HCMD_NAME(RX_QUEUES_NOTIFICATION), }; +/* Please keep this array *SORTED* by hex value. +* Access is done through binary search +*/ +static const struct iwl_hcmd_names iwl_mvm_scan_names[] = { +HCMD_NAME (OFFLOAD_MATCH_INFO_NOTIF ), +}; +/* Please keep this array *SORTED* by hex value. * Access is done through binary search */
@@ -596,6 +603,7 @@ static const struct iwl_hcmd_arr iwl_mvm_groups[] = { [MAC_CONF_GROUP] = HCMD_ARR(iwl_mvm_mac_conf_names), [PHY_OPS_GROUP] = HCMD_ARR(iwl_mvm_phy_names), [DATA_PATH_GROUP] = HCMD_ARR(iwl_mvm_data_path_names), + [SCAN_GROUP] = HCMD_ARR(iwl_mvm_scan_names), [LOCATION_GROUP] = HCMD_ARR(iwl_mvm_location_names), [PROT_OFFLOAD_GROUP] = HCMD_ARR(iwl_mvm_prot_offload_names), [REGULATORY_AND_NVM_GROUP] =
Signature · 1 line
2.35.3
PATCH 13/15 wifi: iwlwifi: mvm: trigger resume flow before wait for notifications
In reply to [email protected]From: "Haim, Dreyfuss" <[email protected]>
We have recently enabled resume flow based on notifications. These notifications are sent by the FW when completing the resume flow. From IWL_DEVICE_FAMILY_AX210 the resume flow is triggered by the transport layer on iwl_trans_d3_resume.
On IWL_DEVICE_FAMILY_22000 and earlier we trigger the resume flow by sending the D0I3 command.
Currently, we are waiting for the notifications before sending the command, the notifications won't be sent by the FW since there is no resume trigger to piggyback on.
Send the command before starting the wait flow to fix it.
--- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 77 ++++++++++++--------- 1 file changed, 43 insertions(+), 34 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +43 -34
@@ -2771,11 +2771,46 @@ static bool iwl_mvm_wait_d3_notif(struct iwl_notif_wait_data *notif_wait,return d3_data->notif_received == d3_data->notif_expected; } +static int iwl_mvm_resume_firmware (struct iwl_mvm *mvm,bool test) +{ +int ret; +enum iwl_d3_status d3_status; +struct iwl_host_cmd cmd = { + .id =D0I3_END_CMD , + .flags =CMD_WANT_SKB |CMD_SEND_IN_D3 , + }; +bool reset =fw_has_capa (&mvm->fw->ucode_capa, +IWL_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG ); + + ret =iwl_trans_d3_resume (mvm->trans, &d3_status, test, !reset); +if (ret) +return ret; + +if (d3_status !=IWL_D3_STATUS_ALIVE ) { +IWL_INFO (mvm,"Device was reset during suspend\n" ); +return -ENOENT ; + } + +/* +* We should trigger resume flow using command only for 22000 family +* AX210 and above don't need the command since they have +* the doorbell interrupt. +*/ +if (mvm->trans->trans_cfg->device_family <=IWL_DEVICE_FAMILY_22000 && +fw_has_capa (&mvm->fw->ucode_capa,IWL_UCODE_TLV_CAPA_D0I3_END_FIRST )) { + ret =iwl_mvm_send_cmd (mvm, &cmd); +if (ret <0 ) +IWL_ERR (mvm,"Failed to send D0I3_END_CMD first (%d)\n" , + ret); + } + +return ret; +} +#define IWL_MVM_D3_NOTIF_TIMEOUT (HZ / 5)static int iwl_mvm_d3_notif_wait (struct iwl_mvm *mvm, -struct iwl_d3_data *d3_data, -enum iwl_d3_status *d3_status) +struct iwl_d3_data *d3_data) {static const u16 d3_resume_notif[] = {WIDE_ID (PROT_OFFLOAD_GROUP ,WOWLAN_INFO_NOTIFICATION ),
@@ -2790,18 +2825,12 @@ static int iwl_mvm_d3_notif_wait(struct iwl_mvm *mvm, d3_resume_notif,ARRAY_SIZE (d3_resume_notif), iwl_mvm_wait_d3_notif, d3_data); - ret =iwl_trans_d3_resume (mvm->trans, d3_status, d3_data->test, false); + ret =iwl_mvm_resume_firmware (mvm, d3_data->test);if (ret) {iwl_remove_notification (&mvm->notif_wait, &wait_d3_notif);return ret; } -if (*d3_status !=IWL_D3_STATUS_ALIVE ) { -IWL_INFO (mvm,"Device was reset during suspend\n" ); -iwl_remove_notification (&mvm->notif_wait, &wait_d3_notif); -return -ENOENT ; - } -return iwl_wait_notification (&mvm->notif_wait, &wait_d3_notif,IWL_MVM_D3_NOTIF_TIMEOUT ); }
@@ -2820,7 +2849,6 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) {struct ieee80211_vif *vif =NULL ;int ret =1 ; -enum iwl_d3_status d3_status;struct iwl_mvm_nd_results results = {};struct iwl_d3_data d3_data = { .test = test,
@@ -2866,32 +2894,13 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) goto err; } - ret =iwl_mvm_d3_notif_wait (mvm, &d3_data, &d3_status); + ret =iwl_mvm_d3_notif_wait (mvm, &d3_data); +if (ret) + goto err; }else { - ret =iwl_trans_d3_resume (mvm->trans, &d3_status, test, - !unified_image); - } - -if (ret) - goto err; - -if (d3_status !=IWL_D3_STATUS_ALIVE ) { -IWL_INFO (mvm,"Device was reset during suspend\n" ); - goto err; - } - -if (d0i3_first && mvm->trans->trans_cfg->device_family <=IWL_DEVICE_FAMILY_22000 ) { -struct iwl_host_cmd cmd = { - .id =D0I3_END_CMD , - .flags =CMD_WANT_SKB |CMD_SEND_IN_D3 , - }; - - ret =iwl_mvm_send_cmd (mvm, &cmd); -if (ret <0 ) { -IWL_ERR (mvm,"Failed to send D0I3_END_CMD first (%d)\n" , - ret); + ret =iwl_mvm_resume_firmware (mvm, test); +if (ret <0 ) goto err; - } }/* after the successful handshake, we're out of D3 */
Signature · 1 line
2.35.3
PATCH 14/15 wifi: iwlwifi: mvm: iterate over interfaces after an assert in d3
In reply to [email protected]From: Yedidya Benshimol <[email protected]>
In recent patches notifications based d3 resume flow was added, and the resume flow was changed.
Currently, when resuming from d3 during which an assert was thrown, the resume flow skips the iteration over active interfaces preventing the sta to reconnect to the ap.
Perform the iteration in case an assert was thrown to fix it.
--- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +11 -7
@@ -2555,7 +2555,7 @@ static bool iwl_mvm_check_rt_status(struct iwl_mvm *mvm,* 1. The mutex is already held. * 2. The callee functions unlock the mutex. */ -static void +static bool iwl_mvm_choose_query_wakeup_reasons (struct iwl_mvm *mvm,struct ieee80211_vif *vif,struct iwl_d3_data *d3_data)
@@ -2581,12 +2581,9 @@ iwl_mvm_choose_query_wakeup_reasons(struct iwl_mvm *mvm, mvm->keep_vif = vif;#endif -if (!d3_data->test) -ieee80211_iterate_active_interfaces_mtx (mvm->hw, -IEEE80211_IFACE_ITER_NORMAL , - iwl_mvm_d3_disconnect_iter, - keep ? vif :NULL ); +return keep; } +return false; }#define IWL_WOWLAN_WAKEUP_REASON_HAS_WAKEUP_PKT (IWL_WOWLAN_WAKEUP_BY_MAGIC_PACKET | \
@@ -2863,6 +2860,7 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)bool d0i3_first =fw_has_capa (&mvm->fw->ucode_capa,IWL_UCODE_TLV_CAPA_D0I3_END_FIRST );bool resume_notif_based =iwl_mvm_d3_resume_notif_based (mvm); +bool keep = false;mutex_lock (&mvm->mutex);
@@ -2935,7 +2933,7 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) } query_wakeup_reasons: -iwl_mvm_choose_query_wakeup_reasons (mvm, vif, &d3_data); + keep =iwl_mvm_choose_query_wakeup_reasons (mvm, vif, &d3_data);/* has unlocked the mutex, so skip that */ goto out;
@@ -2947,6 +2945,12 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)kfree (d3_data.status);iwl_mvm_free_nd (mvm); +if (!d3_data.test && !mvm->net_detect) +ieee80211_iterate_active_interfaces_mtx (mvm->hw, +IEEE80211_IFACE_ITER_NORMAL , + iwl_mvm_d3_disconnect_iter, + keep ? vif :NULL ); +clear_bit (IWL_MVM_STATUS_IN_D3 , &mvm->status);/* no need to reset the device in unified images, if successful */
Signature · 1 line
2.35.3
PATCH 15/15 wifi: iwlwifi: mvm: d3: parse keys from wowlan info notification
In reply to [email protected]From: Naftali Goldstein <[email protected]>
This notification replaces the WOWLAN_GET_STATUSES command-and-response, so it's required to parse all the keys in the notification just like what happened when that command was used.
Move around a few required static functions in order to avoid forward declarations.
--- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 171 ++++++++++---------- 1 file changed, 88 insertions(+), 83 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +88 -83
@@ -1944,6 +1944,94 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,return true; } +static void iwl_mvm_convert_gtk_v2 (struct iwl_wowlan_status_data *status, +struct iwl_wowlan_gtk_status_v2 *data) +{ +BUILD_BUG_ON (sizeof (status->gtk.key) <sizeof (data->key)); +BUILD_BUG_ON (NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY + +sizeof (data->tkip_mic_key) > +sizeof (status->gtk.key)); + + status->gtk.len = data->key_len; + status->gtk.flags = data->key_flags; + +memcpy (status->gtk.key, data->key,sizeof (data->key)); + +/* if it's as long as the TKIP encryption key, copy MIC key */ +if (status->gtk.len ==NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY ) +memcpy (status->gtk.key +NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY , + data->tkip_mic_key,sizeof (data->tkip_mic_key)); +} + +static void iwl_mvm_convert_gtk_v3 (struct iwl_wowlan_status_data *status, +struct iwl_wowlan_gtk_status_v3 *data) +{ +/* The parts we need are identical in v2 and v3 */ +#define CHECK (_f) do { \ + BUILD_BUG_ON(offsetof(struct iwl_wowlan_gtk_status_v2, _f) != \ + offsetof(struct iwl_wowlan_gtk_status_v3, _f)); \ + BUILD_BUG_ON(offsetofend(struct iwl_wowlan_gtk_status_v2, _f) !=\ + offsetofend(struct iwl_wowlan_gtk_status_v3, _f)); \ +} while (0) + +CHECK (key); +CHECK (key_len); +CHECK (key_flags); +CHECK (tkip_mic_key); +#undef CHECK + +iwl_mvm_convert_gtk_v2 (status, (void *)data); +} + +static void iwl_mvm_convert_igtk (struct iwl_wowlan_status_data *status, +struct iwl_wowlan_igtk_status *data) +{ +const u8 *ipn = data->ipn; + +BUILD_BUG_ON (sizeof (status->igtk.key) <sizeof (data->key)); + + status->igtk.len = data->key_len; + status->igtk.flags = data->key_flags; + +memcpy (status->igtk.key, data->key,sizeof (data->key)); + + status->igtk.ipn = ((u64 )ipn[5 ] <<0 ) | + ((u64 )ipn[4 ] <<8 ) | + ((u64 )ipn[3 ] <<16 ) | + ((u64 )ipn[2 ] <<24 ) | + ((u64 )ipn[1 ] <<32 ) | + ((u64 )ipn[0 ] <<40 ); +} + +static void iwl_mvm_parse_wowlan_info_notif (struct iwl_mvm *mvm, +struct iwl_wowlan_info_notif *data, +struct iwl_wowlan_status_data *status, +u32 len) +{ +u32 i; + +if (len <sizeof (*data)) { +IWL_ERR (mvm,"Invalid WoWLAN info notification!\n" ); + status =NULL ; +return ; + } + +iwl_mvm_convert_key_counters_v5 (status, &data->gtk[0 ].sc); +iwl_mvm_convert_gtk_v3 (status, &data->gtk[0 ]); +iwl_mvm_convert_igtk (status, &data->igtk[0 ]); + + status->replay_ctr =le64_to_cpu (data->replay_ctr); + status->pattern_number =le16_to_cpu (data->pattern_number); +for (i =0 ; i <IWL_MAX_TID_COUNT ; i++) + status->qos_seq_ctr[i] = +le16_to_cpu (data->qos_seq_ctr[i]); + status->wakeup_reasons =le32_to_cpu (data->wakeup_reasons); + status->num_of_gtk_rekeys = +le32_to_cpu (data->num_of_gtk_rekeys); + status->received_beacons =le32_to_cpu (data->received_beacons); + status->tid_tear_down = data->tid_tear_down; +} +/* Occasionally, templates would be nice. This is one of those times ... */ #define iwl_mvm_parse_wowlan_status_common (_ver) \ static struct iwl_wowlan_status_data * \
@@ -2005,89 +2093,6 @@ iwl_mvm_parse_wowlan_status_common(v7) iwl_mvm_parse_wowlan_status_common(v9) iwl_mvm_parse_wowlan_status_common(v12) -static void iwl_mvm_parse_wowlan_info_notif(struct iwl_mvm *mvm, - struct iwl_wowlan_info_notif *data, - struct iwl_wowlan_status_data *status, - u32 len) -{ - u32 i; - - if (len < sizeof(*data)) { -IWL_ERR (mvm,"Invalid WoWLAN info notification!\n" ); - status =NULL ; -return ; - } - - status->replay_ctr =le64_to_cpu (data->replay_ctr); - status->pattern_number =le16_to_cpu (data->pattern_number); -for (i =0 ; i <IWL_MAX_TID_COUNT ; i++) - status->qos_seq_ctr[i] = -le16_to_cpu (data->qos_seq_ctr[i]); - status->wakeup_reasons =le32_to_cpu (data->wakeup_reasons); - status->num_of_gtk_rekeys = -le32_to_cpu (data->num_of_gtk_rekeys); - status->received_beacons =le32_to_cpu (data->received_beacons); -} - -static void iwl_mvm_convert_gtk_v2 (struct iwl_wowlan_status_data *status, -struct iwl_wowlan_gtk_status_v2 *data) -{ -BUILD_BUG_ON (sizeof (status->gtk.key) <sizeof (data->key)); -BUILD_BUG_ON (NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY + -sizeof (data->tkip_mic_key) > -sizeof (status->gtk.key)); - - status->gtk.len = data->key_len; - status->gtk.flags = data->key_flags; - -memcpy (status->gtk.key, data->key,sizeof (data->key)); - -/* if it's as long as the TKIP encryption key, copy MIC key */ -if (status->gtk.len ==NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY ) -memcpy (status->gtk.key +NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY , - data->tkip_mic_key,sizeof (data->tkip_mic_key)); -} - -static void iwl_mvm_convert_gtk_v3 (struct iwl_wowlan_status_data *status, -struct iwl_wowlan_gtk_status_v3 *data) -{ -/* The parts we need are identical in v2 and v3 */ -#define CHECK (_f) do { \ - BUILD_BUG_ON(offsetof(struct iwl_wowlan_gtk_status_v2, _f) != \ - offsetof(struct iwl_wowlan_gtk_status_v3, _f)); \ - BUILD_BUG_ON(offsetofend(struct iwl_wowlan_gtk_status_v2, _f) !=\ - offsetofend(struct iwl_wowlan_gtk_status_v3, _f)); \ -} while (0) - -CHECK (key); -CHECK (key_len); -CHECK (key_flags); -CHECK (tkip_mic_key); -#undef CHECK - -iwl_mvm_convert_gtk_v2 (status, (void *)data); -} - -static void iwl_mvm_convert_igtk (struct iwl_wowlan_status_data *status, -struct iwl_wowlan_igtk_status *data) -{ -const u8 *ipn = data->ipn; - -BUILD_BUG_ON (sizeof (status->igtk.key) <sizeof (data->key)); - - status->igtk.len = data->key_len; - status->igtk.flags = data->key_flags; - -memcpy (status->igtk.key, data->key,sizeof (data->key)); - - status->igtk.ipn = ((u64 )ipn[5 ] <<0 ) | - ((u64 )ipn[4 ] <<8 ) | - ((u64 )ipn[3 ] <<16 ) | - ((u64 )ipn[2 ] <<24 ) | - ((u64 )ipn[1 ] <<32 ) | - ((u64 )ipn[0 ] <<40 ); -} - static struct iwl_wowlan_status_data * iwl_mvm_send_wowlan_get_status(struct iwl_mvm *mvm, u8 sta_id) {
Signature · 1 line
2.35.3
Quoted 62 lines · On Tue, 2022-09-06 at 16:42 +0300, [email protected] wrote:
From: Gregory Greenman <[email protected]>
Hi,
After some hiatus, we're starting to send iwlwifi patches again. Here's the first set of patches intended for v6.0. It contains the usual development, new features and cleanups.
The changes are:
* Refactoring of some wowlan related code
* Fixes and cleanups
* Adding support for BZ device familyAs usual, these commits are pushed to a pending branch, for kbuild bot. I'll send a pull-request later.
Best regards,
GregoryHaim Dreyfuss (5):
wifi: iwlwifi: mvm: don't check D0I3 version
wifi: iwlwifi: mvm: Add support for wowlan info notification
wifi: iwlwifi: mvm: Add support for wowlan wake packet notification
wifi: iwlwifi: mvm: Add support for d3 end notification
wifi: iwlwifi: mvm: enable resume based on notificationsHaim, Dreyfuss (1):
wifi: iwlwifi: mvm: trigger resume flow before wait for notificationsIlan Peer (1):
wifi: iwlwifi: mvm: Add handling for scan offload match info notificationJohannes Berg (5):
wifi: iwlwifi: mvm: fix typo in structiwl_rx_no_dataAPI
wifi: iwlwifi: mvm: rxmq: refactor mac80211rx_statussetting
wifi: iwlwifi: mvm: rxmq: further unify some VHT/HE code
wifi: iwlwifi: mvm: refactoriwl_mvm_set_sta_rate()a bit
wifi: iwlwifi: cfg: removeIWL_DEVICE_BZ_COMMONmacroNaftali Goldstein (1):
wifi: iwlwifi: mvm: d3: parse keys from wowlan info notificationYaara Baruch (1):
wifi: iwlwifi: pcie: add support for BZ devicesYedidya Benshimol (1):
wifi: iwlwifi: mvm: iterate over interfaces after an assert in d3.../net/wireless/intel/iwlwifi/cfg/22000.c | 42 +- .../wireless/intel/iwlwifi/fw/api/commands.h | 5 +- .../net/wireless/intel/iwlwifi/fw/api/d3.h | 61 +- .../wireless/intel/iwlwifi/fw/api/offload.h | 17 +- .../net/wireless/intel/iwlwifi/fw/api/rx.h | 4 +- .../net/wireless/intel/iwlwifi/fw/api/scan.h | 20 +- .../net/wireless/intel/iwlwifi/iwl-config.h | 3 + drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 668 +++++++++++++-----
.../net/wireless/intel/iwlwifi/mvm/mac80211.c| 25 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 18 +-drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c| 376 +++++-----drivers/net/wireless/intel/iwlwifi/pcie/drv.c| 19 +-
Quoted 2 lines
13 files changed, 846 insertions(+), 413 deletions(-)
A small correction - these patches are intended for v6.1.
Thanks,
Gregory