From 7dda8c22cc37bc3874082ed963b26845d8a27de9 Mon Sep 17 00:00:00 2001 From: Nachiket Kukade Date: Mon, 12 Mar 2018 19:59:43 +0530 Subject: [PATCH] qcacld-3.0: Set wmi_handle in pdev before registering EGAP event handler wmi_handle is needed while registering for wmi event handler. But it is not set for pdev before registering for EGAP event handler. With this, EGAP support remains disabled which may end up in increased power consumption. Move setting of wmi_handle in pdev before registering for EGAP event. Change-Id: Icb8accc738a3aaad7fbc1201c7c0d0b77945e8f2 CRs-Fixed: 2203380 --- core/wma/src/wma_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index d31f8f42172b..6c9cbe386261 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -5318,6 +5318,8 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle) wma_update_hdd_cfg_ndp(wma_handle, &tgt_cfg); wma_handle->tgt_cfg_update_cb(hdd_ctx, &tgt_cfg); target_if_store_pdev_target_if_ctx(wma_get_pdev_from_scn_handle); + target_pdev_set_wmi_handle(wma_handle->pdev->tgt_if_handle, + wma_handle->wmi_handle); /* register the Enhanced Green AP event handler */ if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap, @@ -6389,10 +6391,7 @@ int wma_rx_ready_event(void *handle, uint8_t *cmd_param_info, /* copy the mac addr */ WMI_MAC_ADDR_TO_CHAR_ARRAY(&ev->mac_addr, wma_handle->myaddr); WMI_MAC_ADDR_TO_CHAR_ARRAY(&ev->mac_addr, wma_handle->hwaddr); - wma_update_hdd_cfg(wma_handle); - target_pdev_set_wmi_handle(wma_handle->pdev->tgt_if_handle, - wma_handle->wmi_handle); WMA_LOGD("Exit"); return 0;