diff options
author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2023-03-28 10:58:47 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-03-30 13:07:53 +0300 |
commit | fe8b2ad361fb92f4b2b7b003c4609a2a7ed1fbda (patch) | |
tree | 8d51d4efd907c3702e40a6ffce78e56c32f64f8b /drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | |
parent | feebebae1fc3a9c02395ce48074e763cbcdecc8e (diff) | |
download | linux-fe8b2ad361fb92f4b2b7b003c4609a2a7ed1fbda.tar.xz |
wifi: iwlwifi: mvm: add cancel/remain_on_channel for MLD mode
Add an MLD version of the remain_on_channel and
cancel_remain_on_channel callbacks.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230328104948.b51813dbebd4.Ia25bbd63d3138e4759237ce2be0cd0436fe01c0a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 16723d581a3d..643eb58317f0 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -75,6 +75,24 @@ static int iwl_mvm_mld_rm_sta_from_fw(struct iwl_mvm *mvm, u32 sta_id) return 0; } +static int iwl_mvm_add_aux_sta_to_fw(struct iwl_mvm *mvm, + struct iwl_mvm_int_sta *sta, + u32 lmac_id) +{ + int ret; + + struct iwl_mvm_aux_sta_cmd cmd = { + .sta_id = cpu_to_le32(sta->sta_id), + .lmac_id = cpu_to_le32(lmac_id), + }; + + ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(MAC_CONF_GROUP, AUX_STA_CMD), + 0, sizeof(cmd), &cmd); + if (ret) + IWL_ERR(mvm, "Failed to send AUX_STA_CMD\n"); + return ret; +} + /* * Adds an internal sta to the FW table with its queues */ @@ -91,7 +109,10 @@ static int iwl_mvm_mld_add_int_sta_with_queue(struct iwl_mvm *mvm, if (WARN_ON_ONCE(sta->sta_id == IWL_MVM_INVALID_STA)) return -ENOSPC; - ret = iwl_mvm_mld_add_int_sta_to_fw(mvm, sta, addr, phy_id); + if (sta->type == STATION_TYPE_AUX) + ret = iwl_mvm_add_aux_sta_to_fw(mvm, sta, phy_id); + else + ret = iwl_mvm_mld_add_int_sta_to_fw(mvm, sta, addr, phy_id); if (ret) return ret; @@ -224,6 +245,19 @@ int iwl_mvm_mld_add_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) IWL_MAX_TID_COUNT, NULL); } +int iwl_mvm_mld_add_aux_sta(struct iwl_mvm *mvm, u32 lmac_id) +{ + lockdep_assert_held(&mvm->mutex); + + /* In CDB NICs we need to specify which lmac to use for aux activity + * using the phy_id argument place to send lmac_id to the function + */ + return iwl_mvm_mld_add_int_sta(mvm, &mvm->aux_sta, &mvm->aux_queue, + NL80211_IFTYPE_UNSPECIFIED, + STATION_TYPE_AUX, lmac_id, NULL, + IWL_MAX_TID_COUNT, NULL); +} + static int iwl_mvm_mld_disable_txq(struct iwl_mvm *mvm, struct ieee80211_sta *sta, u16 *queueptr, u8 tid) @@ -332,6 +366,14 @@ int iwl_mvm_mld_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) IWL_MAX_TID_COUNT, &mvm->snif_queue); } +int iwl_mvm_mld_rm_aux_sta(struct iwl_mvm *mvm) +{ + lockdep_assert_held(&mvm->mutex); + + return iwl_mvm_mld_rm_int_sta(mvm, &mvm->aux_sta, false, + IWL_MAX_TID_COUNT, &mvm->aux_queue); +} + /* send a cfg sta command to add/update a sta in firmware */ static int iwl_mvm_mld_cfg_sta(struct iwl_mvm *mvm, struct ieee80211_sta *sta, struct ieee80211_vif *vif, u16 phy_id) |