mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: Move hif context assignment to right before its usage
When wifi is off, unnecessary error logs are printed. To avoid these logs from printing, move hif context assignment to right before its usage. Change-Id: Ie2313f796674885a7a518693a09877df4e6cb817 CRs-Fixed: 2513187
This commit is contained in:
parent
5be799467d
commit
91525f33ba
1 changed files with 6 additions and 4 deletions
|
|
@ -1673,12 +1673,12 @@ exit_with_code:
|
|||
|
||||
static int _wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
||||
{
|
||||
void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
void *hif_ctx;
|
||||
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
|
||||
int errno;
|
||||
|
||||
errno = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != errno)
|
||||
if (errno)
|
||||
return errno;
|
||||
|
||||
if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED) {
|
||||
|
|
@ -1686,6 +1686,7 @@ static int _wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
|||
return 0;
|
||||
}
|
||||
|
||||
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
errno = __wlan_hdd_cfg80211_resume_wlan(wiphy);
|
||||
hif_pm_runtime_put(hif_ctx);
|
||||
|
||||
|
|
@ -1894,12 +1895,12 @@ 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);
|
||||
void *hif_ctx;
|
||||
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
|
||||
int errno;
|
||||
|
||||
errno = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != errno)
|
||||
if (errno)
|
||||
return errno;
|
||||
|
||||
if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED) {
|
||||
|
|
@ -1907,6 +1908,7 @@ static int _wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
|
|||
return 0;
|
||||
}
|
||||
|
||||
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
errno = hif_pm_runtime_get_sync(hif_ctx);
|
||||
if (errno)
|
||||
return errno;
|
||||
|
|
|
|||
Loading…
Reference in a new issue