mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Allow MCC if STA ch is non-preferred and sap ACS 1-11
If STA is present on non-preferred channel i.e. 12, 13, 14 and SAP ACS channel list is 1-11 then MCC is preferable as SAP don't want to come up on non-preferable channel. Change-Id: I82bd707c26258e0bf0b7cc14657185d11f56f757 CRs-Fixed: 2922824
This commit is contained in:
parent
a5f19a851e
commit
25701b0bd3
1 changed files with 24 additions and 1 deletions
|
|
@ -763,6 +763,26 @@ uint32_t sap_select_default_oper_chan(struct mac_context *mac_ctx,
|
|||
return default_freq;
|
||||
}
|
||||
|
||||
static bool is_mcc_preferred(struct sap_context *sap_context,
|
||||
uint32_t con_ch_freq)
|
||||
{
|
||||
/*
|
||||
* If SAP ACS channel list is 1-11 and STA is on non-preferred
|
||||
* channel i.e. 12, 13, 14 then MCC is unavoidable. This is because
|
||||
* if SAP is started on 12,13,14 some clients may not be able to
|
||||
* join dependending on their regulatory country.
|
||||
*/
|
||||
if ((con_ch_freq >= 2467) && (con_ch_freq <= 2484) &&
|
||||
(sap_context->acs_cfg->start_ch_freq >= 2412 &&
|
||||
sap_context->acs_cfg->end_ch_freq <= 2462)) {
|
||||
sap_debug("conc ch freq %d & sap acs ch list is 1-11, prefer mcc",
|
||||
con_ch_freq);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
sap_validate_chan(struct sap_context *sap_context,
|
||||
bool pre_start_bss,
|
||||
|
|
@ -852,9 +872,12 @@ sap_validate_chan(struct sap_context *sap_context,
|
|||
mac_ctx->pdev, &ch_params,
|
||||
con_ch_freq) ||
|
||||
sta_sap_scc_on_dfs_chan)) {
|
||||
if (is_mcc_preferred(sap_context, con_ch_freq))
|
||||
goto validation_done;
|
||||
|
||||
sap_debug("Override ch freq %d to %d due to CC Intf",
|
||||
sap_context->chan_freq,
|
||||
con_ch_freq);
|
||||
con_ch_freq);
|
||||
sap_context->chan_freq = con_ch_freq;
|
||||
sap_context->ch_params.ch_width =
|
||||
wlan_sap_get_concurrent_bw(mac_ctx->pdev,
|
||||
|
|
|
|||
Loading…
Reference in a new issue