qcacld-3.0: Fix stop_bss_event timeout issue

Sometimes 'qdf_event_set(&hostapd_state->qdf_stop_bss_event)'
is invoked from 'wlansap_stop_bss' in other thread before
invoking 'qdf_event_reset(&hostapd_state->qdf_stop_bss_event)'.
Then 'stop_bss_event' timeout happens even if 'qdf_stop_bss_event'
has been set.

To fix this issue, make sure 'qdf_event_reset(&hostapd_state->
qdf_stop_bss_event)' happens before 'wlansap_stop_bss'.

Change-Id: I2e591290453e0a6463f04680fd8c476738ae8a65
CRs-Fixed: 3060404
This commit is contained in:
Rongjing Liao
2021-10-27 13:42:04 +08:00
committed by Madan Koyyalamudi
부모 3d636ecabd
커밋 d0be368b20

파일 보기

@@ -7775,14 +7775,14 @@ QDF_STATUS hdd_stop_adapter_ext(struct hdd_context *hdd_ctx,
mutex_lock(&hdd_ctx->sap_lock);
if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags)) {
struct hdd_hostapd_state *hostapd_state =
WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter);
qdf_event_reset(&hostapd_state->qdf_stop_bss_event);
status = wlansap_stop_bss(
WLAN_HDD_GET_SAP_CTX_PTR(adapter));
if (QDF_IS_STATUS_SUCCESS(status)) {
struct hdd_hostapd_state *hostapd_state =
WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter);
qdf_event_reset(&hostapd_state->
qdf_stop_bss_event);
status = qdf_wait_single_event(
&hostapd_state->qdf_stop_bss_event,
SME_CMD_STOP_BSS_TIMEOUT);