qcacld-3.0: Add gL1ssSleepAllowed

Add an ini item for configuring when PCIe L1ss Sleep is allowed.

Change-Id: I49eddbf7a91678753524a1b623765b5622f85520
CRs-Fixed: 2025363
This commit is contained in:
Dustin Brown 2017-03-27 16:59:08 -07:00 • committed by Sandeep Puligilla
commit ab1364a5ca
2 changed files with 49 additions and 0 deletions

View file

@ -9152,6 +9152,46 @@ enum hdd_wext_control {
#endif /* WLAN_FEATURE_11AX */
/**
* enum l1ss_sleep_allowed - when L1ss Sleep is allowed on capable platforms
* @L1SS_SLEEP_ALLOWED_NEVER: never allow L1ss Sleep
* @L1SS_SLEEP_ALLOWED_STA_CONNECTED: allow in station mode (connected)
* @L1SS_SLEEP_ALLOWED_STA_DISCONNECTED: allow in station mode (disconnected)
* @L1SS_SLEEP_ALLOWED_ALWAYS: always allow L1ss Sleep
*/
enum l1ss_sleep_allowed {
L1SS_SLEEP_ALLOWED_NEVER = 0,
L1SS_SLEEP_ALLOWED_STA_CONNECTED = BIT(0),
L1SS_SLEEP_ALLOWED_STA_DISCONNECTED = BIT(1),
L1SS_SLEEP_ALLOWED_ALWAYS = 0xff
};
/*
* <ini>
* gL1ssSleepAllowed - Control when L1ss Sleep is allowed on capable platforms
* @Min: 0 (disabled)
* @Max: 255 (always allow)
* @Default: 1 (station mode - connected)
*
* This config item controls when L1ss Sleep is allowed on capable platforms.
* The default is connected station mode to support DTIM power savings.
* 0) never allow
* 1) station mode (connected)
* 2) station mode (disconnected)
* 255) always allow
*
* Related: N/A
*
* Supported Feature: L1ss Sleep
*
* Usage: Internal/External
* </ini>
*/
#define CFG_L1SS_SLEEP_ALLOWED_NAME "gL1ssSleepAllowed"
#define CFG_L1SS_SLEEP_ALLOWED_MIN (L1SS_SLEEP_ALLOWED_NEVER)
#define CFG_L1SS_SLEEP_ALLOWED_MAX (L1SS_SLEEP_ALLOWED_ALWAYS)
#define CFG_L1SS_SLEEP_ALLOWED_DEFAULT (L1SS_SLEEP_ALLOWED_STA_CONNECTED)
/*
* Type declarations
*/
@ -9866,6 +9906,7 @@ struct hdd_config {
bool enable_ul_mimo;
bool enable_ul_ofdma;
#endif
enum l1ss_sleep_allowed l1ss_sleep_allowed;
};
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

View file

@ -4278,6 +4278,14 @@ REG_TABLE_ENTRY g_registry_table[] = {
CFG_ENABLE_UL_OFDMA_MIN,
CFG_ENABLE_UL_OFDMA_MAX),
#endif
REG_VARIABLE(CFG_L1SS_SLEEP_ALLOWED_NAME, WLAN_PARAM_Integer,
struct hdd_config, l1ss_sleep_allowed,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_L1SS_SLEEP_ALLOWED_DEFAULT,
CFG_L1SS_SLEEP_ALLOWED_MIN,
CFG_L1SS_SLEEP_ALLOWED_MAX),
};
/**