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
This commit is contained in:
Amar Singhal 2016-08-08 12:26:20 -07:00 • committed by qcabuildsw
commit 1851788cdb
3 changed files with 29 additions and 7 deletions

View file

@ -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))

View file

@ -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,

View file

@ -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;