summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Kondabattini <ganeshk@codeaurora.org>2018-03-14 11:45:52 +0530
committernshrivas <nshrivas@codeaurora.org>2018-03-28 06:18:57 -0700
commit4b8a086170dc2f0ea956855e5719bc75594ef647 (patch)
tree52d8d1242a73fe34a2d966af19234ef94bcf2139
parent62f2fa50f8c269d64e56365b2f9284b226fa379c (diff)
qcacld-3.0: Re initialize default SAP mandatory channel list
Re initialize default SAP mandatory channel list as part of the start bss. Without this change the 5GHz channels which were added as part of previous start bss are valid for the current start bss operation. Change-Id: Id234b413bbddb05efd3af8c3349271bf93a0a3bd CRs-Fixed: 2210134
-rw-r--r--core/cds/src/cds_concurrency.c2
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index 3d72e2bb57a1..54d9dea47abc 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -9907,6 +9907,8 @@ void cds_init_sap_mandatory_2g_chan(void)
cds_err("Error in getting valid channels");
return;
}
+ cds_ctx->sap_mandatory_channels_len = 0;
+
for (i = 0; i < len; i++) {
if (CDS_IS_CHANNEL_24GHZ(chan_list[i])) {
cds_err("Add chan %hu to mandatory list", chan_list[i]);
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 5c3f70b12256..2fcda104e697 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -9077,13 +9077,14 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
}
if (cds_is_sap_mandatory_chan_list_enabled()) {
- if (!cds_get_sap_mandatory_chan_list_len())
- cds_init_sap_mandatory_2g_chan();
-
if (CDS_IS_CHANNEL_5GHZ(channel)) {
hdd_debug("channel %hu, sap mandatory chan list enabled",
channel);
+ if (!cds_get_sap_mandatory_chan_list_len())
+ cds_init_sap_mandatory_2g_chan();
cds_add_sap_mandatory_chan(channel);
+ } else {
+ cds_init_sap_mandatory_2g_chan();
}
}