qcacld-3.0: Update the acs mode in case of concurrency

Issue:-
Sap does not restart when unsafe
channel event comes, due to the acs mode
flag not set though acs happened.

Scenario:-
Turn on STA on channel number 1.
Turn on SAP on 2.4ghz band.
Make the channel number unsafe.

Observation:-
Sap fails to restart.

Expectation:
Sap should restart on some other channel.

Fix:-
Set the flag before the driver returns the
best channel as the STA channel.

Change-Id: I2cf2f5d3096da04f3c43969b7405b81c743fe2e2
CRs-Fixed: 2492087
This commit is contained in:
gaurank kathpalia 2019-07-19 09:04:07 +05:30 • committed by nshrivas
commit af483f51a8

View file

@ -2840,6 +2840,8 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
if (!QDF_IS_STATUS_SUCCESS(qdf_status))
hdd_err("get_external_acs_policy failed");
sap_config->acs_cfg.acs_mode = true;
if (is_external_acs_policy &&
policy_mgr_is_force_scc(hdd_ctx->psoc) &&
policy_mgr_get_connection_count(hdd_ctx->psoc)) {
@ -2927,7 +2929,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
hdd_debug("%d ", sap_config->acs_cfg.ch_list[i]);
}
sap_config->acs_cfg.acs_mode = true;
if (test_bit(ACS_IN_PROGRESS, &hdd_ctx->g_event_flags)) {
/* ***Note*** Completion variable usage is not allowed
* here since ACS scan operation may take max 2.2 sec
@ -3012,14 +3013,19 @@ static int wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
void wlan_hdd_undo_acs(struct hdd_adapter *adapter)
{
struct sap_config *sap_cfg;
if (!adapter)
return;
if (adapter->session.ap.sap_config.acs_cfg.ch_list) {
sap_cfg = &adapter->session.ap.sap_config;
if (sap_cfg->acs_cfg.ch_list) {
hdd_debug("Clearing ACS cfg channel list");
qdf_mem_free(adapter->session.ap.sap_config.acs_cfg.ch_list);
adapter->session.ap.sap_config.acs_cfg.ch_list = NULL;
qdf_mem_free(sap_cfg->acs_cfg.ch_list);
sap_cfg->acs_cfg.ch_list = NULL;
}
adapter->session.ap.sap_config.acs_cfg.ch_list_count = 0;
sap_cfg->acs_cfg.ch_list_count = 0;
sap_cfg->acs_cfg.acs_mode = false;
}
/**