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;