summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmar Singhal <asinghal@codeaurora.org>2016-08-08 12:26:20 -0700
committerqcabuildsw <qcabuildsw@localhost>2016-08-20 01:03:48 -0700
commit1851788cdbb6dc96cae2f33c209da74727a548dc (patch)
tree65280975ebf325c09f207ee5dbe7d62d518bc5dc
parent363c6bc5bf8ea4983c71d612515a59d6b46fd5c1 (diff)
qcacld-3.0: Add a new ini item to control the INDOOR channels support
qcacld-2.0 to qcacld-3.0 propagation Currently indoor channels are unconditionally set to IEEE80211_CHAN_PASSIVE_SCAN in driver. Add logic to report INDOOR channel as passive channel only when gindoor_channel_support is FALSE. Change-Id: Iab55a394a28ff452c06c739f3fbd47506eda85eb CRs-Fixed: 955272
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h10
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c8
-rw-r--r--core/hdd/src/wlan_hdd_regulatory.c18
3 files changed, 29 insertions, 7 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 8db4b79d4fa8..0d5857fdff54 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -3469,6 +3469,15 @@ enum dot11p_mode {
*/
#define CFG_RPS_RX_QUEUE_CPU_MAP_LIST_LEN 30
+/*
+ * Support to start sap in indoor channel
+ * Customer can config this item to enable/disable sap in indoor channel
+ * Default: Disable
+ */
+#define CFG_INDOOR_CHANNEL_SUPPORT_NAME "gindoor_channel_support"
+#define CFG_INDOOR_CHANNEL_SUPPORT_MIN (0)
+#define CFG_INDOOR_CHANNEL_SUPPORT_MAX (1)
+#define CFG_INDOOR_CHANNEL_SUPPORT_DEFAULT (0)
/*---------------------------------------------------------------------------
Type declarations
@@ -4129,6 +4138,7 @@ struct hdd_config {
#endif
uint32_t iface_change_wait_time;
enum cfg_sub_20_channel_width enable_sub_20_channel_width;
+ bool indoor_channel_support;
};
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 2b272e3d3ca2..29fc5aa8f16b 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -3993,6 +3993,14 @@ REG_TABLE_ENTRY g_registry_table[] = {
VAR_FLAGS_OPTIONAL,
(void *)CFG_RPS_RX_QUEUE_CPU_MAP_LIST_DEFAULT),
+ REG_VARIABLE(CFG_INDOOR_CHANNEL_SUPPORT_NAME,
+ WLAN_PARAM_Integer,
+ struct hdd_config, indoor_channel_support,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_INDOOR_CHANNEL_SUPPORT_DEFAULT,
+ CFG_INDOOR_CHANNEL_SUPPORT_MIN,
+ CFG_INDOOR_CHANNEL_SUPPORT_MAX),
+
REG_VARIABLE(CFG_INTERFACE_CHANGE_WAIT_NAME, WLAN_PARAM_Integer,
struct hdd_config, iface_change_wait_time,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c
index 4a33cf8793e2..c96f8ef38ecf 100644
--- a/core/hdd/src/wlan_hdd_regulatory.c
+++ b/core/hdd/src/wlan_hdd_regulatory.c
@@ -393,13 +393,17 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx,
if (wiphy_chan->flags & IEEE80211_CHAN_DISABLED) {
cds_chan->state = CHANNEL_STATE_DISABLE;
- } else if (wiphy_chan->flags &
- (IEEE80211_CHAN_RADAR |
- IEEE80211_CHAN_PASSIVE_SCAN |
- IEEE80211_CHAN_INDOOR_ONLY)) {
-
- if (wiphy_chan->flags &
- IEEE80211_CHAN_INDOOR_ONLY)
+ } else if ((wiphy_chan->flags &
+ (IEEE80211_CHAN_RADAR |
+ IEEE80211_CHAN_PASSIVE_SCAN)) ||
+ ((hdd_ctx->config->indoor_channel_support
+ == false) &&
+ (wiphy_chan->flags &
+ IEEE80211_CHAN_INDOOR_ONLY))) {
+ if ((wiphy_chan->flags &
+ IEEE80211_CHAN_INDOOR_ONLY) &&
+ (false ==
+ hdd_ctx->config->indoor_channel_support))
wiphy_chan->flags |=
IEEE80211_CHAN_PASSIVE_SCAN;
cds_chan->state = CHANNEL_STATE_DFS;