summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrunal Soni <ksoni@codeaurora.org>2016-10-11 18:53:37 -0700
committerqcabuildsw <qcabuildsw@localhost>2016-10-17 21:57:24 -0700
commit15f0db18dbd0ea1ff5f6e21deccf501e928fd013 (patch)
treed7f800fee101d6823cc4d8fcdc72901c5d555f44
parent0519291e8f2597379bc049f1b84a4f6318648aca (diff)
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
-rw-r--r--core/cds/src/cds_concurrency.c8
-rw-r--r--core/hdd/src/wlan_hdd_main.c9
2 files changed, 10 insertions, 7 deletions
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index d0034479540a..a2c6abd50907 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -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;
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 02d0140eea9f..291b0ab9077f 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -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");