diff options
author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2024-03-06 13:05:22 +0200 |
---|---|---|
committer | iwlwifi publisher <> | 2024-04-17 13:05:35 +0000 |
commit | 9a69cba83f5a1b5fea441d290740b4cdbb1f745a (patch) | |
tree | 4184bf76e3470643a3db3d45189dfcb15be7fe77 | |
parent | 54e0a92ea35d0f957d5698de30d6484d3160ce00 (diff) | |
download | backport-iwlwifi-9a69cba83f5a1b5fea441d290740b4cdbb1f745a.tar.gz |
[BUGFIX] wifi: iwlwifi: mvm: initialize mlo_int_scan_wk also for non-MLO
This work is initialized in the MLD API code, but cancelled in the code
thats is common to both non-MLD and MLD, leading to a NULL dereference in
non-MLD devices
type=bugfix
ticket=none
fixes=Ia79605838eb6deee9358bec633ef537f2653db92
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Change-Id: I05009b247b9f5a18b749764c787f7447a315a434
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/97772
automatic-review: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
x-iwlwifi-stack-dev: 89cdde18cf0623840329b5291f7a3090339080b7
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 16 | ||||
-rw-r--r-- | versions | 2 |
3 files changed, 19 insertions, 16 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 5fb597392c..90d7c87df0 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -4064,6 +4064,20 @@ static void iwl_mvm_prevent_esr_done_wk(struct wiphy *wiphy, mutex_unlock(&mvm->mutex); } +static void iwl_mvm_mlo_int_scan_wk(struct wiphy *wiphy, struct wiphy_work *wk) +{ + struct iwl_mvm_vif *mvmvif = container_of(wk, struct iwl_mvm_vif, + mlo_int_scan_wk.work); + struct ieee80211_vif *vif = + container_of((void *)mvmvif, struct ieee80211_vif, drv_priv); + + mutex_lock(&mvmvif->mvm->mutex); + + iwl_mvm_int_mlo_scan(mvmvif->mvm, vif); + + mutex_unlock(&mvmvif->mvm->mutex); +} + static int iwl_mvm_sta_state_assoc_to_authorized(struct iwl_mvm *mvm, struct ieee80211_vif *vif, @@ -4106,6 +4120,9 @@ iwl_mvm_sta_state_assoc_to_authorized(struct iwl_mvm *mvm, wiphy_delayed_work_init(&mvmvif->prevent_esr_done_wk, iwl_mvm_prevent_esr_done_wk); + wiphy_delayed_work_init(&mvmvif->mlo_int_scan_wk, + iwl_mvm_mlo_int_scan_wk); + /* when client is authorized (AP station marked as such), * try to enable the best link(s). */ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index b49f7f5364..ba8e742c70 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -4,19 +4,6 @@ */ #include "mvm.h" -static void iwl_mvm_mlo_int_scan_wk(struct wiphy *wiphy, struct wiphy_work *wk) -{ - struct iwl_mvm_vif *mvmvif = container_of(wk, struct iwl_mvm_vif, - mlo_int_scan_wk.work); - struct ieee80211_vif *vif = - container_of((void *)mvmvif, struct ieee80211_vif, drv_priv); - - mutex_lock(&mvmvif->mvm->mutex); - - iwl_mvm_int_mlo_scan(mvmvif->mvm, vif); - - mutex_unlock(&mvmvif->mvm->mutex); -} static void iwl_mvm_unblock_esr_tpt(struct wiphy *wiphy, struct wiphy_work *wk) { @@ -102,8 +89,7 @@ static int iwl_mvm_mld_mac_add_interface(struct ieee80211_hw *hw, iwl_mvm_tcm_add_vif(mvm, vif); INIT_DELAYED_WORK(&mvmvif->csa_work, iwl_mvm_channel_switch_disconnect_wk); - wiphy_delayed_work_init(&mvmvif->mlo_int_scan_wk, - iwl_mvm_mlo_int_scan_wk); + wiphy_work_init(&mvmvif->unblock_esr_tpt_wk, iwl_mvm_unblock_esr_tpt); if (vif->type == NL80211_IFTYPE_MONITOR) { @@ -2,4 +2,4 @@ BACKPORTS_VERSION="(see git)" BACKPORTED_KERNEL_VERSION="(see git)" BACKPORTED_KERNEL_NAME="iwlwifi" BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__ -BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11977:e5f4905d" +BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11978:89cdde18" |