qcacld-3.0: Featurize Dynamic Voltage Config

Host provides INI way to control voltage configs, featurizing the
same for Genoa.

Change-Id: Ia58d84eb2e2a67ead189a51d2a0b98230513f8f9
CRs-Fixed: 2304125
This commit is contained in:
Rachit Kankane 2018-08-02 18:47:50 +05:30 • committed by nshrivas
commit f6834c4b4c
12 changed files with 40 additions and 1 deletions

3
Kbuild
View file

@ -2260,6 +2260,9 @@ cppflags-$(CONFIG_WLAN_NUD_TRACKING) += -DWLAN_NUD_TRACKING
#Flag to enable set and get disable channel list feature
cppflags-$(CONFIG_DISABLE_CHANNEL_LIST) += -DDISABLE_CHANNEL_LIST
#Flag to enable Dynamic Voltage WDCVS (Config Voltage Mode)
cppflags-$(CONFIG_WLAN_DYNAMIC_CVM) += -DFEATURE_WLAN_DYNAMIC_CVM
# configure log buffer size
ifdef CONFIG_CFG_NUM_DP_TRACE_RECORD
ccflags-y += -DMAX_QDF_DP_TRACE_RECORDS=$(CONFIG_CFG_NUM_DP_TRACE_RECORD)

View file

@ -548,6 +548,9 @@ CONFIG_WLAN_NUD_TRACKING := y
#Flag to enable set and get disable channel list feature
CONFIG_DISABLE_CHANNEL_LIST :=y
#Flag to enable Dynamic Voltage WDCVS (Config Voltage Mode)
CONFIG_WLAN_DYNAMIC_CVM := y
CONFIG_WIFI_POS_CONVERGED := y
ifneq ($(CONFIG_WIFI_POS_CONVERGED), y)
CONFIG_WIFI_POS_LEGACY := y

View file

@ -45,6 +45,10 @@ CONFIG_WLAN_FEATURE_DSRC := n
CONFIG_FEATURE_MONITOR_MODE_SUPPORT := n
CONFIG_DP_TRACE := y
CONFIG_QCACLD_FEATURE_METERING := n
#Flag to enable Dynamic Voltage WDCVS (Config Voltage Mode)
CONFIG_WLAN_DYNAMIC_CVM := n
#We might need to disable WEXT support in perf builds in future
CONFIG_WLAN_WEXT_SUPPORT_ENABLE := y

View file

@ -71,6 +71,8 @@ endif
# other features
#Flag to enable Dynamic Voltage WDCVS (Config Voltage Mode)
CONFIG_WLAN_DYNAMIC_CVM := y
ifeq ($(CONFIG_CNSS2), y)
ifeq ($(CONFIG_HIF_PCI), y)
CONFIG_PLD_PCIE_CNSS_FLAG := y

View file

@ -53,6 +53,9 @@ CONFIG_FEATURE_EPPING := n
CONFIG_WLAN_LOG_ENTER := n
CONFIG_WLAN_LOG_EXIT := n
#Flag to enable Dynamic Voltage WDCVS (Config Voltage Mode)
CONFIG_WLAN_DYNAMIC_CVM := y
# Features gets enabled on slub debug
CONFIG_WLAN_OBJMGR_DEBUG:= n
CONFIG_FEATURE_MEMDUMP_ENABLE := n

View file

