aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
diff options
context:
space:
mode:
authorMiri Korenblit <[email protected]>2023-03-28 10:58:48 +0300
committerJohannes Berg <[email protected]>2023-03-30 12:07:53 +0200
commit56f4f12ba8f6d8cb52f776dfcd261f2e1040d38c (patch)
tree4b22cac23fea34d2a5672187784e91fd23d9480c /drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
parentfe8b2ad361fb92f4b2b7b003c4609a2a7ed1fbda (diff)
wifi: iwlwifi: mvm: unite sta_modify_disable_tx flows
These flows are the same in both MLD API and the current API, except for the commands that are being sent during this flows. Instead of checking each time before calling these floews what API we use and then call the correct function, call always the old one, which in turn will call the new one in case we're using the MLD API. Signed-off-by: Miri Korenblit <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20230328104948.5692d8dea9be.Ib1882b2c2f0b0603abc4b7d4a0ecc45cd1fbf9a7@changeid Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
index 643eb58317f0..a6eb18830cd9 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
@@ -589,24 +589,14 @@ int iwl_mvm_mld_rm_sta_id(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
return ret;
}
-static void iwl_mvm_mld_sta_modify_disable_tx(struct iwl_mvm *mvm,
- struct ieee80211_sta *sta,
- bool disable)
+void iwl_mvm_mld_sta_modify_disable_tx(struct iwl_mvm *mvm,
+ struct iwl_mvm_sta *mvmsta,
+ bool disable)
{
- struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
struct iwl_mvm_sta_disable_tx_cmd cmd;
int ret;
- spin_lock_bh(&mvm_sta->lock);
-
- if (mvm_sta->disable_tx == disable) {
- spin_unlock_bh(&mvm_sta->lock);
- return;
- }
-
- mvm_sta->disable_tx = disable;
-
- cmd.sta_id = cpu_to_le32(mvm_sta->deflink.sta_id);
+ cmd.sta_id = cpu_to_le32(mvmsta->deflink.sta_id);
cmd.disable = cpu_to_le32(disable);
ret = iwl_mvm_send_cmd_pdu(mvm,
@@ -616,6 +606,22 @@ static void iwl_mvm_mld_sta_modify_disable_tx(struct iwl_mvm *mvm,
IWL_ERR(mvm,
"Failed to send STA_DISABLE_TX_CMD command (%d)\n",
ret);
+}
+
+void iwl_mvm_mld_sta_modify_disable_tx_ap(struct iwl_mvm *mvm,
+ struct ieee80211_sta *sta,
+ bool disable)
+{
+ struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
+
+ spin_lock_bh(&mvm_sta->lock);
+
+ if (mvm_sta->disable_tx == disable) {
+ spin_unlock_bh(&mvm_sta->lock);
+ return;
+ }
+
+ iwl_mvm_mld_sta_modify_disable_tx(mvm, mvm_sta, disable);
spin_unlock_bh(&mvm_sta->lock);
}
@@ -641,7 +647,7 @@ void iwl_mvm_mld_modify_all_sta_disable_tx(struct iwl_mvm *mvm,
FW_CMD_ID_AND_COLOR(mvmvif->id, mvmvif->color))
continue;
- iwl_mvm_mld_sta_modify_disable_tx(mvm, sta, disable);
+ iwl_mvm_mld_sta_modify_disable_tx(mvm, mvm_sta, disable);
}
rcu_read_unlock();