diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index b0523058bd3a..fa88abec7785 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -2788,6 +2788,23 @@ bool reg_is_regdmn_en302502_applicable(struct wlan_objmgr_pdev *pdev) return reg_en302_502_regdmn(cur_reg_dmn.regdmn_pair_id); } +QDF_STATUS reg_get_phybitmap(struct wlan_objmgr_pdev *pdev, + uint16_t *phybitmap) +{ + struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj; + + pdev_priv_obj = reg_get_pdev_obj(pdev); + + if (!pdev_priv_obj) { + reg_err("reg pdev private obj is NULL"); + return QDF_STATUS_E_FAULT; + } + + *phybitmap = pdev_priv_obj->phybitmap; + + return QDF_STATUS_SUCCESS; +} + QDF_STATUS reg_modify_pdev_chan_range(struct wlan_objmgr_pdev *pdev) { struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj; diff --git a/umac/regulatory/core/src/reg_services_common.h b/umac/regulatory/core/src/reg_services_common.h index cac5cb7ea96a..7741c3050c78 100644 --- a/umac/regulatory/core/src/reg_services_common.h +++ b/umac/regulatory/core/src/reg_services_common.h @@ -802,6 +802,16 @@ QDF_STATUS reg_modify_pdev_chan_range(struct wlan_objmgr_pdev *pdev); */ QDF_STATUS reg_update_pdev_wireless_modes(struct wlan_objmgr_pdev *pdev, uint32_t wireless_modes); + +/** + * reg_get_phybitmap() - Get phybitmap from regulatory pdev_priv_obj + * @pdev: pdev pointer + * @phybitmap: pointer to phybitmap + * + * Return: QDF STATUS + */ +QDF_STATUS reg_get_phybitmap(struct wlan_objmgr_pdev *pdev, + uint16_t *phybitmap); #ifdef DISABLE_UNII_SHARED_BANDS /** * reg_disable_chan_coex() - Disable Coexisting channels based on the input diff --git a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h index aecba4b1327e..5c76b8494cd0 100644 --- a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h +++ b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h @@ -977,6 +977,16 @@ bool wlan_reg_is_regdmn_en302502_applicable(struct wlan_objmgr_pdev *pdev); */ QDF_STATUS wlan_reg_modify_pdev_chan_range(struct wlan_objmgr_pdev *pdev); +/** + * wlan_reg_get_phybitmap() - Get phybitmap from regulatory pdev_priv_obj + * @pdev: pdev pointer + * @phybitmap: pointer to phybitmap + * + * Return: QDF STATUS + */ +QDF_STATUS wlan_reg_get_phybitmap(struct wlan_objmgr_pdev *pdev, + uint16_t *phybitmap); + /** * wlan_reg_update_pdev_wireless_modes() - Update the wireless_modes in the * pdev_priv_obj with the input wireless_modes diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c index 0d462245377a..f12d52ef01d5 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c @@ -657,6 +657,12 @@ QDF_STATUS wlan_reg_get_chip_mode(struct wlan_objmgr_pdev *pdev, return QDF_STATUS_SUCCESS; } +QDF_STATUS wlan_reg_get_phybitmap(struct wlan_objmgr_pdev *pdev, + uint16_t *phybitmap) +{ + return reg_get_phybitmap(pdev, phybitmap); +} + bool wlan_reg_is_11d_scan_inprogress(struct wlan_objmgr_psoc *psoc) { return reg_is_11d_scan_inprogress(psoc);