qcacld-3.0: Populate correct PCL & ch numbers to avoid in case of SAP

Incorrect PCL is given by policy manager because of incorrect merging of
valid channel list & weight list which results in to unsafe channel selection.

Driver notifies the list of channels to avoid in terms of frequencies rather
than channel numbers which is not correct.

Change-Id: Ic71766e8c917931d4f051b512fb8000cc34a04ad
CRs-Fixed: 1077025
This commit is contained in:
Krunal Soni 2016-10-11 18:53:37 -07:00 • committed by qcabuildsw
commit 15f0db18db
2 changed files with 10 additions and 7 deletions

View file

@ -4570,6 +4570,9 @@ void cds_update_with_safe_channel_list(uint8_t *pcl_channels, uint32_t *len,
&unsafe_channel_count,
sizeof(unsafe_channel_list));
if (unsafe_channel_count == 0)
cds_notice("There are no unsafe channels");
if (unsafe_channel_count) {
qdf_mem_copy(current_channel_list, pcl_channels,
current_channel_count);
@ -4592,11 +4595,12 @@ void cds_update_with_safe_channel_list(uint8_t *pcl_channels, uint32_t *len,
}
}
if (!is_unsafe) {
pcl_channels[safe_channel_count++] =
pcl_channels[safe_channel_count] =
current_channel_list[i];
if (safe_channel_count < weight_len)
weight_list[safe_channel_count++] =
weight_list[safe_channel_count] =
org_weight_list[i];
safe_channel_count++;
}
}
*len = safe_channel_count;

View file

@ -5784,8 +5784,8 @@ static uint8_t hdd_get_safe_channel_from_pcl_and_acs_range(
hdd_info("chan[%d]:%d", i, pcl.pcl_list[i]);
found = false;
for (j = 0; j < hdd_ctx->unsafe_channel_count; j++) {
if (cds_chan_to_freq(pcl.pcl_list[i]) ==
hdd_ctx->unsafe_channel_list[j]) {
if (pcl.pcl_list[i] ==
hdd_ctx->unsafe_channel_list[j]) {
hdd_info("unsafe chan:%d", pcl.pcl_list[i]);
found = true;
break;
@ -5887,8 +5887,7 @@ void hdd_unsafe_channel_restart_sap(hdd_context_t *hdd_ctxt)
found = false;
for (i = 0; i < hdd_ctxt->unsafe_channel_count; i++) {
if (cds_chan_to_freq(
adapter_temp->sessionCtx.ap.operatingChannel) ==
if (adapter_temp->sessionCtx.ap.operatingChannel ==
hdd_ctxt->unsafe_channel_list[i]) {
found = true;
hdd_info("operating ch:%d is unsafe",
@ -6028,7 +6027,7 @@ void hdd_ch_avoid_cb(void *hdd_context, void *indi_param)
end_channel_idx; channel_loop++) {
hdd_ctxt->unsafe_channel_list[
hdd_ctxt->unsafe_channel_count++] =
CDS_CHANNEL_FREQ(channel_loop);
CDS_CHANNEL_NUM(channel_loop);
if (hdd_ctxt->unsafe_channel_count >=
NUM_CHANNELS) {
hdd_warn("LTECoex unsafe ch list full");