diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 556ed45e69..497b6e72f5 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -1582,6 +1582,29 @@ enum hdd_dot11_mode {
#define CFG_DROPPED_PKT_DISCONNECT_TH_MAX (512)
#define CFG_DROPPED_PKT_DISCONNECT_TH_DEFAULT (512)
+/*
+ *
+ * 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
+ *
+ *
+ */
+#define CFG_FORCE_1X1_NAME "gForce1x1Exception"
+#define CFG_FORCE_1X1_MIN (0)
+#define CFG_FORCE_1X1_MAX (1)
+#define CFG_FORCE_1X1_DEFAULT (0)
+
/*
*
* 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;
/* threshold of packet drops at which FW initiates disconnect */
uint16_t pkt_err_disconn_th;
+ bool is_force_1x1;
};
#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 cc0c4d3ecc..7d7a42672b 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -4268,6 +4268,7 @@ struct reg_table_entry g_registry_table[] = {
CFG_ENABLE_BCAST_PROBE_RESP_DEFAULT,
CFG_ENABLE_BCAST_PROBE_RESP_MIN,
CFG_ENABLE_BCAST_PROBE_RESP_MAX),
+
#ifdef WLAN_FEATURE_11AX
REG_VARIABLE(CFG_ENABLE_UL_MIMO_NAME, WLAN_PARAM_Integer,
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_MIN,
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]",
CFG_DROPPED_PKT_DISCONNECT_TH_NAME,
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 =
pHddCtx->config->pkt_err_disconn_th;
+ smeConfig->csrConfig.is_force_1x1 =
+ pHddCtx->config->is_force_1x1;
status = sme_update_config(pHddCtx->hHal, smeConfig);
if (!QDF_IS_STATUS_SUCCESS(status))
hdd_err("sme_update_config() failure: %d", status);
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index 64c06df8ca..bcc4ccc078 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1314,6 +1314,7 @@ typedef struct tagCsrConfigParam {
bool qcn_ie_support;
uint8_t fils_max_chan_guard_time;
uint16_t pkt_err_disconn_th;
+ bool is_force_1x1;
} tCsrConfigParam;
/* Tush */
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index bbeee42b72..43f9a39d3c 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -625,6 +625,7 @@ typedef struct tagCsrConfig {
bool qcn_ie_support;
uint8_t fils_max_chan_guard_time;
uint16_t pkt_err_disconn_th;
+ bool is_force_1x1;
} tCsrConfig;
typedef struct tagCsrChannelPowerInfo {
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 4647bf8044..4d099e6a19 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -2372,6 +2372,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
if (pParam) {
pMac->roam.configParam.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;
cfg_set_int(pMac, WNI_CFG_WME_ENABLED,
(pParam->WMMSupportMode == eCsrRoamWmmNoQos) ? 0 : 1);
@@ -2839,6 +2841,7 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
return QDF_STATUS_E_INVAL;
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->Is11eSupportEnabled = cfg_params->Is11eSupportEnabled;
pParam->FragmentationThreshold = cfg_params->FragmentationThreshold;