wifi: iwlwifi: updates intended for v6.5 2023-05-31
cover wifi: iwlwifi: updates intended for v6.5 2023-05-31
From: Gregory Greenman <[email protected]>
Hi,
This patch set includes iwlwifi patches intended for v6.5.
It primarily focus on the following areas:
* bugfixes and cleanups
* ACPI vendors list fixes
* BSS Transition Management offload
* MLO support for FTM
Thanks,
Gregory
Alon Giladi (2):
wifi: iwlwifi: Add vendors to TAS approved list
wifi: iwlwifi: Add Dell to ppag approved list
Avraham Stern (1):
wifi: iwlwifi: mvm: FTM initiator MLO support
Benjamin Berg (1):
wifi: iwlwifi: do not log undefined DRAM buffers unnecessarily
Golan Ben Ami (1):
wifi: iwlwifi: acpi: add other Google OEMs to the ppag approved list
Haim Dreyfuss (1):
wifi: iwlwifi: mvm: offload BTM response during D3
Johannes Berg (7):
wifi: iwlwifi: fix Bz checksum start/result offset
wifi: iwlwifi: mvm: support injection rate control
wifi: iwlwifi: mvm: clarify EHT RU allocation bits
wifi: iwlwifi: pcie: adjust Bz device timings
wifi: iwlwifi: mvm: tell firmware about per-STA MFP enablement
wifi: iwlwifi: mvm: remove warning for beacon filtering error
wifi: iwlwifi: mvm: send time sync only if needed
Mukesh Sisodiya (1):
wifi: iwlwifi: remove dead code in iwl_dump_ini_imr_get_size()
drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 22 +++++++ .../net/wireless/intel/iwlwifi/fw/api/d3.h | 2 + .../net/wireless/intel/iwlwifi/fw/api/rx.h | 4 +- .../net/wireless/intel/iwlwifi/fw/api/tx.h | 4 +- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 12 ++-- drivers/net/wireless/intel/iwlwifi/fw/file.h | 2 + .../net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 7 ++- .../intel/iwlwifi/mvm/ftm-initiator.c | 45 ++++++++++---- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 33 ++++++++-- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 6 +- .../net/wireless/intel/iwlwifi/mvm/mld-sta.c | 5 ++ .../wireless/intel/iwlwifi/mvm/offloading.c | 4 ++ drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 62 ++++++++++++++++++- .../net/wireless/intel/iwlwifi/pcie/trans.c | 10 +-- 15 files changed, 179 insertions(+), 43 deletions(-)
Signature · 1 line
2.38.1
PATCH 1/14 wifi: iwlwifi: fix Bz checksum start/result offset
From: Johannes Berg <[email protected]>
The checksum start/result offset should never be longer than the bits we have in the mask now (nothing should put the checksum at the end of a frame), but we should really match the hardware definition for these bits.
--- drivers/net/wireless/intel/iwlwifi/fw/api/tx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/api/tx.h +2 -2
@@ -178,8 +178,8 @@ enum iwl_tx_offload_assist_flags_pos {#define IWL_TX_CMD_OFFLD_IP_HDR_MASK 0x3fenum iwl_tx_offload_assist_bz { -IWL_TX_CMD_OFFLD_BZ_RESULT_OFFS =0x000003ff , -IWL_TX_CMD_OFFLD_BZ_START_OFFS =0x001ff800 , +IWL_TX_CMD_OFFLD_BZ_RESULT_OFFS =0x000007ff , +IWL_TX_CMD_OFFLD_BZ_START_OFFS =0x003ff800 ,IWL_TX_CMD_OFFLD_BZ_MH_LEN =0x07c00000 ,IWL_TX_CMD_OFFLD_BZ_MH_PAD =0x08000000 ,IWL_TX_CMD_OFFLD_BZ_AMSDU =0x10000000 ,
Signature · 1 line
2.38.1
PATCH 2/14 wifi: iwlwifi: Add vendors to TAS approved list
In reply to [email protected]From: Alon Giladi <[email protected]>
Allows vendors to use the time average sar feature.
--- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 25 ++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/mvm/fw.c +24 -1
@@ -1104,7 +1104,26 @@ static const struct dmi_system_id dmi_tas_approved_list[] = { DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), }, }, - + { .ident = "Acer", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + }, + }, + { .ident = "ASUS", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + }, + }, + { .ident = "MSI", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International Co., Ltd."), + }, + }, + { .ident = "Honor", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "HONOR"), + }, + }, /* keep last */ {} };
@@ -1176,6 +1195,10 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm) "Unable to add US/Canada to TAS block list, disabling TAS\n");return ; } + }else { +IWL_DEBUG_RADIO (mvm, +"System vendor '%s' is in the approved list.\n" , +dmi_get_system_info (DMI_SYS_VENDOR )); }/* v4 is the same size as v3, so no need to differentiate here */
Signature · 1 line
2.38.1
PATCH 3/14 wifi: iwlwifi: mvm: support injection rate control
In reply to [email protected]From: Johannes Berg <[email protected]>
Supporting controlling the frame rate during injection, HT/VHT are supported in addition to legacy rates.
--- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 62 ++++++++++++++++++++- 1 file changed, 59 insertions(+), 3 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +59 -3
@@ -308,6 +308,54 @@ static u32 iwl_mvm_get_tx_ant(struct iwl_mvm *mvm,return BIT (mvm->mgmt_last_antenna_idx) <<RATE_MCS_ANT_POS ; } +static u32 iwl_mvm_get_inject_tx_rate (struct iwl_mvm *mvm, +struct ieee80211_tx_info *info) +{ +struct ieee80211_tx_rate *rate = &info->control.rates[0 ]; +u32 result; + +/* +* we only care about legacy/HT/VHT so far, so we can +* build in v1 and use iwl_new_rate_from_v1() +*/ + +if (rate->flags &IEEE80211_TX_RC_VHT_MCS ) { +u8 mcs =ieee80211_rate_get_vht_mcs (rate); +u8 nss =ieee80211_rate_get_vht_nss (rate); + + result =RATE_MCS_VHT_MSK_V1 ; + result |=u32_encode_bits (mcs,RATE_VHT_MCS_RATE_CODE_MSK ); + result |=u32_encode_bits (nss,RATE_MCS_NSS_MSK ); +if (rate->flags &IEEE80211_TX_RC_SHORT_GI ) + result |=RATE_MCS_SGI_MSK_V1 ; +if (rate->flags &IEEE80211_TX_RC_40_MHZ_WIDTH ) + result |=u32_encode_bits (1 ,RATE_MCS_CHAN_WIDTH_MSK_V1 ); +else if (rate->flags &IEEE80211_TX_RC_80_MHZ_WIDTH ) + result |=u32_encode_bits (2 ,RATE_MCS_CHAN_WIDTH_MSK_V1 ); +else if (rate->flags &IEEE80211_TX_RC_160_MHZ_WIDTH ) + result |=u32_encode_bits (3 ,RATE_MCS_CHAN_WIDTH_MSK_V1 ); + }else if (rate->flags &IEEE80211_TX_RC_MCS ) { + result =RATE_MCS_HT_MSK_V1 ; + result |=u32_encode_bits (rate->idx, +RATE_HT_MCS_RATE_CODE_MSK_V1 | +RATE_HT_MCS_NSS_MSK_V1 ); +if (rate->flags &IEEE80211_TX_RC_SHORT_GI ) + result |=RATE_MCS_SGI_MSK_V1 ; +if (rate->flags &IEEE80211_TX_RC_40_MHZ_WIDTH ) + result |=u32_encode_bits (1 ,RATE_MCS_CHAN_WIDTH_MSK_V1 ); +if (rate->flags &IEEE80211_TX_CTL_LDPC ) + result |=RATE_MCS_LDPC_MSK_V1 ; +if (u32_get_bits (rate->flags,IEEE80211_TX_CTL_STBC )) + result |=RATE_MCS_STBC_MSK ; + }else { +return 0 ; + } + +if (iwl_fw_lookup_notif_ver (mvm->fw,LONG_GROUP ,TX_CMD ,0 ) >6 ) +return iwl_new_rate_from_v1 (result); +return result; +} +static u32 iwl_mvm_get_tx_rate (struct iwl_mvm *mvm,struct ieee80211_tx_info *info,struct ieee80211_sta *sta,__le16 fc)
@@ -317,8 +365,15 @@ static u32 iwl_mvm_get_tx_rate(struct iwl_mvm *mvm,u32 rate_flags =0 ;bool is_cck; -/* info->control is only relevant for non HW rate control */ -if (!ieee80211_hw_check (mvm->hw,HAS_RATE_CONTROL )) { +if (unlikely (info->control.flags &IEEE80211_TX_CTRL_RATE_INJECT )) { +u32 result =iwl_mvm_get_inject_tx_rate (mvm, info); + +if (result) +return result; + rate_idx = info->control.rates[0 ].idx; + }else if (!ieee80211_hw_check (mvm->hw,HAS_RATE_CONTROL )) { +/* info->control is only relevant for non HW rate control */ +/* HT rate doesn't make sense for a non data frame */ WARN_ONCE(info->control.rates[0].flags & IEEE80211_TX_RC_MCS && !ieee80211_is_data(fc),
@@ -398,7 +453,8 @@ void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd,* table is controlled by LINK_QUALITY commands */ -if (ieee80211_is_data (fc) && sta) { +if (likely (ieee80211_is_data (fc) && sta && + !(info->control.flags &IEEE80211_TX_CTRL_RATE_INJECT ))) {struct iwl_mvm_sta *mvmsta =iwl_mvm_sta_from_mac80211 (sta);if (mvmsta->sta_state >=IEEE80211_STA_AUTHORIZED ) {
Signature · 1 line
2.38.1
PATCH 4/14 wifi: iwlwifi: mvm: clarify EHT RU allocation bits
In reply to [email protected]From: Johannes Berg <[email protected]>
Calling this IWL_RX_PHY_DATA1_EHT_B0 is just confusing, it's the RU allocation bit 0. Also then align the name for B1-B7 accordingly.
--- drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/api/rx.h +2 -2
@@ -367,8 +367,8 @@ enum iwl_rx_phy_eht_data1 {/* number of EHT-LTF symbols 0 - 1 EHT-LTF, 1 - 2 EHT-LTFs, 2 - 4 EHT-LTFs, * 3 - 6 EHT-LTFs, 4 - 8 EHT-LTFs */ IWL_RX_PHY_DATA1_EHT_SIG_LTF_NUM =0x000000e0 , -IWL_RX_PHY_DATA1_EHT_B0 =0x00000100 , - IWL_RX_PHY_DATA1_EHT_RU_B1_B7_ALLOC = 0x0000fe00, +IWL_RX_PHY_DATA1_EHT_RU_ALLOC_B0 =0x00000100 , + IWL_RX_PHY_DATA1_EHT_RU_ALLOC_B1_B7 = 0x0000fe00, };/* goes into Metadata DW 7 */
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +2 -2
@@ -1775,9 +1775,9 @@ static void iwl_mvm_decode_eht_phy_data(struct iwl_mvm *mvm, eht->known |=cpu_to_le32 (IEEE80211_RADIOTAP_EHT_KNOWN_RU_ALLOC_TB_FMT ); eht->data[8 ] |=LE32_DEC_ENC (data0,IWL_RX_PHY_DATA0_EHT_PS160 ,IEEE80211_RADIOTAP_EHT_DATA8_RU_ALLOC_TB_FMT_PS_160 ); - eht->data[8 ] |=LE32_DEC_ENC (data1,IWL_RX_PHY_DATA1_EHT_B0 , + eht->data[8 ] |=LE32_DEC_ENC (data1,IWL_RX_PHY_DATA1_EHT_RU_ALLOC_B0 ,IEEE80211_RADIOTAP_EHT_DATA8_RU_ALLOC_TB_FMT_B0 ); - eht->data[8 ] |=LE32_DEC_ENC (data1,IWL_RX_PHY_DATA1_EHT_RU_B1_B7_ALLOC , + eht->data[8 ] |=LE32_DEC_ENC (data1,IWL_RX_PHY_DATA1_EHT_RU_ALLOC_B1_B7 ,IEEE80211_RADIOTAP_EHT_DATA8_RU_ALLOC_TB_FMT_B7_B1 );iwl_mvm_decode_eht_ru (mvm, rx_status, eht);
Signature · 1 line
2.38.1
PATCH 5/14 wifi: iwlwifi: acpi: add other Google OEMs to the ppag approved list
In reply to [email protected]From: Golan Ben Ami <[email protected]>
Add two new vendors to the PPAG approved vendor list as Google OEMs.
--- drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/net/wireless/intel/iwlwifi/fw/acpi.c +12 -0
@@ -47,6 +47,18 @@ static const struct dmi_system_id dmi_ppag_approved_list[] = { DMI_MATCH(DMI_BOARD_VENDOR, "HP"), }, }, + { .ident = "GOOGLE-ASUS", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Google"), + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTek COMPUTER INC."), + }, + }, + { .ident = "GOOGLE-SAMSUNG", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Google"), + DMI_MATCH(DMI_BOARD_VENDOR, "SAMSUNG ELECTRONICS CO., LTD"), + }, + }, {} };
Signature · 1 line
2.38.1
PATCH 6/14 wifi: iwlwifi: do not log undefined DRAM buffers unnecessarily
In reply to [email protected]From: Benjamin Berg <[email protected]>
DRAM buffers that are not defined in the TLVs (or are unused in the preset) would cause a log message. To avoid confusion, skip processing buffers with an invalid (i.e. uninitialized) DRAM path.
This further reduces the noise of the message in cases where it is unlikely to be helpful. Also update a related debug log string to better describe what is happening.
--- drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c +6 -1
@@ -738,7 +738,8 @@ static int iwl_dbg_tlv_update_dram(struct iwl_fw_runtime *fwrt,if (le32_to_cpu (fwrt->trans->dbg.fw_mon_cfg[alloc_id].buf_location) !=IWL_FW_INI_LOCATION_DRAM_PATH ) { -IWL_DEBUG_FW (fwrt,"DRAM_PATH is not supported alloc_id %u\n" , alloc_id); +IWL_DEBUG_FW (fwrt,"WRT: alloc_id %u location is not in DRAM_PATH\n" , + alloc_id);return -1 ; }
@@ -799,6 +800,10 @@ static void iwl_dbg_tlv_update_drams(struct iwl_fw_runtime *fwrt)for (i =IWL_FW_INI_ALLOCATION_ID_DBGC1 ; i <IWL_FW_INI_ALLOCATION_NUM ; i++) { +if (fwrt->trans->dbg.fw_mon_cfg[i].buf_location == +IWL_FW_INI_LOCATION_INVALID ) +continue ; + ret =iwl_dbg_tlv_update_dram (fwrt, i, dram_info);if (!ret) dram_alloc = true;
Signature · 1 line
2.38.1
PATCH 7/14 wifi: iwlwifi: mvm: offload BTM response during D3
In reply to [email protected]From: Haim Dreyfuss <[email protected]>
There are mainly two types of BTM (BSS Transition Management) requests, recommendations and notifications. For the first type, a response is needed otherwise, most probably the STA will be disconnected.
Since we don't want to wake up the host on it, set the BTM to reject offload flag (if the device supports it) and rely on the FW to take care of it. The FW will reject the BTM request and in case the AP sends DEAUTH the FW can wake up the host to let it decide on the next steps.
--- drivers/net/wireless/intel/iwlwifi/fw/api/d3.h | 2 ++ drivers/net/wireless/intel/iwlwifi/fw/file.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/offloading.c | 4 ++++ 3 files changed, 7 insertions(+)
drivers/net/wireless/intel/iwlwifi/fw/api/d3.h +2 -0
@@ -47,12 +47,14 @@ struct iwl_d3_manager_config {* @IWL_D3_PROTO_OFFLOAD_NS: NS (Neighbor Solicitation) is enabled * @IWL_D3_PROTO_IPV4_VALID: IPv4 data is valid * @IWL_D3_PROTO_IPV6_VALID: IPv6 data is valid +* @IWL_D3_PROTO_REJECT_BTM: reject BTM request */ enum iwl_proto_offloads {IWL_D3_PROTO_OFFLOAD_ARP =BIT (0 ),IWL_D3_PROTO_OFFLOAD_NS =BIT (1 ),IWL_D3_PROTO_IPV4_VALID =BIT (2 ),IWL_D3_PROTO_IPV6_VALID =BIT (3 ), +IWL_D3_PROTO_REJECT_BTM =BIT (4 ), };#define IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V1 2
drivers/net/wireless/intel/iwlwifi/fw/file.h +1 -0
@@ -463,6 +463,7 @@ enum iwl_ucode_tlv_capa {IWL_UCODE_TLV_CAPA_MLD_API_SUPPORT = (__force iwl_ucode_tlv_capa_t )110 ,IWL_UCODE_TLV_CAPA_SCAN_DONT_TOGGLE_ANT = (__force iwl_ucode_tlv_capa_t )111 ,IWL_UCODE_TLV_CAPA_PPAG_CHINA_BIOS_SUPPORT = (__force iwl_ucode_tlv_capa_t )112 , +IWL_UCODE_TLV_CAPA_OFFLOAD_REJ_BTM_SUPPORT = (__force iwl_ucode_tlv_capa_t )113 , #ifdef __CHECKER__/* sparse says it cannot increment the previous enum member */
drivers/net/wireless/intel/iwlwifi/mvm/offloading.c +4 -0
@@ -198,6 +198,10 @@ int iwl_mvm_send_proto_offload(struct iwl_mvm *mvm,memcpy (common->arp_mac_addr, vif->addr,ETH_ALEN ); } +if (fw_has_capa (&mvm->fw->ucode_capa, +IWL_UCODE_TLV_CAPA_OFFLOAD_REJ_BTM_SUPPORT )) + enabled |=IWL_D3_PROTO_REJECT_BTM ; +if (!disable_offloading) common->enabled =cpu_to_le32 (enabled);
Signature · 1 line
2.38.1
PATCH 8/14 wifi: iwlwifi: pcie: adjust Bz device timings
In reply to [email protected]From: Johannes Berg <[email protected]>
The 100ms shouldn't be needed, only 10ms. However after reset we should have 10ms as well for these devices.
--- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +6 -4
@@ -131,13 +131,15 @@ static int iwl_trans_pcie_sw_reset(struct iwl_trans *trans, bool retake_ownership) {/* Reset entire device - do controller reset (results in SHRD_HW_RST) */ -if (trans->trans_cfg->device_family >=IWL_DEVICE_FAMILY_BZ ) +if (trans->trans_cfg->device_family >=IWL_DEVICE_FAMILY_BZ ) {iwl_set_bit (trans,CSR_GP_CNTRL ,CSR_GP_CNTRL_REG_FLAG_SW_RESET ); -else +usleep_range (10000 ,20000 ); + }else {iwl_set_bit (trans,CSR_RESET ,CSR_RESET_REG_FLAG_SW_RESET ); -usleep_range (5000 ,6000 ); +usleep_range (5000 ,6000 ); + }if (retake_ownership)return iwl_pcie_prepare_card_hw (trans);
@@ -475,7 +477,7 @@ void iwl_pcie_apm_stop_master(struct iwl_trans *trans)CSR_GP_CNTRL_REG_FLAG_BUS_MASTER_DISABLE_STATUS ,CSR_GP_CNTRL_REG_FLAG_BUS_MASTER_DISABLE_STATUS , 100); -msleep (100 ); +usleep_range (10000 ,20000 ); }else {iwl_set_bit (trans,CSR_RESET ,CSR_RESET_REG_FLAG_STOP_MASTER );
Signature · 1 line
2.38.1
PATCH 9/14 wifi: iwlwifi: mvm: FTM initiator MLO support
In reply to [email protected]From: Avraham Stern <[email protected]>
When checking if the initiator is associated to the responder, iterate over all active links.
--- .../intel/iwlwifi/mvm/ftm-initiator.c | 45 +++++++++++++------ 1 file changed, 32 insertions(+), 13 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c +32 -13
@@ -72,15 +72,24 @@ int iwl_mvm_ftm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,* the TK is already configured for this station, so it * shouldn't be set again here. */ -if (vif->cfg.assoc && - !memcmp (addr, vif->bss_conf.bssid,ETH_ALEN )) { +if (vif->cfg.assoc) {struct iwl_mvm_vif *mvmvif =iwl_mvm_vif_from_mac80211 (vif); +struct ieee80211_bss_conf *link_conf; +unsigned int link_id;struct ieee80211_sta *sta; +u8 sta_id;rcu_read_lock (); - sta =rcu_dereference (mvm->fw_id_to_mac_id[mvmvif->deflink.ap_sta_id]); -if (!IS_ERR_OR_NULL (sta) && sta->mfp) - expected_tk_len =0 ; +for_each_vif_active_link (vif, link_conf, link_id) { +if (memcmp (addr, link_conf->bssid,ETH_ALEN )) +continue ; + + sta_id = mvmvif->link[link_id]->ap_sta_id; + sta =rcu_dereference (mvm->fw_id_to_mac_id[sta_id]); +if (!IS_ERR_OR_NULL (sta) && sta->mfp) + expected_tk_len =0 ; +break ; + }rcu_read_unlock (); }
@@ -518,20 +527,30 @@ iwl_mvm_ftm_put_target(struct iwl_mvm *mvm, struct ieee80211_vif *vif,iwl_mvm_ftm_put_target_common (mvm, peer, target); -if (vif->cfg.assoc && - !memcmp (peer->addr, vif->bss_conf.bssid,ETH_ALEN )) { +if (vif->cfg.assoc) {struct iwl_mvm_vif *mvmvif =iwl_mvm_vif_from_mac80211 (vif);struct ieee80211_sta *sta; +struct ieee80211_bss_conf *link_conf; +unsigned int link_id;rcu_read_lock (); +for_each_vif_active_link (vif, link_conf, link_id) { +if (memcmp (peer->addr, link_conf->bssid,ETH_ALEN )) +continue ; + + target->sta_id = mvmvif->link[link_id]->ap_sta_id; + sta =rcu_dereference (mvm->fw_id_to_mac_id[target->sta_id]); +if (WARN_ON_ONCE (IS_ERR_OR_NULL (sta))) { +rcu_read_unlock (); +return PTR_ERR_OR_ZERO (sta); + } - sta =rcu_dereference (mvm->fw_id_to_mac_id[mvmvif->deflink.ap_sta_id]); -if (sta->mfp && (peer->ftm.trigger_based || peer->ftm.non_trigger_based)) -FTM_PUT_FLAG (PMF ); - +if (sta->mfp && (peer->ftm.trigger_based || + peer->ftm.non_trigger_based)) +FTM_PUT_FLAG (PMF ); +break ; + }rcu_read_unlock (); - - target->sta_id = mvmvif->deflink.ap_sta_id; }else { target->sta_id =IWL_MVM_INVALID_STA ; }
Signature · 1 line
2.38.1
PATCH 10/14 wifi: iwlwifi: mvm: tell firmware about per-STA MFP enablement
In reply to [email protected]From: Johannes Berg <[email protected]>
Indicate to the firmware for each station whether or not MFP is used with this station. Note that we indicate MFP for it before authorized since we don't know yet, and that will make the firmware not handle should-be-protected management frames without being able to check them.
--- drivers/net/wireless/intel/iwlwifi/fw/file.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 5 +++++ 2 files changed, 6 insertions(+)
drivers/net/wireless/intel/iwlwifi/fw/file.h +1 -0
@@ -464,6 +464,7 @@ enum iwl_ucode_tlv_capa {IWL_UCODE_TLV_CAPA_SCAN_DONT_TOGGLE_ANT = (__force iwl_ucode_tlv_capa_t )111 ,IWL_UCODE_TLV_CAPA_PPAG_CHINA_BIOS_SUPPORT = (__force iwl_ucode_tlv_capa_t )112 ,IWL_UCODE_TLV_CAPA_OFFLOAD_REJ_BTM_SUPPORT = (__force iwl_ucode_tlv_capa_t )113 , +IWL_UCODE_TLV_CAPA_STA_EXP_MFP_SUPPORT = (__force iwl_ucode_tlv_capa_t )114 , #ifdef __CHECKER__/* sparse says it cannot increment the previous enum member */
drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +5 -0
@@ -442,6 +442,11 @@ static int iwl_mvm_mld_cfg_sta(struct iwl_mvm *mvm, struct ieee80211_sta *sta,if (mvm_sta->sta_state >=IEEE80211_STA_ASSOC ) cmd.assoc_id =cpu_to_le32 (sta->aid); +if (fw_has_capa (&mvm->fw->ucode_capa, +IWL_UCODE_TLV_CAPA_STA_EXP_MFP_SUPPORT ) && + (sta->mfp || mvm_sta->sta_state <IEEE80211_STA_AUTHORIZED )) + cmd.mfp =cpu_to_le32 (1 ); +switch (link_sta->rx_nss) {case 1 : cmd.mimo =cpu_to_le32 (0 );
Signature · 1 line
2.38.1
PATCH 11/14 wifi: iwlwifi: Add Dell to ppag approved list
In reply to [email protected]From: Alon Giladi <[email protected]>
Add 2 new entries for Dell in PPAG approved list.
--- drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/wireless/intel/iwlwifi/fw/acpi.c +10 -0
@@ -59,6 +59,16 @@ static const struct dmi_system_id dmi_ppag_approved_list[] = { DMI_MATCH(DMI_BOARD_VENDOR, "SAMSUNG ELECTRONICS CO., LTD"), }, }, + { .ident = "DELL", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + }, + }, + { .ident = "DELL", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), + }, + }, {} };
Signature · 1 line
2.38.1
PATCH 12/14 wifi: iwlwifi: remove dead code in iwl_dump_ini_imr_get_size()
In reply to [email protected]From: Mukesh Sisodiya <[email protected]>
Remove the check for the IMR debug data size which leads to dead code.
--- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/dbg.c +5 -7
@@ -2031,7 +2031,6 @@ static u32 iwl_dump_ini_imr_get_size(struct iwl_fw_runtime *fwrt, struct iwl_dump_ini_region_data *reg_data) { - u32 size = 0; u32 ranges = 0;u32 imr_enable = fwrt->trans->dbg.imr_data.imr_enable;u32 imr_size = fwrt->trans->dbg.imr_data.imr_size;
@@ -2041,17 +2040,16 @@ iwl_dump_ini_imr_get_size(struct iwl_fw_runtime *fwrt,IWL_DEBUG_INFO (fwrt,"WRT: Invalid imr data enable: %d, imr_size: %d, sram_size: %d\n" , imr_enable, imr_size, sram_size); -return size; +return 0 ; } - size = imr_size; ranges =iwl_dump_ini_imr_ranges (fwrt, reg_data); -if (!size && !ranges) { -IWL_ERR (fwrt,"WRT: imr_size :=%d, ranges :=%d\n" , size, ranges); +if (!ranges) { +IWL_ERR (fwrt,"WRT: ranges :=%d\n" , ranges);return 0 ; } - size +=sizeof (struct iwl_fw_ini_error_dump ) + + imr_size +=sizeof (struct iwl_fw_ini_error_dump ) + ranges *sizeof (struct iwl_fw_ini_error_dump_range ); -return size; +return imr_size; }/**
Signature · 1 line
2.38.1
PATCH 13/14 wifi: iwlwifi: mvm: remove warning for beacon filtering error
In reply to [email protected]From: Johannes Berg <[email protected]>
This warning is sometimes happening if we force a FW error while disconnecting, which is annoying but harmless.
However, it's also pointless to throw a warning here, since the stack and driver state doesn't really help, so just remove that so the driver will ignore the error if any.
--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +1 -5
@@ -3801,7 +3801,6 @@ iwl_mvm_sta_state_authorized_to_assoc(struct iwl_mvm *mvm, {struct iwl_mvm_vif *mvmvif =iwl_mvm_vif_from_mac80211 (vif);struct iwl_mvm_sta *mvmsta =iwl_mvm_sta_from_mac80211 (sta); -int ret;lockdep_assert_held (&mvm->mutex);
@@ -3820,10 +3819,7 @@ iwl_mvm_sta_state_authorized_to_assoc(struct iwl_mvm *mvm, mvmvif->authorized =0 ;/* disable beacon filtering */ - ret =iwl_mvm_disable_beacon_filter (mvm, vif,0 ); -WARN_ON (ret && - !test_bit (IWL_MVM_STATUS_HW_RESTART_REQUESTED , - &mvm->status)); +iwl_mvm_disable_beacon_filter (mvm, vif,0 ); }return 0 ;
Signature · 1 line
2.38.1
PATCH 14/14 wifi: iwlwifi: mvm: send time sync only if needed
In reply to [email protected]From: Johannes Berg <[email protected]>
If there's no peer configured then there's no point in sending the command down to the firmware with an invalid peer address.
--- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/fw.c +5 -3
@@ -1725,9 +1725,11 @@ int iwl_mvm_up(struct iwl_mvm *mvm)if (test_bit (IWL_MVM_STATUS_IN_HW_RESTART , &mvm->status)) {iwl_mvm_send_recovery_cmd (mvm,ERROR_RECOVERY_UPDATE_DB ); -iwl_mvm_time_sync_config (mvm, mvm->time_sync.peer_addr, -IWL_TIME_SYNC_PROTOCOL_TM | -IWL_TIME_SYNC_PROTOCOL_FTM ); + +if (mvm->time_sync.active) +iwl_mvm_time_sync_config (mvm, mvm->time_sync.peer_addr, +IWL_TIME_SYNC_PROTOCOL_TM | +IWL_TIME_SYNC_PROTOCOL_FTM ); }if (!mvm->ptp_data.ptp_clock)
Signature · 1 line
2.38.1