qcacld-3.0: Introduce ini param for forcing 1x1 for certain peer

For a certain Vendor OUI this ini param allows STA connection in 1x1
only. This is needed to resolve IOT issue.

Change-Id: If4ff4ece3c4bd1c4b85ebfd5c4870b27efbbe475
CRs-Fixed: 2047347
This commit is contained in:
Naveen Rawat
2017-05-10 20:42:05 -07:00
committed by snandini
parent 2c13e6b5f5
commit b2fc41317f
5 changed files with 42 additions and 0 deletions

View File

@@ -1582,6 +1582,29 @@ enum hdd_dot11_mode {
#define CFG_DROPPED_PKT_DISCONNECT_TH_MAX (512) #define CFG_DROPPED_PKT_DISCONNECT_TH_MAX (512)
#define CFG_DROPPED_PKT_DISCONNECT_TH_DEFAULT (512) #define CFG_DROPPED_PKT_DISCONNECT_TH_DEFAULT (512)
/*
* <ini>
* gForce1x1Exception - force 1x1 when connecting to certain peer
* @Min: 0
* @Max: 1
* @Default: 0
*
* This INI when enabled will force 1x1 connection with certain peer.
*
*
* Related: None
*
* Supported Feature: connection
*
* Usage: External
*
* </ini>
*/
#define CFG_FORCE_1X1_NAME "gForce1x1Exception"
#define CFG_FORCE_1X1_MIN (0)
#define CFG_FORCE_1X1_MAX (1)
#define CFG_FORCE_1X1_DEFAULT (0)
/* /*
* <ini> * <ini>
* gEnableFastRoamInConcurrency - Enable LFR roaming on STA during concurrency * gEnableFastRoamInConcurrency - Enable LFR roaming on STA during concurrency
@@ -10813,6 +10836,7 @@ struct hdd_config {
enum hdd_external_acs_freq_band external_acs_freq_band; enum hdd_external_acs_freq_band external_acs_freq_band;
/* threshold of packet drops at which FW initiates disconnect */ /* threshold of packet drops at which FW initiates disconnect */
uint16_t pkt_err_disconn_th; uint16_t pkt_err_disconn_th;
bool is_force_1x1;
}; };
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var)) #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

View File

@@ -4268,6 +4268,7 @@ struct reg_table_entry g_registry_table[] = {
CFG_ENABLE_BCAST_PROBE_RESP_DEFAULT, CFG_ENABLE_BCAST_PROBE_RESP_DEFAULT,
CFG_ENABLE_BCAST_PROBE_RESP_MIN, CFG_ENABLE_BCAST_PROBE_RESP_MIN,
CFG_ENABLE_BCAST_PROBE_RESP_MAX), CFG_ENABLE_BCAST_PROBE_RESP_MAX),
#ifdef WLAN_FEATURE_11AX #ifdef WLAN_FEATURE_11AX
REG_VARIABLE(CFG_ENABLE_UL_MIMO_NAME, WLAN_PARAM_Integer, REG_VARIABLE(CFG_ENABLE_UL_MIMO_NAME, WLAN_PARAM_Integer,
struct hdd_config, enable_ul_mimo, struct hdd_config, enable_ul_mimo,
@@ -4353,6 +4354,13 @@ struct reg_table_entry g_registry_table[] = {
CFG_DROPPED_PKT_DISCONNECT_TH_DEFAULT, CFG_DROPPED_PKT_DISCONNECT_TH_DEFAULT,
CFG_DROPPED_PKT_DISCONNECT_TH_MIN, CFG_DROPPED_PKT_DISCONNECT_TH_MIN,
CFG_DROPPED_PKT_DISCONNECT_TH_MAX), CFG_DROPPED_PKT_DISCONNECT_TH_MAX),
REG_VARIABLE(CFG_FORCE_1X1_NAME, WLAN_PARAM_Integer,
struct hdd_config, is_force_1x1,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_FORCE_1X1_DEFAULT,
CFG_FORCE_1X1_MIN,
CFG_FORCE_1X1_MAX),
}; };
@@ -5866,6 +5874,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
hdd_info("Name = [%s] value = [%u]", hdd_info("Name = [%s] value = [%u]",
CFG_DROPPED_PKT_DISCONNECT_TH_NAME, CFG_DROPPED_PKT_DISCONNECT_TH_NAME,
pHddCtx->config->pkt_err_disconn_th); pHddCtx->config->pkt_err_disconn_th);
hdd_debug("Name = [%s] value = [%u]",
CFG_FORCE_1X1_NAME,
pHddCtx->config->is_force_1x1);
} }
@@ -7452,6 +7463,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
smeConfig->csrConfig.pkt_err_disconn_th = smeConfig->csrConfig.pkt_err_disconn_th =
pHddCtx->config->pkt_err_disconn_th; pHddCtx->config->pkt_err_disconn_th;
smeConfig->csrConfig.is_force_1x1 =
pHddCtx->config->is_force_1x1;
status = sme_update_config(pHddCtx->hHal, smeConfig); status = sme_update_config(pHddCtx->hHal, smeConfig);
if (!QDF_IS_STATUS_SUCCESS(status)) if (!QDF_IS_STATUS_SUCCESS(status))
hdd_err("sme_update_config() failure: %d", status); hdd_err("sme_update_config() failure: %d", status);

