diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h index 2e3c2360250d..3cc252f00406 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h +++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h @@ -83,6 +83,23 @@ wlan_lmac_if_get_dfs_rx_ops(struct wlan_objmgr_psoc *psoc) return &psoc->soc_cb.rx_ops.dfs_rx_ops; } +/** + * wlan_lmac_if_get_reg_rx_ops() - retrieve the reg rx_ops + * @psoc: psoc context + * + * API to retrieve the reg rx_ops from the psoc context + * + * Return: reg_rx_ops pointer + */ +static inline struct wlan_lmac_if_reg_rx_ops * +wlan_lmac_if_get_reg_rx_ops(struct wlan_objmgr_psoc *psoc) +{ + if (!psoc) + return NULL; + + return &psoc->soc_cb.rx_ops.reg_rx_ops; +} + /** * mgmt_txrx_get_nbuf() - retrieve nbuf from mgmt desc_id * @psoc: psoc context diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h index 495c0138e388..e6c3d0e72dd6 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h +++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h @@ -595,6 +595,8 @@ struct wlan_lmac_if_reg_rx_ops { bool val); QDF_STATUS (*reg_set_11d_offloaded)(struct wlan_objmgr_psoc *psoc, bool val); + QDF_STATUS (*get_dfs_region)(struct wlan_objmgr_pdev *pdev, + enum dfs_reg *dfs_reg); }; #ifdef CONVERGED_P2P_ENABLE diff --git a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c b/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c index 554743b6a06a..96d8b3247272 100644 --- a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c +++ b/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c @@ -205,6 +205,9 @@ static void wlan_lmac_if_umac_reg_rx_ops_register( rx_ops->reg_rx_ops.reg_set_11d_offloaded = tgt_reg_set_11d_offloaded; + + rx_ops->reg_rx_ops.get_dfs_region = + wlan_reg_get_dfs_region; } #ifdef CONVERGED_P2P_ENABLE diff --git a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h index c7ce864f300c..ba6e843b71ca 100644 --- a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h +++ b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h @@ -127,9 +127,9 @@ void wlan_reg_set_channel_params(struct wlan_objmgr_pdev *pdev, uint8_t ch, * wlan_reg_get_dfs_region () - Get the current dfs region * @dfs_reg: pointer to dfs region * - * Return: None + * Return: Status */ -void wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev, +QDF_STATUS wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev, enum dfs_reg *dfs_reg); /** diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c index 01f442513a18..6a6351f8fd6c 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c @@ -131,15 +131,17 @@ void wlan_reg_set_channel_params(struct wlan_objmgr_pdev *pdev, uint8_t ch, * wlan_reg_get_dfs_region () - Get the current dfs region * @dfs_reg: pointer to dfs region * - * Return: None + * Return: Status */ -void wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev, +QDF_STATUS wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev, enum dfs_reg *dfs_reg) { /* * Get the current dfs region */ reg_get_dfs_region(pdev, dfs_reg); + + return QDF_STATUS_SUCCESS; } uint32_t wlan_reg_get_channel_reg_power(struct wlan_objmgr_pdev *pdev,