diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 0e1e1173026a..03809704a76f 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1046,6 +1046,7 @@ struct hdd_context; * @gpio_tsf_sync_work: work to sync send TSF CAP WMI command * @cache_sta_count: number of currently cached stations * @acs_complete_event: acs complete event + * @latency_level: 0 - normal, 1 - moderate, 2 - low, 3 - ultralow */ struct hdd_adapter { /* Magic cookie for adapter sanity verification. Note that this @@ -1290,6 +1291,7 @@ struct hdd_adapter { uint32_t track_dest_ipv4; uint32_t mon_chan_freq; uint32_t mon_bandwidth; + uint16_t latency_level; /* rcpi information */ struct rcpi_info rcpi; diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 520051a79f77..4735f2d354e2 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -7315,10 +7315,10 @@ static int hdd_config_latency_level(struct hdd_adapter *adapter, /* Map the latency value to the level which fw expected * 0 - normal, 1 - moderate, 2 - low, 3 - ultralow */ - latency_level = latency_level - 1; + adapter->latency_level = latency_level - 1; status = sme_set_wlm_latency_level(hdd_ctx->mac_handle, adapter->vdev_id, - latency_level); + adapter->latency_level); if (QDF_IS_STATUS_ERROR(status)) hdd_err("set latency level failed, %u", status); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 4012836dd7ce..1fe3be531845 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -10347,6 +10347,7 @@ err_out: int hdd_start_station_adapter(struct hdd_adapter *adapter) { QDF_STATUS status; + struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); int ret; hdd_enter_dev(adapter->dev); @@ -10376,6 +10377,12 @@ int hdd_start_station_adapter(struct hdd_adapter *adapter) hdd_register_hl_netdev_fc_timer(adapter, hdd_tx_resume_timer_expired_handler); + status = sme_set_wlm_latency_level(hdd_ctx->mac_handle, + adapter->vdev_id, + adapter->latency_level); + if (QDF_IS_STATUS_ERROR(status)) + hdd_warn("set latency level failed, %u", status); + hdd_exit(); return 0;