diff --git a/target_if/regulatory/src/target_if_reg.c b/target_if/regulatory/src/target_if_reg.c index b36abe553f..43e981b0c0 100644 --- a/target_if/regulatory/src/target_if_reg.c +++ b/target_if/regulatory/src/target_if_reg.c @@ -911,6 +911,7 @@ static void tgt_if_register_afc_callback(struct wlan_lmac_if_reg_tx_ops *reg_ops) { reg_ops->send_afc_ind = tgt_if_regulatory_send_afc_cmd; + reg_ops->reg_get_min_psd = NULL; } #else static void 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 98a3f4171e..9ff8d2bba3 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 @@ -1104,6 +1104,12 @@ struct wlan_lmac_if_reg_tx_ops { QDF_STATUS (*unregister_afc_event_handler) (struct wlan_objmgr_psoc *psoc, void *arg); QDF_STATUS (*trigger_acs_for_afc)(struct wlan_objmgr_pdev *pdev); + + QDF_STATUS (*reg_get_min_psd) (struct wlan_objmgr_pdev *pdev, + qdf_freq_t primary_freq, + qdf_freq_t cen320, + uint16_t punc_pattern, uint16_t bw, + int16_t *min_psd); #endif bool (*is_chip_11be)(struct wlan_objmgr_psoc *psoc, uint16_t phy_id); diff --git a/umac/regulatory/core/src/reg_build_chan_list.c b/umac/regulatory/core/src/reg_build_chan_list.c index fac9b1a7a3..8437a7855b 100644 --- a/umac/regulatory/core/src/reg_build_chan_list.c +++ b/umac/regulatory/core/src/reg_build_chan_list.c @@ -4965,6 +4965,12 @@ static const struct bw_10log10_pair bw_to_10log10_map[] = { {160, 22}, /* 10* 2.20411 = 22.0411 */ #ifdef WLAN_FEATURE_11BE {320, 25}, /* 10* 2.50514 = 25.0514 */ + { 60, 18}, /* 10* 1.77815 = 17.7815 */ + {140, 21}, /* 10* 2.14612 = 21.4612 */ + {120, 21}, /* 10* 2.07918 = 20.7918 */ + {200, 23}, /* 10* 2.30102 = 23.0102 */ + {240, 24}, /* 10* 2.38021 = 23.8021 */ + {280, 24}, /* 10* 2.44715 = 24.4715 */ #endif }; diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index f4740940ad..e5fc49b938 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -9345,8 +9345,29 @@ reg_get_sp_eirp_for_punc_chans(struct wlan_objmgr_pdev *pdev, int16_t min_psd = 0; uint16_t afc_eirp_pwr = 0; uint16_t non_punc_bw; + struct wlan_lmac_if_reg_tx_ops *reg_tx_ops; + struct wlan_objmgr_psoc *psoc; + QDF_STATUS status; + + psoc = wlan_pdev_get_psoc(pdev); + + if (!psoc) + return 0; + + reg_tx_ops = reg_get_psoc_tx_ops(psoc); + + if (!reg_tx_ops->reg_get_min_psd) + return 0; /* min_psd will be calculated here */ + status = reg_tx_ops->reg_get_min_psd(pdev, freq, cen320, + in_punc_pattern, bw, + &min_psd); + if (status != QDF_STATUS_SUCCESS) { + reg_debug("Could not derive min_psd power for width %u, freq; %d, cen320: %d, in_punc: 0x%x\n", + bw, freq, cen320, in_punc_pattern); + return 0; + } non_punc_bw = reg_find_non_punctured_bw(bw, in_punc_pattern);