qcacld-3.0: Not handle channel avoid event during CAC

Set chanlist=52-64 and channel=0 in hostapd.conf.
After ACS, SAP setup on channel 52, during CAC, Receive channel avoid
event with unsafe channel list 52-60.
Observed Results:
CAC completed, SAP brought up on channel 52.
Expected Results:
channel avoidance should happen, switch to safe channel, such as 36.
During CAC, SAP is not in SAP_STARTED state, so channel avoid event is
ignored.

Fix: After CAC completed and SAP started, check current channel,
if unsafe, will find safe channel from PCL and switch to it, dbs and scc
is preferred.

Change-Id: I54f9229825a74e1f4c03c156a8b194a321581b57
CRs-Fixed: 2773833
This commit is contained in:
Jianmin Zhu
2020-11-23 10:34:28 +08:00
committed by snandini
부모 262f5cef16
커밋 60a41a32a0

파일 보기

@@ -3148,6 +3148,10 @@ qdf_freq_t wlansap_get_chan_band_restrict(struct sap_context *sap_ctx,
sap_debug("channel is passive");
*csa_reason = CSA_REASON_CHAN_PASSIVE;
return wlansap_get_safe_channel_from_pcl_for_sap(sap_ctx);
} else if (!policy_mgr_is_safe_channel(mac->psoc, sap_ctx->chan_freq)) {
sap_debug("channel is unsafe");
*csa_reason = CSA_REASON_UNSAFE_CHANNEL;
return wlansap_get_safe_channel_from_pcl_and_acs_range(sap_ctx);
} else {
sap_debug("No need switch SAP/Go channel");
return 0;