diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index a6f6bb005f..a62d5d7451 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -5863,6 +5863,17 @@ bool reg_is_disable_in_secondary_list_for_freq(struct wlan_objmgr_pdev *pdev, return ch_state == CHANNEL_STATE_DISABLE; } + +bool reg_is_enable_in_secondary_list_for_freq(struct wlan_objmgr_pdev *pdev, + qdf_freq_t freq) +{ + enum channel_state ch_state; + + ch_state = reg_get_channel_state_from_secondary_list_for_freq(pdev, + freq); + + return ch_state == CHANNEL_STATE_ENABLE; +} #endif bool reg_is_passive_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq) diff --git a/umac/regulatory/core/src/reg_services_common.h b/umac/regulatory/core/src/reg_services_common.h index b3bacf3952..6c626e2dd7 100644 --- a/umac/regulatory/core/src/reg_services_common.h +++ b/umac/regulatory/core/src/reg_services_common.h @@ -1249,6 +1249,17 @@ bool reg_is_disable_for_pwrmode(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq, */ bool reg_is_disable_in_secondary_list_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq); + +/** + * reg_is_enable_in_secondary_list_for_freq() - Check if the given channel + * frequency is in enable state + * @pdev: Pointer to pdev + * @freq: Channel frequency + * + * Return: True if channel state is enabled, else false + */ +bool reg_is_enable_in_secondary_list_for_freq(struct wlan_objmgr_pdev *pdev, + qdf_freq_t freq); #endif /** diff --git a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h index cb6ec951b2..d92d3fb9c0 100644 --- a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h +++ b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h @@ -1594,6 +1594,18 @@ bool wlan_reg_is_disable_in_secondary_list_for_freq( struct wlan_objmgr_pdev *pdev, qdf_freq_t freq); +/** + * wlan_reg_is_enable_in_secondary_list_for_freq() - Checks in the secondary + * channel list to see if chan state is enabled + * @pdev: pdev ptr + * @freq: Channel center frequency + * + * Return: true or false + */ +bool wlan_reg_is_enable_in_secondary_list_for_freq( + struct wlan_objmgr_pdev *pdev, + qdf_freq_t freq); + /** * wlan_reg_is_dfs_in_secondary_list_for_freq() - hecks the channel state for * DFS from the secondary channel list diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c index 56119ac3e4..1cc7e9bb1d 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c @@ -1078,6 +1078,13 @@ bool wlan_reg_is_disable_in_secondary_list_for_freq( return reg_is_disable_in_secondary_list_for_freq(pdev, freq); } +bool wlan_reg_is_enable_in_secondary_list_for_freq( + struct wlan_objmgr_pdev *pdev, + qdf_freq_t freq) +{ + return reg_is_enable_in_secondary_list_for_freq(pdev, freq); +} + bool wlan_reg_is_dfs_in_secondary_list_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq) {