From 4b8a086170dc2f0ea956855e5719bc75594ef647 Mon Sep 17 00:00:00 2001 From: Ganesh Kondabattini Date: Wed, 14 Mar 2018 11:45:52 +0530 Subject: 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 --- core/cds/src/cds_concurrency.c | 2 ++ core/hdd/src/wlan_hdd_hostapd.c | 7 ++++--- 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(); } } -- cgit v1.2.3