summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushnim Bhattacharyya <tushnimb@codeaurora.org>2017-07-18 15:43:09 -0700
committersnandini <snandini@codeaurora.org>2017-08-04 02:24:19 -0700
commit8172cbf22f70b0b3f74b64ecf9eccedbd8dceab6 (patch)
treeb3823acd00137ce18d94cb724bbc3ccdb2c7f5ae
parent092c06b42b54e10b8dda0d9e8268f3116cfd1ff7 (diff)
qcacld-3.0: Do not notify supplicant of 5GHz LTE avoid channel range
Do not notify supplicant of 5G LTE avoid channel range if ini restart_beaconing_on_chan_avoid_event is set to 2. Change-Id: Ide862882f4cf871688880653ec5c746e4c2dce38 CRs-Fixed: 2078612
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h16
-rw-r--r--core/hdd/src/wlan_hdd_main.c7
2 files changed, 19 insertions, 4 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 1e67b820d14f..4132fc9bedaf 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -9297,7 +9297,7 @@ enum dot11p_mode {
* restart_beaconing_on_chan_avoid_event - control the beaconing entity to move
* away from active LTE channels
* @Min: 0
- * @Max: 1
+ * @Max: 2
* @Default: 1
*
* This ini is used to control the beaconing entity (SAP/GO) to move away from
@@ -9306,6 +9306,8 @@ enum dot11p_mode {
* from active LTE channels
* restart_beaconing_on_chan_avoid_event=1: Allow beaconing entity move from
* active LTE channels
+ * restart_beaconing_on_chan_avoid_event=2: Allow beaconing entity move from
+ * 2.4G active LTE channels only
*
* Related: None
*
@@ -9315,10 +9317,16 @@ enum dot11p_mode {
*
* </ini>
*/
+enum restart_beaconing_on_ch_avoid_rule {
+ DO_NOT_RESTART,
+ RESTART,
+ RESTART_24G_ONLY,
+};
+
#define CFG_RESTART_BEACONING_ON_CH_AVOID_NAME "restart_beaconing_on_chan_avoid_event"
-#define CFG_RESTART_BEACONING_ON_CH_AVOID_MIN (0)
-#define CFG_RESTART_BEACONING_ON_CH_AVOID_MAX (1)
-#define CFG_RESTART_BEACONING_ON_CH_AVOID_DEFAULT (1)
+#define CFG_RESTART_BEACONING_ON_CH_AVOID_MIN (DO_NOT_RESTART)
+#define CFG_RESTART_BEACONING_ON_CH_AVOID_MAX (RESTART_24G_ONLY)
+#define CFG_RESTART_BEACONING_ON_CH_AVOID_DEFAULT (RESTART)
/*
* This parameter will avoid updating ap_sta_inactivity from hostapd.conf
* file. If a station does not send anything in ap_max_inactivity seconds, an
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 2c6cccbd697f..c312b246007e 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -7125,6 +7125,13 @@ void hdd_ch_avoid_cb(void *hdd_context, void *indi_param)
/* generate vendor specific event */
qdf_mem_zero((void *)&hdd_avoid_freq_list, sizeof(tHddAvoidFreqList));
for (i = 0; i < ch_avoid_indi->avoid_range_count; i++) {
+ if ((RESTART_24G_ONLY == hdd_ctxt->config->
+ restart_beaconing_on_chan_avoid_event) &&
+ CDS_IS_CHANNEL_5GHZ(ieee80211_frequency_to_channel(
+ ch_avoid_indi->avoid_freq_range[i].start_freq))) {
+ hdd_debug("skipping 5Ghz LTE Coex unsafe channel range");
+ continue;
+ }
hdd_avoid_freq_list.avoidFreqRange[i].startFreq =
ch_avoid_indi->avoid_freq_range[i].start_freq;
hdd_avoid_freq_list.avoidFreqRange[i].endFreq =