diff options
| author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2023-03-28 10:58:52 +0300 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2023-03-30 12:07:53 +0200 |
| commit | 75700ee1644f23ccb2742dbe623a1094a9aab753 (patch) | |
| tree | 66717b55f67377e777add26860459afe7eaff05d | |
| parent | cea05a8651759135ee3c92d35bd13553669635d0 (diff) | |
wifi: iwlwifi: mvm: fix crash on queue removal for MLD API too
The patch linked below fixes the crash on queue removal bug only
for the non-MLD API. Do the same for the MLD API.
Fixes: c5a976cf6a75 ("wifi: iwlwifi: modify new queue allocation command")
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.527dace26147.Ia215df5833634f95688a979f39fae70c1ac4e027@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index a6eb18830cd9..fc380e59c740 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -258,27 +258,19 @@ int iwl_mvm_mld_add_aux_sta(struct iwl_mvm *mvm, u32 lmac_id) IWL_MAX_TID_COUNT, NULL); } -static int iwl_mvm_mld_disable_txq(struct iwl_mvm *mvm, - struct ieee80211_sta *sta, +static int iwl_mvm_mld_disable_txq(struct iwl_mvm *mvm, int sta_id, u16 *queueptr, u8 tid) { - struct iwl_mvm_sta *mvmsta; int queue = *queueptr; int ret = 0; - if (!sta) - return -EINVAL; - - mvmsta = iwl_mvm_sta_from_mac80211(sta); - if (mvm->sta_remove_requires_queue_remove) { u32 cmd_id = WIDE_ID(DATA_PATH_GROUP, SCD_QUEUE_CONFIG_CMD); struct iwl_scd_queue_cfg_cmd remove_cmd = { .operation = cpu_to_le32(IWL_SCD_QUEUE_REMOVE), .u.remove.tid = cpu_to_le32(tid), - .u.remove.sta_mask = - cpu_to_le32(BIT(mvmsta->deflink.sta_id)), + .u.remove.sta_mask = cpu_to_le32(BIT(sta_id)), }; ret = iwl_mvm_send_cmd_pdu(mvm, cmd_id, 0, @@ -308,7 +300,7 @@ static int iwl_mvm_mld_rm_int_sta(struct iwl_mvm *mvm, if (flush) iwl_mvm_flush_sta(mvm, int_sta, true); - iwl_mvm_mld_disable_txq(mvm, NULL, queuptr, tid); + iwl_mvm_mld_disable_txq(mvm, int_sta->sta_id, queuptr, tid); ret = iwl_mvm_mld_rm_sta_from_fw(mvm, int_sta->sta_id); if (ret) @@ -536,8 +528,8 @@ static void iwl_mvm_mld_disable_sta_queues(struct iwl_mvm *mvm, if (mvm_sta->tid_data[i].txq_id == IWL_MVM_INVALID_QUEUE) continue; - iwl_mvm_mld_disable_txq(mvm, sta, &mvm_sta->tid_data[i].txq_id, - i); + iwl_mvm_mld_disable_txq(mvm, mvm_sta->deflink.sta_id, + &mvm_sta->tid_data[i].txq_id, i); mvm_sta->tid_data[i].txq_id = IWL_MVM_INVALID_QUEUE; } |
