diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index a9245e0069..aa243cf59d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -5159,18 +5159,18 @@ static uint8_t hdd_get_safe_channel_from_pcl_and_acs_range( hdd_context_t *hdd_ctx; bool found = false; - hal_handle = WLAN_HDD_GET_HAL_CTX(adapter); - if (!hal_handle) { - hdd_err("invalid HAL handle"); - return INVALID_CHANNEL_ID; - } - hdd_ctx = WLAN_HDD_GET_CTX(adapter); if (!hdd_ctx) { hdd_err("invalid HDD context"); return INVALID_CHANNEL_ID; } + hal_handle = WLAN_HDD_GET_HAL_CTX(adapter); + if (!hal_handle) { + hdd_err("invalid HAL handle"); + return INVALID_CHANNEL_ID; + } + status = cds_get_pcl_for_existing_conn(CDS_SAP_MODE, pcl.pcl_list, &pcl.pcl_len, pcl.weight_list, QDF_ARRAY_SIZE(pcl.weight_list));