diff options
author | Avraham Stern <avraham.stern@intel.com> | 2022-10-30 20:17:41 +0300 |
---|---|---|
committer | Gregory Greenman <gregory.greenman@intel.com> | 2022-11-10 14:26:00 +0300 |
commit | 5aa7ce31bd84c2f4f059200f06c537c920cbb458 (patch) | |
tree | 278f2d1978f7cda77c47c122121b9690a889726c /drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h | |
parent | e5d3a64e650c721f9e9b1f76e5df8c62f16b734d (diff) | |
download | linux-5aa7ce31bd84c2f4f059200f06c537c920cbb458.tar.xz |
wifi: iwlwifi: mei: make sure ownership confirmed message is sent
It is possible that CSME will try to take ownership while the driver
is stopping. In this case, if the CSME takes ownership message arrives
after the driver started unregistering, the iwl_mei_cache->ops is
already invalid, so the host will not answer with the ownership
confirmed message.
Similarly, if the take ownership message arrived after the mac was
stopped or when iwl_mvm_up() failed, setting rfkill will not trigger
sending the confirm message. As a result, CSME will not take
ownership, which will result in a disconnection.
Fix it by sending the ownership confirmed message immediately in such
cases.
Fixes: 2da4366f9e2c ("iwlwifi: mei: add the driver to allow cooperation with CSME")
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20221030191011.b2a4c009e3e6.I7f931b7ee8b168e8ac88b11f23bff98b7ed3cb19@changeid
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h b/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h index bea61c8fb526..2e57438a70f0 100644 --- a/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h +++ b/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h @@ -448,9 +448,10 @@ void iwl_mei_host_associated(const struct iwl_mei_conn_info *conn_info, void iwl_mei_host_disassociated(void); /** - * iwl_mei_device_down() - must be called when the device is down + * iwl_mei_device_state() - must be called when the device changes up/down state + * @up: true if the device is up, false otherwise. */ -void iwl_mei_device_down(void); +void iwl_mei_device_state(bool up); #else @@ -499,7 +500,7 @@ static inline void iwl_mei_host_associated(const struct iwl_mei_conn_info *conn_ static inline void iwl_mei_host_disassociated(void) {} -static inline void iwl_mei_device_down(void) +static inline void iwl_mei_device_state(bool up) {} #endif /* CONFIG_IWLMEI */ |