qcacld-3.0: Add OFDM Scrambler seed ini support
Add "gEnableUpdateScramSeed" ini support to send WMI_PDEV_PARAM_EN_UPDATE_SCRAM_SEED command to firmware to enable OFDM scrambler seed. Change-Id: Ie5c244a7ea418eec0af1f576e8521804ee85a665 CRs-Fixed: 3106348
This commit is contained in:

committed by
Madan Koyyalamudi

parent
73a8b41fd9
commit
3d11cb41da
1
Kbuild
1
Kbuild
@@ -3192,6 +3192,7 @@ cppflags-y += -DCONN_MGR_ADV_FEATURE
|
|||||||
|
|
||||||
cppflags-$(CONFIG_QCACLD_WLAN_LFR3) += -DWLAN_FEATURE_ROAM_OFFLOAD
|
cppflags-$(CONFIG_QCACLD_WLAN_LFR3) += -DWLAN_FEATURE_ROAM_OFFLOAD
|
||||||
cppflags-$(CONFIG_QCACLD_WLAN_CONNECTIVITY_LOGGING) += -DWLAN_FEATURE_CONNECTIVITY_LOGGING
|
cppflags-$(CONFIG_QCACLD_WLAN_CONNECTIVITY_LOGGING) += -DWLAN_FEATURE_CONNECTIVITY_LOGGING
|
||||||
|
cppflags-$(CONFIG_OFDM_SCRAMBLER_SEED) += -DWLAN_FEATURE_OFDM_SCRAMBLER_SEED
|
||||||
|
|
||||||
cppflags-$(CONFIG_WLAN_FEATURE_MBSSID) += -DWLAN_FEATURE_MBSSID
|
cppflags-$(CONFIG_WLAN_FEATURE_MBSSID) += -DWLAN_FEATURE_MBSSID
|
||||||
cppflags-$(CONFIG_WLAN_FEATURE_P2P_P2P_STA) += -DWLAN_FEATURE_P2P_P2P_STA
|
cppflags-$(CONFIG_WLAN_FEATURE_P2P_P2P_STA) += -DWLAN_FEATURE_P2P_P2P_STA
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012 - 2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2012 - 2021 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -226,6 +227,7 @@ struct wlan_fwol_neighbor_report_cfg {
|
|||||||
* @enable_ilp: ILP HW block configuration
|
* @enable_ilp: ILP HW block configuration
|
||||||
* @sap_sho: SAP SHO HW offload configuration
|
* @sap_sho: SAP SHO HW offload configuration
|
||||||
* @disable_hw_assist: Flag to configure HW assist feature in FW
|
* @disable_hw_assist: Flag to configure HW assist feature in FW
|
||||||
|
* @enable_ofdm_scrambler_seed: Decide to enable/disable OFDM scrambler seed
|
||||||
*/
|
*/
|
||||||
struct wlan_fwol_cfg {
|
struct wlan_fwol_cfg {
|
||||||
/* Add CFG and INI items here */
|
/* Add CFG and INI items here */
|
||||||
@@ -281,6 +283,9 @@ struct wlan_fwol_cfg {
|
|||||||
uint32_t enable_ilp;
|
uint32_t enable_ilp;
|
||||||
uint32_t sap_sho;
|
uint32_t sap_sho;
|
||||||
bool disable_hw_assist;
|
bool disable_hw_assist;
|
||||||
|
#ifdef WLAN_FEATURE_OFDM_SCRAMBLER_SEED
|
||||||
|
bool enable_ofdm_scrambler_seed;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -567,6 +568,20 @@ static void fwol_thermal_init(struct wlan_fwol_psoc_obj *fwol_obj)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_OFDM_SCRAMBLER_SEED
|
||||||
|
static inline void fwol_ofdm_scrambler_init(struct wlan_fwol_cfg *fwol_cfg,
|
||||||
|
struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
fwol_cfg->enable_ofdm_scrambler_seed =
|
||||||
|
cfg_get(psoc, CFG_ENABLE_OFDM_SCRAMBLER_SEED);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void fwol_ofdm_scrambler_init(struct wlan_fwol_cfg *fwol_cfg,
|
||||||
|
struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
@@ -633,6 +648,7 @@ QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
|||||||
fwol_cfg->sap_sho = cfg_get(psoc, CFG_SAP_SHO_CONFIG);
|
fwol_cfg->sap_sho = cfg_get(psoc, CFG_SAP_SHO_CONFIG);
|
||||||
fwol_cfg->disable_hw_assist = cfg_get(psoc, CFG_DISABLE_HW_ASSIST);
|
fwol_cfg->disable_hw_assist = cfg_get(psoc, CFG_DISABLE_HW_ASSIST);
|
||||||
fwol_thermal_init(fwol_obj);
|
fwol_thermal_init(fwol_obj);
|
||||||
|
fwol_ofdm_scrambler_init(fwol_cfg, psoc);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -65,6 +66,28 @@
|
|||||||
0, \
|
0, \
|
||||||
"Set rts for sifs bursting")
|
"Set rts for sifs bursting")
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_OFDM_SCRAMBLER_SEED
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gEnableUpdateScramSeed - Enable/Disable OFDM scambler seed
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_ENABLE_OFDM_SCRAMBLER_SEED CFG_INI_BOOL( \
|
||||||
|
"gEnableUpdateScramSeed", \
|
||||||
|
false, \
|
||||||
|
"Enable OFDM Scrambler Seed")
|
||||||
|
|
||||||
|
#define ENABLE_OFDM_SCRAMBLER_SEED CFG(CFG_ENABLE_OFDM_SCRAMBLER_SEED)
|
||||||
|
#else
|
||||||
|
#define ENABLE_OFDM_SCRAMBLER_SEED
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* <ini>
|
* <ini>
|
||||||
* sifs_burst_mask - Set sifs burst mask
|
* sifs_burst_mask - Set sifs burst mask
|
||||||
@@ -897,6 +920,7 @@
|
|||||||
CFG(CFG_ENABLE_FW_WOW_MODULE_LOG_LEVEL) \
|
CFG(CFG_ENABLE_FW_WOW_MODULE_LOG_LEVEL) \
|
||||||
CFG(CFG_SAP_SHO_CONFIG) \
|
CFG(CFG_SAP_SHO_CONFIG) \
|
||||||
CFG(CFG_DISABLE_HW_ASSIST) \
|
CFG(CFG_DISABLE_HW_ASSIST) \
|
||||||
CFG(CFG_ENABLE_PCI_GEN)
|
CFG(CFG_ENABLE_PCI_GEN) \
|
||||||
|
ENABLE_OFDM_SCRAMBLER_SEED
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -491,6 +492,26 @@ bool ucfg_fwol_get_gcmp_enable(struct wlan_objmgr_psoc *psoc);
|
|||||||
QDF_STATUS ucfg_fwol_get_enable_tx_sch_delay(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS ucfg_fwol_get_enable_tx_sch_delay(struct wlan_objmgr_psoc *psoc,
|
||||||
uint8_t *enable_tx_sch_delay);
|
uint8_t *enable_tx_sch_delay);
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_OFDM_SCRAMBLER_SEED
|
||||||
|
/**
|
||||||
|
* ucfg_fwol_get_ofdm_scrambler_seed() - Assigns enable_ofdm_scrambler_seed
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @enable_ofdm_scrambler_seed: Pointer to return enable_ofdm_scrambler_seed
|
||||||
|
* value
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||||
|
*/
|
||||||
|
QDF_STATUS ucfg_fwol_get_ofdm_scrambler_seed(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *enable_ofdm_scrambler_seed);
|
||||||
|
#else
|
||||||
|
static inline QDF_STATUS ucfg_fwol_get_ofdm_scrambler_seed(
|
||||||
|
struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *enable_ofdm_scrambler_seed)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ucfg_fwol_get_enable_secondary_rate() - Get enable secondary rate
|
* ucfg_fwol_get_enable_secondary_rate() - Get enable secondary rate
|
||||||
* @psoc: pointer to the psoc object
|
* @psoc: pointer to the psoc object
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -792,6 +793,26 @@ QDF_STATUS ucfg_fwol_get_enable_tx_sch_delay(struct wlan_objmgr_psoc *psoc,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_OFDM_SCRAMBLER_SEED
|
||||||
|
QDF_STATUS ucfg_fwol_get_ofdm_scrambler_seed(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *enable_ofdm_scrambler_seed)
|
||||||
|
{
|
||||||
|
struct wlan_fwol_psoc_obj *fwol_obj;
|
||||||
|
|
||||||
|
fwol_obj = fwol_get_psoc_obj(psoc);
|
||||||
|
if (!fwol_obj) {
|
||||||
|
*enable_ofdm_scrambler_seed =
|
||||||
|
cfg_default(CFG_ENABLE_OFDM_SCRAMBLER_SEED);
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
*enable_ofdm_scrambler_seed =
|
||||||
|
fwol_obj->cfg.enable_ofdm_scrambler_seed;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS ucfg_fwol_get_enable_secondary_rate(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS ucfg_fwol_get_enable_secondary_rate(struct wlan_objmgr_psoc *psoc,
|
||||||
uint32_t *enable_secondary_rate)
|
uint32_t *enable_secondary_rate)
|
||||||
{
|
{
|
||||||
|
@@ -62,6 +62,7 @@ ifeq ($(CONFIG_CNSS_QCA6490), y)
|
|||||||
CONFIG_WLAN_SYNC_TSF_PLUS := y
|
CONFIG_WLAN_SYNC_TSF_PLUS := y
|
||||||
CONFIG_WLAN_SYNC_TSF_TIMER := y
|
CONFIG_WLAN_SYNC_TSF_TIMER := y
|
||||||
CONFIG_TX_MULTI_TCL := y
|
CONFIG_TX_MULTI_TCL := y
|
||||||
|
CONFIG_OFDM_SCRAMBLER_SEED := y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_CNSS_QCA6750), y)
|
ifeq ($(CONFIG_CNSS_QCA6750), y)
|
||||||
@@ -124,6 +125,7 @@ ifeq ($(CONFIG_CNSS_KIWI), y)
|
|||||||
CONFIG_HIF_REG_WINDOW_SUPPORT :=y
|
CONFIG_HIF_REG_WINDOW_SUPPORT :=y
|
||||||
CONFIG_WINDOW_REG_PLD_LOCK_ENABLE := y
|
CONFIG_WINDOW_REG_PLD_LOCK_ENABLE := y
|
||||||
CONFIG_TX_MULTI_TCL := y
|
CONFIG_TX_MULTI_TCL := y
|
||||||
|
CONFIG_OFDM_SCRAMBLER_SEED := y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (y,$(findstring y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
|
ifeq (y,$(findstring y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
|
||||||
|
@@ -7203,6 +7203,29 @@ err:
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_OFDM_SCRAMBLER_SEED
|
||||||
|
/**
|
||||||
|
* wlan_hdd_set_ofdm_scrambler_seed() - Set OFDM Scrambler Seed config to FW
|
||||||
|
* @adapter: HDD adapter
|
||||||
|
* @sval: value to be sent for WMI_PDEV_PARAM_EN_UPDATE_SCRAM_SEED command
|
||||||
|
*
|
||||||
|
* Return: 0 on success or errno on failure
|
||||||
|
*/
|
||||||
|
static inline int wlan_hdd_set_ofdm_scrambler_seed(struct hdd_adapter *adapter,
|
||||||
|
int sval)
|
||||||
|
{
|
||||||
|
return sme_cli_set_command(adapter->vdev_id,
|
||||||
|
WMI_PDEV_PARAM_EN_UPDATE_SCRAM_SEED, sval,
|
||||||
|
PDEV_CMD);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline int wlan_hdd_set_ofdm_scrambler_seed(struct hdd_adapter *adapter,
|
||||||
|
int sval)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hdd_set_fw_params() - Set parameters to firmware
|
* hdd_set_fw_params() - Set parameters to firmware
|
||||||
* @adapter: HDD adapter
|
* @adapter: HDD adapter
|
||||||
@@ -7224,6 +7247,7 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
|
|||||||
uint8_t enable_tx_sch_delay, dfs_chan_ageout_time;
|
uint8_t enable_tx_sch_delay, dfs_chan_ageout_time;
|
||||||
uint32_t dtim_sel_diversity, enable_secondary_rate;
|
uint32_t dtim_sel_diversity, enable_secondary_rate;
|
||||||
bool sap_xlna_bypass;
|
bool sap_xlna_bypass;
|
||||||
|
bool enable_ofdm_scrambler_seed;
|
||||||
|
|
||||||
hdd_enter_dev(adapter->dev);
|
hdd_enter_dev(adapter->dev);
|
||||||
|
|
||||||
@@ -7272,6 +7296,18 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = -1;
|
||||||
|
if (QDF_IS_STATUS_SUCCESS(ucfg_fwol_get_ofdm_scrambler_seed(
|
||||||
|
hdd_ctx->psoc, &enable_ofdm_scrambler_seed))) {
|
||||||
|
ret = wlan_hdd_set_ofdm_scrambler_seed(
|
||||||
|
adapter,
|
||||||
|
enable_ofdm_scrambler_seed);
|
||||||
|
}
|
||||||
|
if (ret) {
|
||||||
|
hdd_err("Failed to set WMI_PDEV_PARAM_EN_UPDATE_SCRAM_SEED");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
ret = -1;
|
ret = -1;
|
||||||
if (QDF_IS_STATUS_SUCCESS(ucfg_fwol_get_enable_secondary_rate(
|
if (QDF_IS_STATUS_SUCCESS(ucfg_fwol_get_enable_secondary_rate(
|
||||||
hdd_ctx->psoc, &enable_secondary_rate))) {
|
hdd_ctx->psoc, &enable_secondary_rate))) {
|
||||||
|
Reference in New Issue
Block a user