qcacld-3.0: Add ini wlm_latency_reset_on_disconnect

Currently, the WLM mode could be recovered after disconnection
or interface down/up about random MAC feature. Since some OEMs
have different mechanisms to config WLM mode on their framework
implementation and don't expect recovering the WLM mode.

So add logic to set default WLM mode when disconnection happens.
And add ini wlm_latency_reset_on_disconnect to differentiate
the implementation in driver. By default
wlm_latency_reset_on_disconnect is false.

Change-Id: Idcb3baf6ab8f0533eb01c28ff1c12513f9995946
CRs-Fixed: 3006875
This commit is contained in:
Paul Zhang
2021-08-13 16:28:38 +08:00
committed by Madan Koyyalamudi
parent a3134a3d3e
commit fc8ccbf23a
7 changed files with 179 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -52,7 +52,7 @@
*
* @min: 0
* @max: 1
* @default: 0
* @default: 1
*
* 0 - disable
* 1 - enable
@@ -63,6 +63,23 @@
1, \
"WLM latency Enable")
/*
* <ini>
* wlm_latency_reset_on_disconnect - WLM latency level reset on disconnect
*
* @min: 0
* @max: 1
* @default: 0
*
* 0 - disable
* 1 - enable
*
* </ini>
*/
#define CFG_LATENCY_RESET CFG_INI_BOOL("wlm_latency_reset_on_disconnect", \
0, \
"WLM latency reset on disconnect")
/*
* <ini>
* wlm_latency_level - WLM latency level
@@ -414,6 +431,7 @@
#define CFG_FE_WLM_ALL \
CFG(CFG_LATENCY_ENABLE) \
CFG(CFG_LATENCY_RESET) \
CFG(CFG_LATENCY_LEVEL) \
CFG(CFG_LATENCY_FLAGS_NORMAL) \
CFG(CFG_LATENCY_FLAGS_MOD) \

View File

@@ -2342,12 +2342,14 @@ struct wlan_mlme_btm {
/**
* struct wlan_mlme_fe_wlm - WLM related configs
* @latency_enable: Flag to check if latency is enabled
* @latency_reset: Flag to check if latency reset is enabled
* @latency_level: WLM latency level
* @latency_flags: WLM latency flags setting
* @latency_host_flags: WLM latency host flags setting
*/
struct wlan_mlme_fe_wlm {
bool latency_enable;
bool latency_reset;
uint8_t latency_level;
uint32_t latency_flags[MLME_NUM_WLM_LATENCY_LEVEL];
uint32_t latency_host_flags[MLME_NUM_WLM_LATENCY_LEVEL];

View File

@@ -3272,6 +3272,34 @@ ucfg_mlme_get_wmm_mode(struct wlan_objmgr_psoc *psoc, uint8_t *value)
return wlan_mlme_get_wmm_mode(psoc, value);
}
/**
* ucfg_mlme_cfg_get_wlm_level() - Get the WLM level value
* @psoc: pointer to psoc object
* @level: level that needs to be filled.
*
* Return: QDF Status
*/
static inline
QDF_STATUS ucfg_mlme_cfg_get_wlm_level(struct wlan_objmgr_psoc *psoc,
uint8_t *level)
{
return mlme_get_cfg_wlm_level(psoc, level);
}
/**
* ucfg_mlme_cfg_get_wlm_reset() - Get the WLM reset flag
* @psoc: pointer to psoc object
* @reset: reset that needs to be filled.
*
* Return: QDF Status
*/
static inline
QDF_STATUS ucfg_mlme_cfg_get_wlm_reset(struct wlan_objmgr_psoc *psoc,
bool *reset)
{
return mlme_get_cfg_wlm_reset(psoc, reset);
}
#ifdef WLAN_FEATURE_11AX
/**
* ucfg_mlme_update_tgt_he_cap() - Update tgt he cap in mlme component