@ -13926,8 +13926,10 @@ struct hdd_config {
/* length includes separator */
char rm_capability[3 * DOT11F_IE_RRMENABLEDCAP_MAX_LEN];
#ifdef FEATURE_WLAN_DYNAMIC_CVM
/* Bitmap for operating voltage corner mode */
uint32_t vc_mode_cfg_bitmap;
#endif
#ifdef MWS_COEX
/* Bitmap for MWS-COEX 4G Quick FTDM */

View file

@ -618,12 +618,14 @@ struct reg_table_entry g_registry_table[] = {
CFG_ENABLE_LTE_COEX_MIN,
CFG_ENABLE_LTE_COEX_MAX),
#ifdef FEATURE_WLAN_DYNAMIC_CVM
REG_VARIABLE(CFG_VC_MODE_BITMAP, WLAN_PARAM_HexInteger,
struct hdd_config, vc_mode_cfg_bitmap,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_VC_MODE_BITMAP_DEFAULT,
CFG_VC_MODE_BITMAP_MIN,
CFG_VC_MODE_BITMAP_MAX),
#endif
REG_VARIABLE(CFG_ENABLE_SAP_MANDATORY_CHAN_LIST, WLAN_PARAM_Integer,
struct hdd_config, enable_sap_mandatory_chan_list,

View file

@ -10248,6 +10248,18 @@ static void wlan_hdd_p2p_lo_event_callback(void *context,
evt->vdev_id);
}
#ifdef FEATURE_WLAN_DYNAMIC_CVM
static inline int hdd_set_vc_mode_config(struct hdd_context *hdd_ctx)
{
return sme_set_vc_mode_config(hdd_ctx->config->vc_mode_cfg_bitmap);
}
#else
static inline int hdd_set_vc_mode_config(struct hdd_context *hdd_ctx)
{
return QDF_STATUS_SUCCESS;
}
#endif
/**
* hdd_adaptive_dwelltime_init() - initialization for adaptive dwell time config
* @hdd_ctx: HDD context
@ -10456,7 +10468,7 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
if (hdd_ctx->config->enable_go_cts2self_for_sta)
sme_set_cts2self_for_p2p_go(mac_handle);
if (sme_set_vc_mode_config(hdd_ctx->config->vc_mode_cfg_bitmap))
if (hdd_set_vc_mode_config(hdd_ctx))
hdd_warn("Error in setting Voltage Corner mode config to FW");
if (hdd_rx_ol_init(hdd_ctx))

View file

@ -2152,6 +2152,7 @@ QDF_STATUS sme_send_limit_off_channel_params(tHalHandle hal, uint8_t vdev_id,
bool is_tos_active, uint32_t max_off_chan_time,
uint32_t rest_time, bool skip_dfs_chan);
#ifdef FEATURE_WLAN_DYNAMIC_CVM
/**
* sme_set_vc_mode_config() - Set voltage corner config to FW.
* @bitmap: Bitmap that refers to voltage corner config with
@ -2160,6 +2161,7 @@ QDF_STATUS sme_send_limit_off_channel_params(tHalHandle hal, uint8_t vdev_id,
* Return: QDF_STATUS
*/
QDF_STATUS sme_set_vc_mode_config(uint32_t vc_bitmap);
#endif
/**
* sme_set_del_pmkid_cache() - API to update PMKID cache

View file

@ -15633,6 +15633,7 @@ void sme_display_disconnect_stats(tHalHandle hal, uint8_t session_id)
session->disconnect_stats.peer_kickout);
}
#ifdef FEATURE_WLAN_DYNAMIC_CVM
/**
* sme_set_vc_mode_config() - Set voltage corner config to FW
* @bitmap: Bitmap that referes to voltage corner config with
@ -15659,6 +15660,7 @@ QDF_STATUS sme_set_vc_mode_config(uint32_t vc_bitmap)
}
return QDF_STATUS_SUCCESS;
}
#endif
/**
* sme_set_bmiss_bcnt() - set bmiss config parameters

View file

@ -364,6 +364,7 @@ QDF_STATUS wma_crash_inject(WMA_HANDLE wma_handle, uint32_t type,
*/
uint32_t wma_critical_events_in_flight(void);
#ifdef FEATURE_WLAN_DYNAMIC_CVM
/**
* wma_set_vc_mode_config() - set voltage corner mode config to FW.
* @wma_handle: pointer to wma handle.
@ -376,6 +377,7 @@ uint32_t wma_critical_events_in_flight(void);
*/
QDF_STATUS wma_set_vc_mode_config(void *wma_handle,
uint32_t vc_bitmap);
#endif
QDF_STATUS wma_process_dhcp_ind(WMA_HANDLE wma_handle,
tAniDHCPInd *ta_dhcp_ind);

View file

@ -4523,6 +4523,7 @@ tSirWifiPeerType wmi_to_sir_peer_type(enum wmi_peer_type type)
}
#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
#ifdef FEATURE_WLAN_DYNAMIC_CVM
/**
* wma_set_vc_mode_config() - set voltage corner mode config to FW.
* @wma_handle: pointer to wma handle.
@ -4557,6 +4558,7 @@ QDF_STATUS wma_set_vc_mode_config(void *wma_handle,
return QDF_STATUS_SUCCESS;
}
#endif
int wma_chip_power_save_failure_detected_handler(void *handle,
uint8_t *cmd_param_info,