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 4155de7007..720df56509 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 @@ -1133,6 +1133,9 @@ struct wlan_lmac_if_reg_rx_ops { bool dfs_enable); 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); QDF_STATUS (*reg_disable_chan_coex)(struct wlan_objmgr_pdev *pdev, uint8_t unii_5g_bitmap); bool (*reg_ignore_fw_reg_offload_ind)(struct wlan_objmgr_psoc *psoc); 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 26f2f4cbf3..2344ee7881 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 @@ -343,6 +343,9 @@ static void wlan_lmac_if_umac_reg_rx_ops_register( rx_ops->reg_rx_ops.reg_modify_pdev_chan_range = wlan_reg_modify_pdev_chan_range; + rx_ops->reg_rx_ops.reg_update_pdev_wireless_modes = + wlan_reg_update_pdev_wireless_modes; + rx_ops->reg_rx_ops.reg_ignore_fw_reg_offload_ind = tgt_reg_ignore_fw_reg_offload_ind; diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index f38b501ee6..6929ac48b3 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -2758,6 +2758,24 @@ QDF_STATUS reg_modify_pdev_chan_range(struct wlan_objmgr_pdev *pdev) return status; } +QDF_STATUS reg_update_pdev_wireless_modes(struct wlan_objmgr_pdev *pdev, + uint32_t wireless_modes) +{ + struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj; + + pdev_priv_obj = wlan_objmgr_pdev_get_comp_private_obj(pdev, + WLAN_UMAC_COMP_REGULATORY); + + if (!pdev_priv_obj) { + reg_err("reg pdev private obj is NULL"); + return QDF_STATUS_E_FAULT; + } + + pdev_priv_obj->wireless_modes = wireless_modes; + + return QDF_STATUS_SUCCESS; +} + #ifdef DISABLE_UNII_SHARED_BANDS /** * reg_is_reg_unii_band_1_or_reg_unii_band_2a() - Check the input bitmap diff --git a/umac/regulatory/core/src/reg_services_common.h b/umac/regulatory/core/src/reg_services_common.h index 24ed4f5c74..8daf7c1d7c 100644 --- a/umac/regulatory/core/src/reg_services_common.h +++ b/umac/regulatory/core/src/reg_services_common.h @@ -729,6 +729,16 @@ bool reg_is_regdmn_en302502_applicable(struct wlan_objmgr_pdev *pdev); */ QDF_STATUS reg_modify_pdev_chan_range(struct wlan_objmgr_pdev *pdev); +/** + * reg_update_pdev_wireless_modes() - Update the wireless_modes in the + * pdev_priv_obj with the input wireless_modes + * @pdev: pointer to wlan_objmgr_pdev. + * @wireless_modes: Wireless modes. + * + * Return : QDF_STATUS + */ +QDF_STATUS reg_update_pdev_wireless_modes(struct wlan_objmgr_pdev *pdev, + uint32_t wireless_modes); #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 434a8df29c..20a2bb2d4c 100644 --- a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h +++ b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h @@ -929,6 +929,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_update_pdev_wireless_modes() - Update the wireless_modes in the + * pdev_priv_obj with the input wireless_modes + * @pdev: pointer to wlan_objmgr_pdev. + * @wireless_modes: Wireless modes. + * + * Return : QDF_STATUS + */ +QDF_STATUS wlan_reg_update_pdev_wireless_modes(struct wlan_objmgr_pdev *pdev, + uint32_t wireless_modes); /** * wlan_reg_disable_chan_coex() - Disable Coexisting channels based on the input * bitmask diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c index e35002f657..e5f215d2d3 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c @@ -851,6 +851,11 @@ QDF_STATUS wlan_reg_modify_pdev_chan_range(struct wlan_objmgr_pdev *pdev) return reg_modify_pdev_chan_range(pdev); } +QDF_STATUS wlan_reg_update_pdev_wireless_modes(struct wlan_objmgr_pdev *pdev, + uint32_t wireless_modes) +{ + return reg_update_pdev_wireless_modes(pdev, wireless_modes); +} #ifdef DISABLE_UNII_SHARED_BANDS QDF_STATUS wlan_reg_disable_chan_coex(struct wlan_objmgr_pdev *pdev, uint8_t unii_5g_bitmap)