diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index fff7b7f169af..0a934066c1c2 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -1072,6 +1072,12 @@ static int __wlan_hdd_bus_suspend(struct wow_enable_params wow_params) goto resume_pmo; } + /* + * Remove bus votes at the very end, after making sure there are no + * pending bus transactions from WLAN SOC for TX/RX. + */ + pld_request_bus_bandwidth(hdd_ctx->parent_dev, PLD_BUS_WIDTH_NONE); + hdd_info("bus suspend succeeded"); return 0; @@ -1218,6 +1224,12 @@ int wlan_hdd_bus_resume(void) return -EINVAL; } + /* + * Add bus votes at the beginning, before making sure there are any + * bus transactions from WLAN SOC for TX/RX. + */ + pld_request_bus_bandwidth(hdd_ctx->parent_dev, PLD_BUS_WIDTH_MEDIUM); + status = hif_bus_resume(hif_ctx); if (status) { hdd_err("Failed hif bus resume"); diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index a80d500b9e2f..f36fd477e9cb 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1717,8 +1717,6 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) goto exit_with_code; } - pld_request_bus_bandwidth(hdd_ctx->parent_dev, PLD_BUS_WIDTH_MEDIUM); - status = hdd_resume_wlan(); if (status != QDF_STATUS_SUCCESS) { exit_code = 0; @@ -1973,8 +1971,6 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, hdd_ctx->is_wiphy_suspended = true; - pld_request_bus_bandwidth(hdd_ctx->parent_dev, PLD_BUS_WIDTH_NONE); - hdd_exit(); return 0;