mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Move HIF RTPM put before validate context check in cfg80211 resume
If FW asserts before cfg80211 resume, cfg80211 resume will skip calling RTPM put, which finally results a usage count mismatch. To fix it move RTPM put call at the beginning of cfg80211 resume to make sure its always called and RTPM usage count is in sync. Change-Id: If0c9fbe094de16d103cd58ed4db3b08b76adb3cf CRs-Fixed: 2728742
This commit is contained in:
parent
d8fa7346e3
commit
a3e85cc8b2
1 changed files with 4 additions and 4 deletions
|
|
@ -1896,6 +1896,10 @@ static int _wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
|||
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
|
||||
int errno;
|
||||
|
||||
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
if (hif_ctx)
|
||||
hif_pm_runtime_put(hif_ctx, RTPM_ID_SUSPEND_RESUME);
|
||||
|
||||
if (!hdd_ctx) {
|
||||
hdd_err_rl("hdd context is null");
|
||||
return -ENODEV;
|
||||
|
|
@ -1911,12 +1915,8 @@ static int _wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
|||
if (errno)
|
||||
return errno;
|
||||
|
||||
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
if (!hif_ctx)
|
||||
return -EINVAL;
|
||||
|
||||
errno = __wlan_hdd_cfg80211_resume_wlan(wiphy);
|
||||
hif_pm_runtime_put(hif_ctx, RTPM_ID_SUSPEND_RESUME);
|
||||
|
||||
return errno;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue