qcacld-3.0: Add support to request QoS in low latency mode

Add support to request QoS in low latency mode
with CLD_DEV_PM_QOS feature.

Change-Id: I928825545e88a2e869d23c20542fc7e32bcec00e
CRs-Fixed: 2789111
This commit is contained in:
Nirav Shah 2020-09-23 13:02:48 +05:30 • committed by snandini
commit ca13d6a540
4 changed files with 68 additions and 40 deletions

View file

@ -4716,4 +4716,22 @@ static inline void hdd_beacon_latency_event_cb(uint32_t latency_level)
*/
void hdd_netdev_update_features(struct hdd_adapter *adapter);
#if defined(CLD_PM_QOS) && defined(WLAN_FEATURE_LL_MODE)
/**
* wlan_hdd_set_wlm_mode() - Function to set pm_qos config in wlm mode
* @hdd_ctx: HDD context
* @latency level: latency value received
*
* Return: None
*/
void wlan_hdd_set_wlm_mode(struct hdd_context *hdd_ctx,
uint16_t latency_level);
#else
static inline
void wlan_hdd_set_wlm_mode(struct hdd_context *hdd_ctx,
uint16_t latency_level)
{
}
#endif
#endif /* end #if !defined(WLAN_HDD_MAIN_H) */

View file

@ -8148,30 +8148,6 @@ static int hdd_config_total_beacon_miss_count(struct hdd_adapter *adapter,
return qdf_status_to_os_return(status);
}
#if defined(CLD_PM_QOS) && defined(WLAN_FEATURE_LL_MODE)
void wlan_hdd_set_wlm_mode(struct hdd_context *hdd_ctx, uint16_t latency_level)
{
if (latency_level ==
QCA_WLAN_VENDOR_ATTR_CONFIG_LATENCY_LEVEL_ULTRALOW) {
hdd_ctx->llm_enabled = true;
if (!hdd_ctx->hbw_requested) {
cpumask_setall(&hdd_ctx->pm_qos_req.cpus_affine);
pm_qos_update_request(&hdd_ctx->pm_qos_req,
DISABLE_KRAIT_IDLE_PS_VAL);
hdd_ctx->hbw_requested = true;
}
} else {
if (hdd_ctx->hbw_requested) {
cpumask_clear(&hdd_ctx->pm_qos_req.cpus_affine);
pm_qos_update_request(&hdd_ctx->pm_qos_req,
PM_QOS_DEFAULT_VALUE);
hdd_ctx->hbw_requested = false;
}
hdd_ctx->llm_enabled = false;
}
}
#endif
static int hdd_config_latency_level(struct hdd_adapter *adapter,
const struct nlattr *attr)
{

View file

@ -796,22 +796,6 @@ QDF_STATUS wlan_hdd_send_sta_authorized_event(
struct hdd_context *hdd_ctx,
const struct qdf_mac_addr *mac_addr);
/**
* wlan_hdd_set_wlm_mode() - Function to set pm_qos config in wlm mode
* @hdd_ctx: HDD context
* @latency level: latency value received
*
* Return: None
*/
#if defined(CLD_PM_QOS) && defined(WLAN_FEATURE_LL_MODE)
void wlan_hdd_set_wlm_mode(struct hdd_context *hdd_ctx, uint16_t latency_level);
#else
static inline
void wlan_hdd_set_wlm_mode(struct hdd_context *hdd_ctx, uint16_t latency_level)
{
}
#endif
/**
* hdd_set_dynamic_antenna_mode() - set dynamic antenna mode
* @adapter: Pointer to network adapter

View file

@ -9615,6 +9615,56 @@ static inline void hdd_pm_qos_update_request(struct hdd_context *hdd_ctx,
}
#endif /* CLD_PM_QOS */
#if defined(CLD_PM_QOS) && defined(WLAN_FEATURE_LL_MODE)
#if defined(CLD_DEV_PM_QOS)
void wlan_hdd_set_wlm_mode(struct hdd_context *hdd_ctx, uint16_t latency_level)
{
cpumask_t pm_qos_cpu_mask;
cpumask_clear(&pm_qos_cpu_mask);
if (latency_level ==
QCA_WLAN_VENDOR_ATTR_CONFIG_LATENCY_LEVEL_ULTRALOW) {
hdd_ctx->llm_enabled = true;
if (!hdd_ctx->hbw_requested) {
hdd_pm_qos_update_cpu_mask(&pm_qos_cpu_mask, true);
hdd_pm_qos_update_request(hdd_ctx, &pm_qos_cpu_mask);
hdd_ctx->hbw_requested = true;
}
} else {
if (hdd_ctx->hbw_requested) {
hdd_pm_qos_update_cpu_mask(&pm_qos_cpu_mask, false);
hdd_pm_qos_update_request(hdd_ctx, &pm_qos_cpu_mask);
hdd_ctx->hbw_requested = false;
}
hdd_ctx->llm_enabled = false;
}
}
#else
void wlan_hdd_set_wlm_mode(struct hdd_context *hdd_ctx, uint16_t latency_level)
{
if (latency_level ==
QCA_WLAN_VENDOR_ATTR_CONFIG_LATENCY_LEVEL_ULTRALOW) {
hdd_ctx->llm_enabled = true;
if (!hdd_ctx->hbw_requested) {
cpumask_setall(&hdd_ctx->pm_qos_req.cpus_affine);
pm_qos_update_request(&hdd_ctx->pm_qos_req,
DISABLE_KRAIT_IDLE_PS_VAL);
hdd_ctx->hbw_requested = true;
}
} else {
if (hdd_ctx->hbw_requested) {
cpumask_clear(&hdd_ctx->pm_qos_req.cpus_affine);
pm_qos_update_request(&hdd_ctx->pm_qos_req,
PM_QOS_DEFAULT_VALUE);
hdd_ctx->hbw_requested = false;
}
hdd_ctx->llm_enabled = false;
}
}
#endif
#endif
/**
* hdd_low_tput_gro_flush_skip_handler() - adjust GRO flush for low tput
* @hdd_ctx: handle to hdd context