diff --git a/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c b/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c index 572c316763..58fd099cd8 100644 --- a/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c +++ b/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c @@ -881,7 +881,7 @@ void policy_mgr_pdev_set_hw_mode_cb(uint32_t status, pm_ctx = policy_mgr_get_context(context); if (!pm_ctx) { policy_mgr_err("Invalid Context"); - return; + goto set_done_event; } policy_mgr_set_hw_mode_change_in_progress(context, @@ -889,14 +889,14 @@ void policy_mgr_pdev_set_hw_mode_cb(uint32_t status, if (status != SET_HW_MODE_STATUS_OK) { policy_mgr_err("Set HW mode failed with status %d", status); - return; + goto set_done_event; } /* vdev mac map for NAN Discovery is expected in NAN Enable resp */ if (reason != POLICY_MGR_UPDATE_REASON_NAN_DISCOVERY && !vdev_mac_map) { policy_mgr_err("vdev_mac_map is NULL"); - return; + goto set_done_event; } policy_mgr_debug("cfgd_hw_mode_index=%d", cfgd_hw_mode_index); @@ -910,7 +910,7 @@ void policy_mgr_pdev_set_hw_mode_cb(uint32_t status, &hw_mode); if (ret != QDF_STATUS_SUCCESS) { policy_mgr_err("Get HW mode failed: %d", ret); - return; + goto set_done_event; } policy_mgr_debug("MAC0: TxSS:%d, RxSS:%d, Bw:%d, band_cap %d", @@ -940,12 +940,15 @@ void policy_mgr_pdev_set_hw_mode_cb(uint32_t status, next_action, reason); else { policy_mgr_debug("No action needed right now"); - ret = policy_mgr_set_opportunistic_update(context); - if (!QDF_IS_STATUS_SUCCESS(ret)) - policy_mgr_err("ERROR: set opportunistic_update event failed"); + goto set_done_event; } return; + +set_done_event: + ret = policy_mgr_set_opportunistic_update(context); + if (!QDF_IS_STATUS_SUCCESS(ret)) + policy_mgr_err("ERROR: set opportunistic_update event failed"); } /** diff --git a/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h b/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h index 3bbd588e9b..34230d846c 100644 --- a/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h +++ b/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h @@ -27,10 +27,13 @@ #include "wlan_reg_services_api.h" #define DBS_OPPORTUNISTIC_TIME 5 + +#define POLICY_MGR_SER_CMD_TIMEOUT 4000 + #ifdef QCA_WIFI_3_0_EMU -#define CONNECTION_UPDATE_TIMEOUT 3000 +#define CONNECTION_UPDATE_TIMEOUT (POLICY_MGR_SER_CMD_TIMEOUT + 3000) #else -#define CONNECTION_UPDATE_TIMEOUT 1000 +#define CONNECTION_UPDATE_TIMEOUT (POLICY_MGR_SER_CMD_TIMEOUT + 2000) #endif #define PM_24_GHZ_CHANNEL_6 (6)