From 6118d488ddaa1bc7c465ee02a6222bd669f75b6b Mon Sep 17 00:00:00 2001 From: Lincoln Tran Date: Tue, 23 Feb 2021 17:32:58 -0800 Subject: [PATCH] qcacmn: Expose freq validation API Create a wrapper for the reg_is_freq_present_in_cur_chan_list API so other modules can invoke it. Change-Id: I0e21b15f1e08bb4301329b6b1a3c3c40edc09060 CRs-fixed: 2884768 --- .../regulatory/dispatcher/inc/wlan_reg_services_api.h | 11 +++++++++++ .../regulatory/dispatcher/src/wlan_reg_services_api.c | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h index 7b7881a508..50d03b0e49 100644 --- a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h +++ b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h @@ -1169,6 +1169,17 @@ bool wlan_reg_is_same_band_freqs(qdf_freq_t freq1, qdf_freq_t freq2); */ enum channel_enum wlan_reg_get_chan_enum_for_freq(qdf_freq_t freq); +/** + * wlan_reg_is_freq_present_in_cur_chan_list() - Check if channel is present + * in the current channel list + * @pdev: pdev pointer + * @freq: Channel center frequency + * + * Return: true if channel is present in current channel list + */ +bool wlan_reg_is_freq_present_in_cur_chan_list(struct wlan_objmgr_pdev *pdev, + qdf_freq_t freq); + /** * wlan_reg_update_nol_history_ch_for_freq() - Set nol-history flag for the * channels in the list. diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c index 10a96c076d..0fd419109e 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c @@ -993,6 +993,12 @@ enum channel_enum wlan_reg_get_chan_enum_for_freq(qdf_freq_t freq) return reg_get_chan_enum_for_freq(freq); } +bool wlan_reg_is_freq_present_in_cur_chan_list(struct wlan_objmgr_pdev *pdev, + qdf_freq_t freq) +{ + return reg_is_freq_present_in_cur_chan_list(pdev, freq); +} + bool wlan_reg_is_etsi13_srd_chan_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq) {