qcacld-3.0: Don't move SAP if SCC on lte coex channel is allowed

If STA+SAP is doing SCC & g_sta_sap_scc_on_lte_coex_chan is set,
don't move SAP to a different channel when LTE channel avoidance
event comes.

Change-Id: I3dfdbb6d59769a8ff9b3b2e6d828feee94630569
CRs-Fixed: 2261795
This commit is contained in:
Tushnim Bhattacharyya 2018-06-18 11:58:50 -07:00 committed by nshrivas
parent ea70106cda
commit d2e085d002

View File

@ -8242,16 +8242,25 @@ void hdd_unsafe_channel_restart_sap(struct hdd_context *hdd_ctxt)
}
found = false;
for (i = 0; i < hdd_ctxt->unsafe_channel_count; i++) {
if (adapter->session.ap.operating_channel ==
hdd_ctxt->unsafe_channel_list[i]) {
found = true;
hdd_debug("operating ch:%d is unsafe",
adapter->session.ap.operating_channel);
break;
/*
* If STA+SAP is doing SCC & g_sta_sap_scc_on_lte_coex_chan
* is set, no need to move SAP.
*/
if (policy_mgr_is_sta_sap_scc(hdd_ctxt->hdd_psoc,
adapter->session.ap.operating_channel) &&
hdd_ctxt->config->sta_sap_scc_on_lte_coex_chan)
hdd_debug("SAP is allowed on SCC channel, no need to move SAP");
else {
for (i = 0; i < hdd_ctxt->unsafe_channel_count; i++) {
if (adapter->session.ap.operating_channel ==
hdd_ctxt->unsafe_channel_list[i]) {
found = true;
hdd_debug("operating ch:%d is unsafe",
adapter->session.ap.operating_channel);
break;
}
}
}
if (!found) {
hdd_debug("ch:%d is safe. no need to change channel",
adapter->session.ap.operating_channel);