From bcd1487b9ee5ee0fe35bbb23863abadb994e87d2 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Wed, 1 Dec 2021 16:56:16 +0800 Subject: [PATCH] qcacld-3.0: Reset sap_radar_found_status flag before start sap "sap_radar_found_status" is used to check Radar event detected or not in CAC wait state. Clear "sap_radar_found_status" before SAP starts to avoid the stale value saved in previous sap start or CSA. This can happen when the SAP is restart state and get "stop ap" request from userspace. The invalid value will cause the wlansap_start_beacon_req retrun without deliver start beacon msg and cause the no beacon in OTA. Change-Id: I6336510881333e2775c29dcc167a77d5d745ace9 CRs-Fixed: 3085312 --- core/sap/src/sap_fsm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 57ac63943723..f7549900fd3f 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -2288,6 +2288,10 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx, eSAP_CHANNEL_CHANGE_EVENT, (void *)eSAP_STATUS_SUCCESS); sap_dfs_set_current_channel(sap_ctx); + /* Reset radar found flag before start sap, the flag will + * be set when radar found in CAC wait. + */ + mac_ctx->sap.SapDfsInfo.sap_radar_found_status = false; sap_debug("session: %d", sap_ctx->sessionId); @@ -2652,6 +2656,7 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx, mac_handle); } else { sap_debug("skip cac timer"); + mac_ctx->sap.SapDfsInfo.sap_radar_found_status = false; /* * If hostapd starts AP on dfs channel, * hostapd will wait for CAC START/CAC END