qcacld-3.0: Check driver load/unload status before starting tx
hdd_softap_hard_start_xmit has cds_ssr_protect so prevent it running at
point of cds_wait_for_external_threads_completion in wlan_hdd_remove,
but after that hdd_softap_hard_start_xmit still inject in, it will
cause race condition between tx and unloading deinit.
Fix it by checking driver load/unload status at the beginning of
__hdd_softap_hard_start_xmit, and similar change for sta mode.
Change-Id: Ic3c72debb81fdfb8adca4e90bd9436f3a68eea11
CRs-Fixed: 2174243
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index 2eea73e..ae3598b 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -299,9 +299,11 @@
* context may not be reinitialized at this time which may
* lead to a crash.
*/
- if (cds_is_driver_recovering() || cds_is_driver_in_bad_state()) {
+ if (cds_is_driver_recovering() || cds_is_driver_in_bad_state() ||
+ cds_is_load_or_unload_in_progress()) {
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_INFO_HIGH,
- "%s: Recovery in Progress. Ignore!!!", __func__);
+ "%s: Recovery/(Un)load in Progress. Ignore!!!",
+ __func__);
goto drop_pkt;
}