Преглед на файлове

qcacld-3.0: Add "g_fils_max_chan_guard_time" INI and pass it to firmware

Add "g_fils_max_chan_guard_time" INI and pass the configured value
to firmware for STA vdev as part of vdev attach. Based on this INI,
firmware will calculate the dwell time while sending in probe request.

Change-Id: I2336a7e0a37181ea00ef117e9907e7eaf194ae3d
CRs-Fixed: 1114057
Selvaraj, Sridhar преди 8 години
родител
ревизия
97ce658f73
променени са 7 файла, в които са добавени 49 реда и са изтрити 0 реда
  1. 23 0
      core/hdd/inc/wlan_hdd_cfg.h
  2. 8 0
      core/hdd/src/wlan_hdd_cfg.c
  3. 1 0
      core/sme/inc/csr_api.h
  4. 1 0
      core/sme/inc/csr_internal.h
  5. 6 0
      core/sme/src/csr/csr_api_roam.c
  6. 2 0
      core/wma/inc/wma_if.h
  7. 8 0
      core/wma/src/wma_dev_if.c

+ 23 - 0
core/hdd/inc/wlan_hdd_cfg.h

@@ -9806,6 +9806,28 @@ enum l1ss_sleep_allowed {
 #define CFG_ENABLE_REG_OFFLOAD_MAX       (1)
 #define CFG_ENABLE_REG_OFFLOAD_DEFAULT   (0)
 
+/*
+ * <ini>
+ * g_fils_max_chan_guard_time - Set maximum channel guard time(ms)
+ * @Min: 0
+ * @Max: 10
+ * @Default: 0
+ *
+ * This ini is used to set maximum channel guard time in milli seconds
+ *
+ * Related: None
+ *
+ * Supported Feature: FILS
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_FILS_MAX_CHAN_GUARD_TIME_NAME    "g_fils_max_chan_guard_time"
+#define CFG_FILS_MAX_CHAN_GUARD_TIME_MIN     (0)
+#define CFG_FILS_MAX_CHAN_GUARD_TIME_MAX     (10)
+#define CFG_FILS_MAX_CHAN_GUARD_TIME_DEFAULT (0)
+
 /*
  * Type declarations
  */
@@ -10525,6 +10547,7 @@ struct hdd_config {
 	bool ani_enabled;
 	bool qcn_ie_support;
 	bool reg_offload_enabled;
+	uint8_t fils_max_chan_guard_time;
 };
 
 #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

+ 8 - 0
core/hdd/src/wlan_hdd_cfg.c

@@ -4283,6 +4283,12 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_REG_OFFLOAD_DEFAULT,
 		     CFG_ENABLE_REG_OFFLOAD_MIN,
 		     CFG_ENABLE_REG_OFFLOAD_MAX),
+	REG_VARIABLE(CFG_FILS_MAX_CHAN_GUARD_TIME_NAME, WLAN_PARAM_Integer,
+		struct hdd_config, fils_max_chan_guard_time,
+		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		CFG_FILS_MAX_CHAN_GUARD_TIME_DEFAULT,
+		CFG_FILS_MAX_CHAN_GUARD_TIME_MIN,
+		CFG_FILS_MAX_CHAN_GUARD_TIME_MAX),
 };
 
 
@@ -7333,6 +7339,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
 			pHddCtx->config->enable_bcast_probe_rsp;
 	smeConfig->csrConfig.qcn_ie_support =
 			pHddCtx->config->qcn_ie_support;
+	smeConfig->csrConfig.fils_max_chan_guard_time =
+			pHddCtx->config->fils_max_chan_guard_time;
 
 	hdd_he_set_sme_config(smeConfig, pConfig);
 

+ 1 - 0
core/sme/inc/csr_api.h

@@ -1310,6 +1310,7 @@ typedef struct tagCsrConfigParam {
 	bool enable_ul_mimo;
 #endif
 	bool qcn_ie_support;
+	uint8_t fils_max_chan_guard_time;
 } tCsrConfigParam;
 
 /* Tush */

+ 1 - 0
core/sme/inc/csr_internal.h

@@ -637,6 +637,7 @@ typedef struct tagCsrConfig {
 	bool enable_ul_mimo;
 #endif
 	bool qcn_ie_support;
+	uint8_t fils_max_chan_guard_time;
 } tCsrConfig;
 
 typedef struct tagCsrChannelPowerInfo {

+ 6 - 0
core/sme/src/csr/csr_api_roam.c

@@ -2833,6 +2833,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
 			pParam->enable_bcast_probe_rsp;
 		pMac->roam.configParam.qcn_ie_support =
 			pParam->qcn_ie_support;
+		pMac->roam.configParam.fils_max_chan_guard_time =
+			pParam->fils_max_chan_guard_time;
 
 		csr_update_he_config_param(pMac, pParam);
 	}
@@ -3068,6 +3070,8 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
 		pMac->roam.configParam.enable_bcast_probe_rsp;
 	pParam->qcn_ie_support =
 		pMac->roam.configParam.qcn_ie_support;
+	pParam->fils_max_chan_guard_time =
+		pMac->roam.configParam.fils_max_chan_guard_time;
 
 	csr_get_he_config_param(pParam, pMac);
 
@@ -15605,6 +15609,8 @@ QDF_STATUS csr_issue_add_sta_for_session_req(tpAniSirGlobal pMac,
 			pMac->roam.configParam.rx_aggregation_size;
 	add_sta_self_req->enable_bcast_probe_rsp =
 			pMac->roam.configParam.enable_bcast_probe_rsp;
+	add_sta_self_req->fils_max_chan_guard_time =
+			pMac->roam.configParam.fils_max_chan_guard_time;
 
 	msg.type = WMA_ADD_STA_SELF_REQ;
 	msg.reserved = 0;

+ 2 - 0
core/wma/inc/wma_if.h

@@ -1168,6 +1168,7 @@ typedef struct sMaxTxPowerPerBandParams {
  * @tx_aggregation_size: Tx aggregation size
  * @rx_aggregation_size: Rx aggregation size
  * @enable_bcast_probe_rsp: enable broadcast probe response
+ * @fils_max_chan_guard_time: FILS max channel guard time
  */
 struct add_sta_self_params {
 	tSirMacAddr self_mac_addr;
@@ -1181,6 +1182,7 @@ struct add_sta_self_params {
 	uint32_t tx_aggregation_size;
 	uint32_t rx_aggregation_size;
 	bool enable_bcast_probe_rsp;
+	uint8_t fils_max_chan_guard_time;
 };
 
 /**

+ 8 - 0
core/wma/src/wma_dev_if.c

@@ -1826,6 +1826,14 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
 		if (QDF_IS_STATUS_ERROR(ret))
 			WMA_LOGE("Failed to set WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE");
 
+		/* Pass down the FILS max channel guard time to FW */
+		ret = wma_vdev_set_param(
+				wma_handle->wmi_handle,
+				self_sta_req->session_id,
+				WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME,
+				self_sta_req->fils_max_chan_guard_time);
+		if (QDF_IS_STATUS_ERROR(ret))
+			WMA_LOGE("Failed to set WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME");
 	}
 
 	/* Initialize BMISS parameters */