wifi: iwlwifi: mei: avoid blocking sap messages handling due to rtnl lock
authorAvraham Stern <avraham.stern@intel.com>
Sun, 30 Oct 2022 17:17:44 +0000 (19:17 +0200)
committerGregory Greenman <gregory.greenman@intel.com>
Thu, 10 Nov 2022 11:26:21 +0000 (13:26 +0200)
commitd288067ede4b375e72daf7f9a98d937ede11a311
treecf7cb3e3a7fc748b8638eb69b7bc6c14904b16b0
parentbcd68b3dbe78b7b0f7b6b55162cf1eff1e7fff9e
wifi: iwlwifi: mei: avoid blocking sap messages handling due to rtnl lock

The AMT_STATE sap message handler tries to take the rtnl lock.
This means that in case the rtnl lock is already taken, sap messages
will not be processed.
When an interface is brought up, the host requests ownership from
csme. However, since the rtnl lock is already held, if there is a
pending amt state message, the host will not be able to read the
ownership confirm message because the amt state message handler
is pending. As a result, the host fails to get ownership although
csme granted it.
Fix it by moving the part that needs the rtnl lock into a dedicated
worker, so handling sap messages can continue.

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.8599f2b4e9dd.I518f79e9099bf815c5f8d90235b4ce3250f59970@changeid
drivers/net/wireless/intel/iwlwifi/mei/main.c