From 6c158c59d4aaee7d3670ec585c358a10b15155a1 Mon Sep 17 00:00:00 2001 From: abhinav kumar Date: Thu, 30 Dec 2021 14:34:18 +0530 Subject: [PATCH] qcacmn: Get per channel pno scan config service capability Firmware advertises the service capability bit WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL when it supports per channel scan config flags. Get this and cache in psoc. If firmware supports WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL, it uses the upper-12 bits(bit-20 to bit 32) of channel_list for flags and lower 20-bits(bit-0 to bit-19) for frequency. If firmware doesn't support it, then channel_list holds the frequency value only. Fill the flags and frequency accordingly. Change-Id: I30d36a3c164e23cf0395129e5b93d186b81aa8a6 Crs-Fixed: 3103921 --- target_if/init_deinit/src/init_event_handler.c | 7 ++++++- umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h | 5 ++++- wmi/inc/wmi_unified_param.h | 1 + wmi/src/wmi_unified_tlv.c | 2 ++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/target_if/init_deinit/src/init_event_handler.c b/target_if/init_deinit/src/init_event_handler.c index b9f1286e3b..7ee8aeefb0 100644 --- a/target_if/init_deinit/src/init_event_handler.c +++ b/target_if/init_deinit/src/init_event_handler.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -209,6 +209,11 @@ static int init_deinit_service_ready_event_handler(ol_scn_t scn_handle, wlan_psoc_nif_fw_ext_cap_set(psoc, WLAN_SOC_CEXT_SCAN_PER_CH_CONFIG); + if (wmi_service_enabled(wmi_handle, + wmi_service_pno_scan_conf_per_ch_support)) + wlan_psoc_nif_fw_ext_cap_set(psoc, + WLAN_SOC_PNO_SCAN_CONFIG_PER_CHANNEL); + if (wmi_service_enabled(wmi_handle, wmi_service_csa_beacon_template)) wlan_psoc_nif_fw_ext_cap_set(psoc, WLAN_SOC_CEXT_CSA_TX_OFFLOAD); diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h index 4f0151a96e..c99a0aef10 100644 --- a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h +++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. - * + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all @@ -155,6 +155,9 @@ /* check 29th bit for p2p + p2p conc support by fw */ #define WLAN_SOC_EXT_P2P_P2P_CONC_SUPPORT 0x20000000 +/* check 31st bit for per channel pno scan config flags support */ +#define WLAN_SOC_PNO_SCAN_CONFIG_PER_CHANNEL 0x40000000 + /* feature_flags */ /* CONF: ATH FF enabled */ #define WLAN_SOC_F_FF 0x00000001 diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 6d5d97a2af..dc784aa880 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -5492,6 +5492,7 @@ typedef enum { wmi_service_dynamic_update_vdev_macaddr_support, #endif wmi_service_probe_all_bw_support, + wmi_service_pno_scan_conf_per_ch_support, wmi_services_max, } wmi_conv_service_ids; #define WMI_SERVICE_UNAVAILABLE 0xFFFF diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 18c3c09702..094f08aad0 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -18299,6 +18299,8 @@ static void populate_tlv_service(uint32_t *wmi_service) #endif wmi_service[wmi_service_probe_all_bw_support] = WMI_SERVICE_PROBE_ALL_BW_SUPPORT; + wmi_service[wmi_service_pno_scan_conf_per_ch_support] = + WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL; } /**