|
@@ -5555,6 +5555,7 @@ hdd_alloc_station_adapter(struct hdd_context *hdd_ctx, tSirMacAddr mac_addr,
|
|
|
struct hdd_adapter *adapter;
|
|
|
struct hdd_station_ctx *sta_ctx;
|
|
|
QDF_STATUS qdf_status;
|
|
|
+ uint8_t latency_level;
|
|
|
|
|
|
/* cfg80211 initialization and registration */
|
|
|
dev = alloc_netdev_mq(sizeof(*adapter), name,
|
|
@@ -5623,7 +5624,13 @@ hdd_alloc_station_adapter(struct hdd_context *hdd_ctx, tSirMacAddr mac_addr,
|
|
|
dev->tx_queue_len = HDD_NETDEV_TX_QUEUE_LEN;
|
|
|
adapter->wdev.wiphy = hdd_ctx->wiphy;
|
|
|
adapter->wdev.netdev = dev;
|
|
|
- adapter->latency_level = cfg_get(hdd_ctx->psoc, CFG_LATENCY_LEVEL);
|
|
|
+ qdf_status = ucfg_mlme_cfg_get_wlm_level(hdd_ctx->psoc, &latency_level);
|
|
|
+ if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
|
|
+ hdd_debug("Can't get latency level");
|
|
|
+ latency_level =
|
|
|
+ QCA_WLAN_VENDOR_ATTR_CONFIG_LATENCY_LEVEL_NORMAL;
|
|
|
+ }
|
|
|
+ adapter->latency_level = latency_level;
|
|
|
|
|
|
/* set dev's parent to underlying device */
|
|
|
SET_NETDEV_DEV(dev, hdd_ctx->parent_dev);
|
|
@@ -12327,6 +12334,7 @@ int hdd_start_station_adapter(struct hdd_adapter *adapter)
|
|
|
QDF_STATUS status;
|
|
|
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
int ret;
|
|
|
+ bool reset;
|
|
|
|
|
|
hdd_enter_dev(adapter->dev);
|
|
|
if (test_bit(SME_SESSION_OPENED, &adapter->event_flags)) {
|
|
@@ -12355,11 +12363,21 @@ 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);
|
|
|
+ status = ucfg_mlme_cfg_get_wlm_reset(hdd_ctx->psoc, &reset);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ hdd_err("could not get the wlm reset flag");
|
|
|
+ reset = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!reset) {
|
|
|
+ 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 wlm mode failed, %u", status);
|
|
|
+ else
|
|
|
+ hdd_debug("set wlm mode %d", adapter->latency_level);
|
|
|
+ }
|
|
|
|
|
|
hdd_exit();
|
|
|
|
|
@@ -15981,6 +15999,8 @@ static void hdd_set_adapter_wlm_def_level(struct hdd_context *hdd_ctx)
|
|
|
struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
wlan_net_dev_ref_dbgid dbgid = NET_DEV_HOLD_GET_ADAPTER;
|
|
|
int ret;
|
|
|
+ QDF_STATUS qdf_status;
|
|
|
+ uint8_t latency_level;
|
|
|
|
|
|
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam())
|
|
|
return;
|
|
@@ -15991,8 +16011,14 @@ static void hdd_set_adapter_wlm_def_level(struct hdd_context *hdd_ctx)
|
|
|
|
|
|
hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter,
|
|
|
dbgid) {
|
|
|
- adapter->latency_level =
|
|
|
- cfg_get(hdd_ctx->psoc, CFG_LATENCY_LEVEL);
|
|
|
+ qdf_status = ucfg_mlme_cfg_get_wlm_level(hdd_ctx->psoc,
|
|
|
+ &latency_level);
|
|
|
+ if (QDF_IS_STATUS_ERROR(qdf_status))
|
|
|
+ adapter->latency_level =
|
|
|
+ QCA_WLAN_VENDOR_ATTR_CONFIG_LATENCY_LEVEL_NORMAL;
|
|
|
+ else
|
|
|
+ adapter->latency_level = latency_level;
|
|
|
+
|
|
|
hdd_adapter_dev_put_debug(adapter, dbgid);
|
|
|
}
|
|
|
}
|