Browse Source

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

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

Change-Id: I446c7d7589534688e04579ed434de0803ed8b4ff
CRs-Fixed: 1113498
Selvaraj, Sridhar 8 năm trước cách đây
mục cha
commit
4f684bbaf2

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

@@ -9058,6 +9058,28 @@ enum hdd_wext_control {
 #define CFG_PER_ROAM_REST_TIME_MAX      (3600)
 #define CFG_PER_ROAM_REST_TIME_DEFAULT  (300)
 
+/*
+ * <ini>
+ * g_enable_bcast_probe_rsp - Enable Broadcast probe response.
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to enable/disable broadcast probe response
+ *
+ * Related: None
+ *
+ * Supported Feature: FILS
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_ENABLE_BCAST_PROBE_RESP_NAME    "g_enable_bcast_probe_rsp"
+#define CFG_ENABLE_BCAST_PROBE_RESP_MIN     (0)
+#define CFG_ENABLE_BCAST_PROBE_RESP_MAX     (1)
+#define CFG_ENABLE_BCAST_PROBE_RESP_DEFAULT (0)
+
 /*
  * Type declarations
  */
@@ -9791,6 +9813,7 @@ struct hdd_config {
 	uint32_t per_roam_rest_time;
 	uint32_t per_roam_mon_time;
 	enum active_bpf_mode active_bpf_mode;
+	bool enable_bcast_probe_rsp;
 };
 
 #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

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

@@ -4208,7 +4208,6 @@ REG_TABLE_ENTRY g_registry_table[] = {
 		CFG_SAP_INTERNAL_RESTART_DEFAULT,
 		CFG_SAP_INTERNAL_RESTART_MIN,
 		CFG_SAP_INTERNAL_RESTART_MAX),
-
 	REG_VARIABLE(CFG_PER_ROAM_ENABLE_NAME, WLAN_PARAM_Integer,
 		struct hdd_config, is_per_roam_enabled,
 		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -4257,6 +4256,12 @@ REG_TABLE_ENTRY g_registry_table[] = {
 		CFG_ACTIVE_BPF_MODE_DEFAULT,
 		CFG_ACTIVE_BPF_MODE_MIN,
 		CFG_ACTIVE_BPF_MODE_MAX),
+	REG_VARIABLE(CFG_ENABLE_BCAST_PROBE_RESP_NAME, WLAN_PARAM_Integer,
+		struct hdd_config, enable_bcast_probe_rsp,
+		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		CFG_ENABLE_BCAST_PROBE_RESP_DEFAULT,
+		CFG_ENABLE_BCAST_PROBE_RESP_MIN,
+		CFG_ENABLE_BCAST_PROBE_RESP_MAX),
 };
 
 /**
@@ -7298,6 +7303,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
 			pHddCtx->config->tx_aggregation_size;
 	smeConfig->csrConfig.rx_aggregation_size =
 			pHddCtx->config->rx_aggregation_size;
+	smeConfig->csrConfig.enable_bcast_probe_rsp =
+			pHddCtx->config->enable_bcast_probe_rsp;
 
 	status = sme_update_config(pHddCtx->hHal, smeConfig);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {

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

@@ -1310,6 +1310,7 @@ typedef struct tagCsrConfigParam {
 	uint32_t tx_aggregation_size;
 	uint32_t rx_aggregation_size;
 	struct wmi_per_roam_config per_roam_config;
+	bool enable_bcast_probe_rsp;
 } tCsrConfigParam;
 
 /* Tush */

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

@@ -639,6 +639,7 @@ typedef struct tagCsrConfig {
 	uint32_t tx_aggregation_size;
 	uint32_t rx_aggregation_size;
 	struct wmi_per_roam_config per_roam_config;
+	bool enable_bcast_probe_rsp;
 } tCsrConfig;
 
 typedef struct tagCsrChannelPowerInfo {

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

@@ -2609,6 +2609,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
 			pParam->tx_aggregation_size;
 		pMac->roam.configParam.rx_aggregation_size =
 			pParam->rx_aggregation_size;
+		pMac->roam.configParam.enable_bcast_probe_rsp =
+			pParam->enable_bcast_probe_rsp;
 
 	}
 	return status;
@@ -2843,6 +2845,8 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
 		pMac->roam.configParam.tx_aggregation_size;
 	pParam->rx_aggregation_size =
 		pMac->roam.configParam.rx_aggregation_size;
+	pParam->enable_bcast_probe_rsp =
+		pMac->roam.configParam.enable_bcast_probe_rsp;
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -15317,6 +15321,8 @@ QDF_STATUS csr_issue_add_sta_for_session_req(tpAniSirGlobal pMac,
 			pMac->roam.configParam.tx_aggregation_size;
 	add_sta_self_req->rx_aggregation_size =
 			pMac->roam.configParam.rx_aggregation_size;
+	add_sta_self_req->enable_bcast_probe_rsp =
+			pMac->roam.configParam.enable_bcast_probe_rsp;
 
 	msg.type = WMA_ADD_STA_SELF_REQ;
 	msg.reserved = 0;

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

@@ -1143,6 +1143,9 @@ typedef struct sMaxTxPowerPerBandParams {
  * @nss_2g: vdev nss in 2.4G
  * @nss_5g: vdev nss in 5G
  * @status: response status code
+ * @tx_aggregation_size: Tx aggregation size
+ * @rx_aggregation_size: Rx aggregation size
+ * @enable_bcast_probe_rsp: enable broadcast probe response
  */
 struct add_sta_self_params {
 	tSirMacAddr self_mac_addr;
@@ -1155,6 +1158,7 @@ struct add_sta_self_params {
 	uint32_t status;
 	uint32_t tx_aggregation_size;
 	uint32_t rx_aggregation_size;
+	bool enable_bcast_probe_rsp;
 };
 
 /**

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

@@ -1802,6 +1802,16 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
 						 WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG));
 		if (QDF_IS_STATUS_ERROR(ret))
 			WMA_LOGE("Failed to set WMI_VDEV_PARAM_ROAM_FW_OFFLOAD");
+
+		/* Pass down enable/disable bcast probe rsp to FW */
+		ret = wma_vdev_set_param(
+				wma_handle->wmi_handle,
+				self_sta_req->session_id,
+				WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE,
+				self_sta_req->enable_bcast_probe_rsp);
+		if (QDF_IS_STATUS_ERROR(ret))
+			WMA_LOGE("Failed to set WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE");
+
 	}
 
 	/* Initialize BMISS parameters */