qcacld-3.0: Fix DFS CAC start event missing

At present check SAP on DFS is based on primary channel,
it doesn't work for 160M case. Use "sap_operating_on_dfs"
to do the check before deliver CAC Start event.

Change-Id: I3896dc2738da16b9bff0d54826191d0edcc251a4
CRs-Fixed: 2929729
Este commit está contenido en:
Liangwei Dong
2021-04-22 17:01:21 +08:00
cometido por Madan Koyyalamudi
padre 84c0ae58ae
commit 765b466f12

Ver fichero

@@ -1926,12 +1926,10 @@ static QDF_STATUS sap_cac_start_notify(mac_handle_t mac_handle)
uint8_t intf = 0;
struct mac_context *mac = MAC_CONTEXT(mac_handle);
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
qdf_freq_t ch_freq;
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
struct sap_context *sap_context =
mac->sap.sapCtxList[intf].sap_context;
struct csr_roam_profile *profile;
if (((QDF_SAP_MODE == mac->sap.sapCtxList[intf].sapPersona)
||
@@ -1939,10 +1937,9 @@ static QDF_STATUS sap_cac_start_notify(mac_handle_t mac_handle)
&& mac->sap.sapCtxList[intf].sap_context &&
(false == sap_context->isCacStartNotified)) {
/* Don't start CAC for non-dfs channel, its violation */
profile = &sap_context->csr_roamProfile;
ch_freq = profile->op_freq;
if (!wlan_reg_is_dfs_for_freq(mac->pdev,
ch_freq))
if (!sap_operating_on_dfs(
mac,
mac->sap.sapCtxList[intf].sap_context))
continue;
sap_debug("sapdfs: Signaling eSAP_DFS_CAC_START to HDD for sapctx[%pK]",
sap_context);
@@ -2008,7 +2005,6 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle,
uint8_t intf;
struct mac_context *mac = MAC_CONTEXT(mac_handle);
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
uint32_t freq;
/*
* eSAP_DFS_CHANNEL_CAC_END:
@@ -2019,7 +2015,6 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle,
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
struct sap_context *sap_context =
mac->sap.sapCtxList[intf].sap_context;
struct csr_roam_profile *profile;
if (((QDF_SAP_MODE == mac->sap.sapCtxList[intf].sapPersona)
||
@@ -2029,12 +2024,9 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle,
sap_is_dfs_cac_wait_state(sap_context)) {
sap_context = mac->sap.sapCtxList[intf].sap_context;
/* Don't check CAC for non-dfs channel */
profile = &sap_context->csr_roamProfile;
freq = profile->op_freq;
if (CHANNEL_STATE_DFS !=
wlan_reg_get_5g_bonded_channel_state_for_freq(mac->pdev,
freq,
profile->ch_params.ch_width))
if (!sap_operating_on_dfs(
mac,
mac->sap.sapCtxList[intf].sap_context))
continue;
/* If this is an end notification of a pre cac, the