From 97ce658f73c8c90b6319c88df56005f443c8a380 Mon Sep 17 00:00:00 2001 From: "Selvaraj, Sridhar" Date: Fri, 20 Jan 2017 17:06:34 +0530 Subject: [PATCH] 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 --- core/hdd/inc/wlan_hdd_cfg.h | 23 +++++++++++++++++++++++ core/hdd/src/wlan_hdd_cfg.c | 8 ++++++++ core/sme/inc/csr_api.h | 1 + core/sme/inc/csr_internal.h | 1 + core/sme/src/csr/csr_api_roam.c | 6 ++++++ core/wma/inc/wma_if.h | 2 ++ core/wma/src/wma_dev_if.c | 8 ++++++++ 7 files changed, 49 insertions(+) diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 224d99f24cf3..a25a500ed4ac 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/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) +/* + * + * 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 + * + * + */ +#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)) diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index eabb54bec949..8fec070b8e39 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/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); diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 0f93e231f9a5..a86cb45d40e5 100644 --- a/core/sme/inc/csr_api.h +++ b/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 */ diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index 5e7591d02758..7f48242b4b79 100644 --- a/core/sme/inc/csr_internal.h +++ b/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 { diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 2947f8e381dd..65f52c0b7a85 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/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; diff --git a/core/wma/inc/wma_if.h b/core/wma/inc/wma_if.h index ef120fe0c590..e3858482a3a0 100644 --- a/core/wma/inc/wma_if.h +++ b/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; }; /** diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index b64a12fe9e99..a8679febd956 100644 --- a/core/wma/src/wma_dev_if.c +++ b/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 */