diff options
| author | Jeff Johnson <jjohnson@codeaurora.org> | 2017-03-27 08:00:11 -0700 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-03-31 02:35:26 -0700 |
| commit | 7766a1ff50c7d889fa0d1ccc8468ca2685ae441a (patch) | |
| tree | 92558f810bf66ee2b644de4fad6cb042cbddd5e7 | |
| parent | 7825f2fd90ccc75ac23fd687f805c41c74a34982 (diff) | |
qcacld-3.0: Fix HDD Bus suspend/resume API issues
While implementing the fix for "qcacld-3.0: Fix wlan_hdd_driver_ops
kernel-doc" it was observed that the kernel-doc for functions
wlan_hdd_bus_suspend() and wlan_hdd_bus_resume() did not match the
function signatures. Update the kernel-doc to match the actual code,
and in the case of wlan_hdd_bus_suspend() update one call in
hdd_enable_ext_wow() to align with the real interface instead of the
previously documented interface.
Change-Id: I6f25c954f5328a029fadeceadc23cfc242de6bf7
CRs-Fixed: 2025169
| -rw-r--r-- | core/hdd/inc/wlan_hdd_driver_ops.h | 11 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_ioctl.c | 45 |
2 files changed, 28 insertions, 28 deletions
diff --git a/core/hdd/inc/wlan_hdd_driver_ops.h b/core/hdd/inc/wlan_hdd_driver_ops.h index 0b0820fbfa9e..503d7e236998 100644 --- a/core/hdd/inc/wlan_hdd_driver_ops.h +++ b/core/hdd/inc/wlan_hdd_driver_ops.h @@ -60,13 +60,12 @@ void wlan_hdd_unregister_driver(void); /** * wlan_hdd_bus_suspend() - suspend the wlan bus + * @state: power management state * * This function is called by the platform driver to suspend the * wlan bus * - * @state: state - * - * Return: QDF_STATUS + * Return: 0 on success, negative errno on error */ int wlan_hdd_bus_suspend(pm_message_t state); @@ -83,17 +82,17 @@ int wlan_hdd_bus_suspend(pm_message_t state); int wlan_hdd_bus_suspend_noirq(void); /** - * wlan_hdd_bus_resume(): wake up the bus + * wlan_hdd_bus_resume() - wake up the bus * * This function is called by the platform driver to resume wlan * bus * - * Return: void + * Return: 0 for success and negative errno if failure */ int wlan_hdd_bus_resume(void); /** - * wlan_hdd_bus_resume_noirq(): handle bus resume no irq + * wlan_hdd_bus_resume_noirq() - handle bus resume no irq * * This function is called by the platform driver to do bus * resume no IRQ before calling resume callback. Call WMA and HIF diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 2f6a9efb89da..d49733e8350d 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -1935,7 +1935,7 @@ static int hdd_enable_ext_wow(hdd_adapter_t *adapter, tpSirExtWoWParams arg_params) { tSirExtWoWParams params; - QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE; + QDF_STATUS qdf_ret_status; hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter); tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter); int rc; @@ -1960,30 +1960,31 @@ static int hdd_enable_ext_wow(hdd_adapter_t *adapter, return -EPERM; } - if (hdd_ctx->ext_wow_should_suspend) { - if (hdd_ctx->config->extWowGotoSuspend) { - pm_message_t state; + if (!hdd_ctx->ext_wow_should_suspend) { + hdd_err("Received ready to ExtWoW failure"); + return -EPERM; + } - state.event = PM_EVENT_SUSPEND; - hdd_debug("Received ready to ExtWoW. Going to suspend"); + if (hdd_ctx->config->extWowGotoSuspend) { + pm_message_t state; - rc = wlan_hdd_cfg80211_suspend_wlan(hdd_ctx->wiphy, NULL); - if (rc < 0) { - hdd_err("wlan_hdd_cfg80211_suspend_wlan failed, error = %d", - rc); - return rc; - } - qdf_ret_status = wlan_hdd_bus_suspend(state); - if (qdf_ret_status != QDF_STATUS_SUCCESS) { - hdd_err("wlan_hdd_suspend failed, status = %d", - qdf_ret_status); - wlan_hdd_cfg80211_resume_wlan(hdd_ctx->wiphy); - return -EPERM; - } + state.event = PM_EVENT_SUSPEND; + hdd_debug("Received ready to ExtWoW. Going to suspend"); + + rc = wlan_hdd_cfg80211_suspend_wlan(hdd_ctx->wiphy, NULL); + if (rc < 0) { + hdd_err("wlan_hdd_cfg80211_suspend_wlan failed, error = %d", + rc); + return rc; + } + + rc = wlan_hdd_bus_suspend(state); + if (rc) { + hdd_err("wlan_hdd_bus_suspend failed, status = %d", + rc); + wlan_hdd_cfg80211_resume_wlan(hdd_ctx->wiphy); + return rc; } - } else { - hdd_err("Received ready to ExtWoW failure"); - return -EPERM; } return 0; |
