summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index a85ab2996f33..4e4cd55f985a 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -4092,12 +4092,6 @@ VOS_STATUS wlan_hdd_set_powersave(hdd_adapter_t *pAdapter, int mode)
{
hdd_context_t *pHddCtx;
eHalStatus status;
- void *cookie;
- struct hdd_request *request;
- static const struct hdd_request_params params = {
- .priv_size = 0,
- .timeout_ms = WLAN_WAIT_TIME_POWER,
- };
if (NULL == pAdapter)
{
@@ -4105,20 +4099,27 @@ VOS_STATUS wlan_hdd_set_powersave(hdd_adapter_t *pAdapter, int mode)
return VOS_STATUS_E_FAULT;
}
- request = hdd_request_alloc(&params);
- if (!request) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: Request allocation failure", __func__);
- return VOS_STATUS_E_NOMEM;
- }
- cookie = hdd_request_cookie(request);
-
hddLog(VOS_TRACE_LEVEL_INFO_HIGH, "power mode=%d", mode);
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
if (DRIVER_POWER_MODE_ACTIVE == mode)
{
+ void *cookie;
+ struct hdd_request *request;
+ static const struct hdd_request_params params = {
+ .priv_size = 0,
+ .timeout_ms = WLAN_WAIT_TIME_POWER,
+ };
+
+ request = hdd_request_alloc(&params);
+ if (!request) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ "%s: Request allocation failure", __func__);
+ return VOS_STATUS_E_NOMEM;
+ }
+ cookie = hdd_request_cookie(request);
+
hddLog(VOS_TRACE_LEVEL_INFO_HIGH, "%s:Wlan driver Entering "
"Full Power", __func__);