mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Filter SAP based upon ACS channel list
Scenario: 1. Start SAP on any potential LTE-COEX channel. 2. SAP would restart when it gets the event of unsafe channel. Observation: SAP restarts on a channel not in ACS channel list. Expectation: SAP should restart in channels given by the user space only which are configured by hostapd. Issue with driver: Currently in wlansap_filter_ch_based_acs, the driver eliminates the channels based upon the ACS start, and end channel, and not the channel list, which can lead to almost all the channels being picked, and none eliminated if the start channel was 1, and end channel was 165, even when only two channels, say 1 and 165 only were present in ACS channel list. Fix: Fix is to eliminate all the candidate channels which were not part of the ACS channel list, and pick only those channels that were part of initial do_acs request. Change-Id: Ib3b0b0a77c07b423b66e99feb085a370ed01f2de CRs-Fixed: 2454270
This commit is contained in:
parent
7123a69f72
commit
a92bb13dfc
1 changed files with 23 additions and 2 deletions
|
|
@ -2725,6 +2725,26 @@ QDF_STATUS wlansap_update_owe_info(struct sap_context *sap_ctx,
|
|||
return status;
|
||||
}
|
||||
|
||||
static bool wlansap_is_channel_present_in_acs_list(uint8_t ch,
|
||||
uint8_t *ch_list,
|
||||
uint8_t ch_count)
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
for(i = 0; i < ch_count; i++) {
|
||||
if (ch_list[i] == ch) {
|
||||
/*
|
||||
* channel was given by hostpad for ACS, and is present
|
||||
* in PCL.
|
||||
*/
|
||||
sap_debug("channel present in ACS channel list %d", ch);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
QDF_STATUS wlansap_filter_ch_based_acs(struct sap_context *sap_ctx,
|
||||
uint8_t *ch_list,
|
||||
uint32_t *ch_cnt)
|
||||
|
|
@ -2738,8 +2758,9 @@ QDF_STATUS wlansap_filter_ch_based_acs(struct sap_context *sap_ctx,
|
|||
}
|
||||
|
||||
for (ch_index = 0; ch_index < *ch_cnt; ch_index++) {
|
||||
if (ch_list[ch_index] >= sap_ctx->acs_cfg->start_ch &&
|
||||
ch_list[ch_index] <= sap_ctx->acs_cfg->end_ch)
|
||||
if (wlansap_is_channel_present_in_acs_list(ch_list[ch_index],
|
||||
sap_ctx->acs_cfg->ch_list,
|
||||
sap_ctx->acs_cfg->ch_list_count))
|
||||
ch_list[target_ch_cnt++] = ch_list[ch_index];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue