summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiran Kumar Lokere <klokere@qca.qualcomm.com>2014-07-10 16:01:44 -0700
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-07-11 14:51:38 -0700
commita5a42e5a2f728e7afb4df4539b319bb32a7f1fc8 (patch)
tree9af072a0c8e6a64881767bede31c0b8416da7455
parentff20db82fd8a672118c61fb3eed63a18d464d37f (diff)
qcacld: Add knob to enable/disable DFS master
Provides cfg control to enable/disable the DFS master capability and do not advertise the spectrum management capability if the DFS master is disabled. Change-Id: I7841c9529cbeb071da38b7d89659ad35377b3cb7 CRs-Fixed: 690994
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h6
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c16
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c4
-rw-r--r--CORE/MAC/inc/wniCfgAp.h15
-rw-r--r--CORE/MAC/inc/wniCfgSta.h9
-rw-r--r--CORE/MAC/src/cfg/cfgUtil/cfg.txt13
-rw-r--r--CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c15
-rwxr-xr-x[-rw-r--r--]firmware_bin/WCNSS_cfg.datbin10810 -> 10842 bytes
8 files changed, 70 insertions, 8 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 61640ff3f627..0aaea7aab02b 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -1524,6 +1524,11 @@ typedef enum
#define CFG_DISABLE_DFS_CH_SWITCH_MAX ( 1 )
#define CFG_DISABLE_DFS_CH_SWITCH_DEFAULT ( 0 )
+#define CFG_ENABLE_DFS_MASTER_CAPABILITY "gEnableDFSMasterCap"
+#define CFG_ENABLE_DFS_MASTER_CAPABILITY_MIN ( 0 )
+#define CFG_ENABLE_DFS_MASTER_CAPABILITY_MAX ( 1 )
+#define CFG_ENABLE_DFS_MASTER_CAPABILITY_DEFAULT ( 0 )
+
#define CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_NAME "dfsPhyerrFilterOffload"
#define CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_MIN ( 0 )
#define CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_MAX ( 1 )
@@ -3167,6 +3172,7 @@ typedef struct
v_U8_t wowEnable;
v_U8_t maxNumberOfPeers;
v_U8_t disableDFSChSwitch;
+ v_U8_t enableDFSMasterCap;
#ifndef QCA_WIFI_ISOC
v_U16_t thermalTempMinLevel0;
v_U16_t thermalTempMaxLevel0;
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 69872657e977..9bade3404a5a 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -2609,6 +2609,13 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_DISABLE_DFS_CH_SWITCH_MIN,
CFG_DISABLE_DFS_CH_SWITCH_MAX ),
+ REG_VARIABLE( CFG_ENABLE_DFS_MASTER_CAPABILITY, WLAN_PARAM_Integer,
+ hdd_config_t, enableDFSMasterCap,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ENABLE_DFS_MASTER_CAPABILITY_DEFAULT,
+ CFG_ENABLE_DFS_MASTER_CAPABILITY_MIN,
+ CFG_ENABLE_DFS_MASTER_CAPABILITY_MAX ),
+
REG_VARIABLE( CFG_ENABLE_FIRST_SCAN_2G_ONLY_NAME, WLAN_PARAM_Integer,
hdd_config_t, enableFirstScan2GOnly,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -5351,6 +5358,15 @@ v_BOOL_t hdd_update_config_dat( hdd_context_t *pHddCtx )
fStatus = FALSE;
hddLog(LOGE,"Failure: Could not pass on WNI_CFG_11D_ENABLED configuration info to CCM");
}
+
+ if (ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_DFS_MASTER_ENABLED,
+ pConfig->enableDFSMasterCap, NULL,
+ eANI_BOOLEAN_FALSE) == eHAL_STATUS_FAILURE) {
+ fStatus = FALSE;
+ hddLog(LOGE,
+ "Failure: Could not set value for WNI_CFG_DFS_MASTER_ENABLED");
+ }
+
if(ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_HEART_BEAT_THRESHOLD, pConfig->HeartbeatThresh24,
NULL, eANI_BOOLEAN_FALSE) == eHAL_STATUS_FAILURE)
{
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index e3775aebc4bd..a99518d47057 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -3551,7 +3551,9 @@ int wlan_hdd_cfg80211_init(struct device *dev,
wiphy->n_vendor_events = ARRAY_SIZE(wlan_hdd_cfg80211_vendor_events);
#if (LINUX_VERSION_CODE > KERNEL_VERSION(3,4,0))
- wiphy->flags |= WIPHY_FLAG_DFS_OFFLOAD;
+ if (pCfg->enableDFSMasterCap) {
+ wiphy->flags |= WIPHY_FLAG_DFS_OFFLOAD;
+ }
#endif
wiphy->max_ap_assoc_sta = pCfg->maxNumberOfPeers;
diff --git a/CORE/MAC/inc/wniCfgAp.h b/CORE/MAC/inc/wniCfgAp.h
index f82061567a18..7232ae7eb0b1 100644
--- a/CORE/MAC/inc/wniCfgAp.h
+++ b/CORE/MAC/inc/wniCfgAp.h
@@ -357,6 +357,7 @@
#define WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL 310
#define WNI_CFG_TDLS_OFF_CHANNEL_ENABLED 311
#define WNI_CFG_IBSS_ATIM_WIN_SIZE 312
+#define WNI_CFG_DFS_MASTER_ENABLED 313
/*
* String parameter lengths
@@ -2619,10 +2620,18 @@
#define WNI_CFG_IBSS_ATIM_WIN_SIZE_APMAX 100
#define WNI_CFG_IBSS_ATIM_WIN_SIZE_APDEF 0
-#define CFG_PARAM_MAX_NUM 313
-#define CFG_AP_IBUF_MAX_SIZE 253
+#define WNI_CFG_DFS_MASTER_ENABLED_STAMIN 0
+#define WNI_CFG_DFS_MASTER_ENABLED_STAMAX 1
+#define WNI_CFG_DFS_MASTER_ENABLED_STADEF 0
+
+#define WNI_CFG_DFS_MASTER_ENABLED_APMIN 0
+#define WNI_CFG_DFS_MASTER_ENABLED_APMAX 1
+#define WNI_CFG_DFS_MASTER_ENABLED_APDEF 0
+
+#define CFG_PARAM_MAX_NUM 314
+#define CFG_AP_IBUF_MAX_SIZE 254
#define CFG_AP_SBUF_MAX_SIZE 3414
-#define CFG_STA_IBUF_MAX_SIZE 248
+#define CFG_STA_IBUF_MAX_SIZE 249
#define CFG_STA_SBUF_MAX_SIZE 3380
#define CFG_SEM_MAX_NUM 19
diff --git a/CORE/MAC/inc/wniCfgSta.h b/CORE/MAC/inc/wniCfgSta.h
index 6b7bede23aa7..f5ade66a74ae 100644
--- a/CORE/MAC/inc/wniCfgSta.h
+++ b/CORE/MAC/inc/wniCfgSta.h
@@ -351,6 +351,7 @@
#define WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL 310
#define WNI_CFG_TDLS_OFF_CHANNEL_ENABLED 311
#define WNI_CFG_IBSS_ATIM_WIN_SIZE 312
+#define WNI_CFG_DFS_MASTER_ENABLED 313
/*
* String parameter lengths
@@ -1688,8 +1689,12 @@
#define WNI_CFG_IBSS_ATIM_WIN_SIZE_STAMAX 100
#define WNI_CFG_IBSS_ATIM_WIN_SIZE_STADEF 0
-#define CFG_PARAM_MAX_NUM 313
-#define CFG_STA_IBUF_MAX_SIZE 248
+#define WNI_CFG_DFS_MASTER_ENABLED_STAMIN 0
+#define WNI_CFG_DFS_MASTER_ENABLED_STAMAX 1
+#define WNI_CFG_DFS_MASTER_ENABLED_STADEF 0
+
+#define CFG_PARAM_MAX_NUM 314
+#define CFG_STA_IBUF_MAX_SIZE 249
#define CFG_STA_SBUF_MAX_SIZE 3380
#define CFG_SEM_MAX_NUM 19
diff --git a/CORE/MAC/src/cfg/cfgUtil/cfg.txt b/CORE/MAC/src/cfg/cfgUtil/cfg.txt
index 8b0fb9b2ce4f..670bc4e07cb0 100644
--- a/CORE/MAC/src/cfg/cfgUtil/cfg.txt
+++ b/CORE/MAC/src/cfg/cfgUtil/cfg.txt
@@ -1422,7 +1422,6 @@ V RW NP RESTART
NONE
0 1 1
-
*
* Wait for CNF Timeout. CNF include (RE)ASSOC, DISASSOC, AUTH, DEAUTH,
* DUMMY packet
@@ -4672,3 +4671,15 @@ NONE
V RW NP
NONE
0 100 0
+
+*
+* DFS Master capability (11h) enable/disable
+*
+
+WNI_CFG_DFS_MASTER_ENABLED I 4 7
+V RW NP
+NONE
+0 1 0
+V RW NP
+NONE
+0 1 0
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index b324740f527e..978ba8569f61 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -1013,12 +1013,25 @@ __limHandleSmeStartBssRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
if (wlan_cfgGetInt(pMac, WNI_CFG_11H_ENABLED, &val) != eSIR_SUCCESS)
limLog(pMac, LOGP, FL("Fail to get WNI_CFG_11H_ENABLED "));
psessionEntry->lim11hEnable = val;
+
+ if (psessionEntry->lim11hEnable &&
+ (eSIR_INFRA_AP_MODE == pMlmStartReq->bssType))
+ {
+ if (wlan_cfgGetInt(pMac, WNI_CFG_DFS_MASTER_ENABLED, &val) !=
+ eSIR_SUCCESS)
+ {
+ limLog(pMac, LOGE,
+ FL("Fail to get WNI_CFG_DFS_MASTER_ENABLED"));
+ }
+ psessionEntry->lim11hEnable = val;
+ }
}
if (!psessionEntry->lim11hEnable)
{
if (cfgSetInt(pMac, WNI_CFG_LOCAL_POWER_CONSTRAINT, 0) != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("Fail to get WNI_CFG_11H_ENABLED "));
+ limLog(pMac, LOGE, FL
+ ("Fail to set value for WNI_CFG_LOCAL_POWER_CONSTRAINT"));
}
psessionEntry ->limPrevSmeState = psessionEntry->limSmeState;
diff --git a/firmware_bin/WCNSS_cfg.dat b/firmware_bin/WCNSS_cfg.dat
index 1c7b8edb4766..066840f1dee7 100644..100755
--- a/firmware_bin/WCNSS_cfg.dat
+++ b/firmware_bin/WCNSS_cfg.dat
Binary files differ