From b3decce9b509eb369bde8a0d7bce3212664d4862 Mon Sep 17 00:00:00 2001 From: Sai Pavan Akhil Remella Date: Tue, 22 Feb 2022 23:28:28 +0530 Subject: [PATCH] qcacmn: Add API to get min_dwell_time_6g configured ini Added API support to get min_dwell_time_6g configured value from the ini. Change-Id: I214871afdde26bd4d7ca9796e264ed9699f5dd58 CRs-Fixed: 3143107 --- umac/scan/dispatcher/inc/wlan_scan_api.h | 17 +++++++++++++++++ umac/scan/dispatcher/src/wlan_scan_api.c | 12 ++++++++++++ 2 files changed, 29 insertions(+) diff --git a/umac/scan/dispatcher/inc/wlan_scan_api.h b/umac/scan/dispatcher/inc/wlan_scan_api.h index 5b9bbd00291b..4a39af7d2e18 100644 --- a/umac/scan/dispatcher/inc/wlan_scan_api.h +++ b/umac/scan/dispatcher/inc/wlan_scan_api.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2020 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 @@ -89,6 +90,22 @@ QDF_STATUS wlan_scan_cfg_set_passive_6g_dwelltime(struct wlan_objmgr_psoc *psoc, */ QDF_STATUS wlan_scan_cfg_get_passive_6g_dwelltime(struct wlan_objmgr_psoc *psoc, uint32_t *dwell_time); + +/** + * wlan_scan_cfg_get_min_dwelltime_6g() - API to get minimum 6g dwelltime + * @psoc: pointer to psoc object + * @min_dwell_time_6ghz: minimum dwelltime 6g + * + * Return: QDF_STATUS + */ +void wlan_scan_cfg_get_min_dwelltime_6g(struct wlan_objmgr_psoc *psoc, + uint32_t *min_dwell_time_6ghz); +#else +static inline +void wlan_scan_cfg_get_min_dwelltime_6g(struct wlan_objmgr_psoc *psoc, + uint32_t *min_dwell_time_6ghz) +{ +} #endif /** diff --git a/umac/scan/dispatcher/src/wlan_scan_api.c b/umac/scan/dispatcher/src/wlan_scan_api.c index 696679b00aa8..c4b77a972071 100644 --- a/umac/scan/dispatcher/src/wlan_scan_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_api.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2020 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 @@ -147,6 +148,17 @@ QDF_STATUS wlan_scan_cfg_set_passive_6g_dwelltime(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } + +void wlan_scan_cfg_get_min_dwelltime_6g(struct wlan_objmgr_psoc *psoc, + uint32_t *min_dwell_time_6ghz) +{ + struct wlan_scan_obj *scan_obj; + + scan_obj = wlan_psoc_get_scan_obj(psoc); + if (!scan_obj) + return; + *min_dwell_time_6ghz = scan_obj->scan_def.min_dwell_time_6g; +} #endif void wlan_scan_cfg_get_conc_active_dwelltime(struct wlan_objmgr_psoc *psoc,