mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Sync runtime pm resume when system suspend occurs
Some system suspend commands are getting sent to firmware while runtime resume is in progress. Sync runtime pm resume when system suspend occurs to avoid this. Change-Id: I6e652104e984b81e29a5f328fcf3937502a8f47f CRs-Fixed: 2509910
This commit is contained in:
parent
8fd84758e7
commit
6ccc4fa788
1 changed files with 32 additions and 2 deletions
|
|
@ -1671,6 +1671,17 @@ exit_with_code:
|
|||
return exit_code;
|
||||
}
|
||||
|
||||
static int _wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
||||
{
|
||||
void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
int errno;
|
||||
|
||||
errno = __wlan_hdd_cfg80211_resume_wlan(wiphy);
|
||||
hif_pm_runtime_put(hif_ctx);
|
||||
|
||||
return errno;
|
||||
}
|
||||
|
||||
int wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
||||
{
|
||||
struct osif_psoc_sync *psoc_sync;
|
||||
|
|
@ -1680,7 +1691,7 @@ int wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
|||
if (errno)
|
||||
return errno;
|
||||
|
||||
errno = __wlan_hdd_cfg80211_resume_wlan(wiphy);
|
||||
errno = _wlan_hdd_cfg80211_resume_wlan(wiphy);
|
||||
|
||||
osif_psoc_sync_op_stop(psoc_sync);
|
||||
|
||||
|
|
@ -1870,6 +1881,25 @@ resume_tx:
|
|||
|
||||
}
|
||||
|
||||
static int _wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
|
||||
struct cfg80211_wowlan *wow)
|
||||
{
|
||||
void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
int errno;
|
||||
|
||||
errno = hif_pm_runtime_get_sync(hif_ctx);
|
||||
if (errno)
|
||||
return errno;
|
||||
|
||||
errno = __wlan_hdd_cfg80211_suspend_wlan(wiphy, wow);
|
||||
if (errno) {
|
||||
hif_pm_runtime_put(hif_ctx);
|
||||
return errno;
|
||||
}
|
||||
|
||||
return errno;
|
||||
}
|
||||
|
||||
int wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
|
||||
struct cfg80211_wowlan *wow)
|
||||
{
|
||||
|
|
@ -1880,7 +1910,7 @@ int wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
|
|||
if (errno)
|
||||
return errno;
|
||||
|
||||
errno = __wlan_hdd_cfg80211_suspend_wlan(wiphy, wow);
|
||||
errno = _wlan_hdd_cfg80211_suspend_wlan(wiphy, wow);
|
||||
|
||||
osif_psoc_sync_op_stop(psoc_sync);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue