mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacld-3.0: Allow system suspend to complete when wifi is off
When wifi is off wlan module is closed and hence allow cfg80211 suspend/resume to pass and return success to kernel. Change-Id: Ic7d43a690c75be1254afa97f872d5c8228f93fcc CRs-Fixed: 2512492
This commit is contained in:
parent
3c73e07780
commit
f06009a8d2
1 changed files with 20 additions and 0 deletions
|
|
@ -1674,8 +1674,18 @@ exit_with_code:
|
|||
static int _wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
||||
{
|
||||
void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
|
||||
int errno;
|
||||
|
||||
errno = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != errno)
|
||||
return errno;
|
||||
|
||||
if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED) {
|
||||
hdd_debug("Driver Modules not Enabled ");
|
||||
return 0;
|
||||
}
|
||||
|
||||
errno = __wlan_hdd_cfg80211_resume_wlan(wiphy);
|
||||
hif_pm_runtime_put(hif_ctx);
|
||||
|
||||
|
|
@ -1885,8 +1895,18 @@ static int _wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
|
|||
struct cfg80211_wowlan *wow)
|
||||
{
|
||||
void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
|
||||
int errno;
|
||||
|
||||
errno = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != errno)
|
||||
return errno;
|
||||
|
||||
if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED) {
|
||||
hdd_debug("Driver Modules not Enabled ");
|
||||
return 0;
|
||||
}
|
||||
|
||||
errno = hif_pm_runtime_get_sync(hif_ctx);
|
||||
if (errno)
|
||||
return errno;
|
||||
|
|
|
|||
Loading…
Reference in a new issue