View File

@@ -1314,6 +1314,7 @@ typedef struct tagCsrConfigParam {
bool qcn_ie_support; bool qcn_ie_support;
uint8_t fils_max_chan_guard_time; uint8_t fils_max_chan_guard_time;
uint16_t pkt_err_disconn_th; uint16_t pkt_err_disconn_th;
bool is_force_1x1;
} tCsrConfigParam; } tCsrConfigParam;
/* Tush */ /* Tush */

View File

@@ -625,6 +625,7 @@ typedef struct tagCsrConfig {
bool qcn_ie_support; bool qcn_ie_support;
uint8_t fils_max_chan_guard_time; uint8_t fils_max_chan_guard_time;
uint16_t pkt_err_disconn_th; uint16_t pkt_err_disconn_th;
bool is_force_1x1;
} tCsrConfig; } tCsrConfig;
typedef struct tagCsrChannelPowerInfo { typedef struct tagCsrChannelPowerInfo {

View File

@@ -2372,6 +2372,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
if (pParam) { if (pParam) {
pMac->roam.configParam.pkt_err_disconn_th = pMac->roam.configParam.pkt_err_disconn_th =
pParam->pkt_err_disconn_th; pParam->pkt_err_disconn_th;
pMac->roam.configParam.is_force_1x1 =
pParam->is_force_1x1;
pMac->roam.configParam.WMMSupportMode = pParam->WMMSupportMode; pMac->roam.configParam.WMMSupportMode = pParam->WMMSupportMode;
cfg_set_int(pMac, WNI_CFG_WME_ENABLED, cfg_set_int(pMac, WNI_CFG_WME_ENABLED,
(pParam->WMMSupportMode == eCsrRoamWmmNoQos) ? 0 : 1); (pParam->WMMSupportMode == eCsrRoamWmmNoQos) ? 0 : 1);
@@ -2839,6 +2841,7 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
return QDF_STATUS_E_INVAL; return QDF_STATUS_E_INVAL;
pParam->pkt_err_disconn_th = cfg_params->pkt_err_disconn_th; pParam->pkt_err_disconn_th = cfg_params->pkt_err_disconn_th;
pParam->is_force_1x1 = cfg_params->is_force_1x1;
pParam->WMMSupportMode = cfg_params->WMMSupportMode; pParam->WMMSupportMode = cfg_params->WMMSupportMode;
pParam->Is11eSupportEnabled = cfg_params->Is11eSupportEnabled; pParam->Is11eSupportEnabled = cfg_params->Is11eSupportEnabled;
pParam->FragmentationThreshold = cfg_params->FragmentationThreshold; pParam->FragmentationThreshold = cfg_params->FragmentationThreshold;