]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: iwlwifi: mld: properly handle async notification in op mode start
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 23 Apr 2025 06:16:37 +0000 (09:16 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 23 Apr 2025 13:37:40 +0000 (15:37 +0200)
commitb68df31ce636f397098ff426348d4e976d343404
tree065d605fffdf2982186483fc178dacaad32e529c
parent833026098b2d991092bd69f76155889bad214681
wifi: iwlwifi: mld: properly handle async notification in op mode start

From the moment that we have ALIVE, we can receive notification that
are handled asynchronously.

Some notifications (for example iwl_rfi_support_notif) requires an
operational FW. So we need to make sure that they were handled in
iwl_op_mode_mld_start before we stop the FW. Flush the async_handlers_wk
there to achieve that.

Also, if loading the FW in op mode start failed, we need to cancel
these notifications, as they are from a dead FW.

More than that, not doing so can cause us to access freed memory
if async_handlers_wk is executed after ieee80211_free_hw is called.

Fix this by canceling all async notifications if a failure occurred in
init (after ALIVE).

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250423091408.a8f63d983466.Ifd77d9c1a29fdd278b0a7bfc2709dd5d5e5efdb1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mld/d3.c
drivers/net/wireless/intel/iwlwifi/mld/fw.c
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
drivers/net/wireless/intel/iwlwifi/mld/mld.c
drivers/net/wireless/intel/iwlwifi/mld/mld.h