Commit 32dc0f8e authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Johannes Berg

wifi: iwlwifi: mvm: do not send STA_DISABLE_TX_CMD for newer firmware

Newest firmware has completely offloaded this logic and this command
will be deprecated soon. Based on a capability bit advertised by the
firmware, skip this command.
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20231207044813.e64ef70c0133.I9f47cdef2ba45f1f383b70023857376973de3a8c@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 14c1b6f4
......@@ -243,6 +243,8 @@ typedef unsigned int __bitwise iwl_ucode_tlv_api_t;
* version tables.
* @IWL_UCODE_TLV_API_REDUCED_SCAN_CONFIG: This ucode supports v3 of
* SCAN_CONFIG_DB_CMD_API_S.
* @IWL_UCODE_TLV_API_NO_HOST_DISABLE_TX: Firmware offloaded the station disable tx
* logic.
*
* @NUM_IWL_UCODE_TLV_API: number of bits used
*/
......@@ -280,6 +282,7 @@ enum iwl_ucode_tlv_api {
IWL_UCODE_TLV_API_ADWELL_HB_DEF_N_AP = (__force iwl_ucode_tlv_api_t)57,
IWL_UCODE_TLV_API_SCAN_EXT_CHAN_VER = (__force iwl_ucode_tlv_api_t)58,
IWL_UCODE_TLV_API_BAND_IN_RX_DATA = (__force iwl_ucode_tlv_api_t)59,
IWL_UCODE_TLV_API_NO_HOST_DISABLE_TX = (__force iwl_ucode_tlv_api_t)66,
NUM_IWL_UCODE_TLV_API
/*
......
......@@ -872,6 +872,9 @@ void iwl_mvm_mld_sta_modify_disable_tx(struct iwl_mvm *mvm,
cmd.sta_id = cpu_to_le32(mvmsta->deflink.sta_id);
cmd.disable = cpu_to_le32(disable);
if (WARN_ON(iwl_mvm_has_no_host_disable_tx(mvm)))
return;
ret = iwl_mvm_send_cmd_pdu(mvm,
WIDE_ID(MAC_CONF_GROUP, STA_DISABLE_TX_CMD),
CMD_ASYNC, sizeof(cmd), &cmd);
......
......@@ -1514,6 +1514,12 @@ static inline bool iwl_mvm_has_quota_low_latency(struct iwl_mvm *mvm)
IWL_UCODE_TLV_API_QUOTA_LOW_LATENCY);
}
static inline bool iwl_mvm_has_no_host_disable_tx(struct iwl_mvm *mvm)
{
return fw_has_api(&mvm->fw->ucode_capa,
IWL_UCODE_TLV_API_NO_HOST_DISABLE_TX);
}
static inline bool iwl_mvm_has_tlc_offload(const struct iwl_mvm *mvm)
{
return fw_has_capa(&mvm->fw->ucode_capa,
......
......@@ -4150,7 +4150,8 @@ void iwl_mvm_sta_modify_disable_tx(struct iwl_mvm *mvm,
int ret;
if (mvm->mld_api_is_used) {
iwl_mvm_mld_sta_modify_disable_tx(mvm, mvmsta, disable);
if (!iwl_mvm_has_no_host_disable_tx(mvm))
iwl_mvm_mld_sta_modify_disable_tx(mvm, mvmsta, disable);
return;
}
......@@ -4167,7 +4168,8 @@ void iwl_mvm_sta_modify_disable_tx_ap(struct iwl_mvm *mvm,
struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
if (mvm->mld_api_is_used) {
iwl_mvm_mld_sta_modify_disable_tx_ap(mvm, sta, disable);
if (!iwl_mvm_has_no_host_disable_tx(mvm))
iwl_mvm_mld_sta_modify_disable_tx_ap(mvm, sta, disable);
return;
}
......@@ -4222,7 +4224,9 @@ void iwl_mvm_modify_all_sta_disable_tx(struct iwl_mvm *mvm,
int i;
if (mvm->mld_api_is_used) {
iwl_mvm_mld_modify_all_sta_disable_tx(mvm, mvmvif, disable);
if (!iwl_mvm_has_no_host_disable_tx(mvm))
iwl_mvm_mld_modify_all_sta_disable_tx(mvm, mvmvif,
disable);
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment