qcacld-3.0: Mitigate Rmmod/SSR deadlock

The platform driver will not allow the WLAN SoC to be removed if a
firmware down indication has been received. However, the firmware down
indication can be received in a hardware interrupt context, and so must
never block. This makes it impossible to add appropriate synchronization
to the firmware down indication handler. This all culminates in a
situation where any check to see if recovery is in progress by the WLAN
driver during rmmod will always be racy and be susceptible to deadlock.

Move remove outside of the protection of the rmmod transition, instead
protecting remove with its own transition. This relies on the platform
driver to do the serialization with recovery itself, removing the
recovery-in-progress check from WLAN.

This fix is _not_ multi-SoC compatible. However, the current platform
driver/wlan driver interface is not multi-SoC compatible either. When
this API is reworked to add multi-SoC support, this issue will need to
be revisited.

Change-Id: Iec28e822182e698427bb40fe1d7e1b39e9ddfc8b
CRs-Fixed: 2388039
3 files changed