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:
Rajeev Kumar 2019-08-20 18:29:59 -07:00 • committed by nshrivas
commit f06009a8d2

View file

@ -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;