From 8dcedb26a23351586fee82e19b54acdcb2621549 Mon Sep 17 00:00:00 2001 From: Gururaj Pandurangi Date: Tue, 30 Mar 2021 18:18:18 -0700 Subject: [PATCH] qcacmn: Add dispatcher to reg_get_cur_6g_ap_pwr_type Add dispatcher API wlan_reg_get_cur_6g_ap_pwr_type to call reg_get_cur_6g_ap_pwr_type from legacy TPC power calculation API to obtain AP power type for SAP. Change-Id: I7b135561af6f1cfaa14bbb724eb984e972a4a19a CRs-Fixed: 2912227 --- .../dispatcher/inc/wlan_reg_services_api.h | 21 +++++++++++++++++++ .../dispatcher/src/wlan_reg_services_api.c | 7 +++++++ 2 files changed, 28 insertions(+) diff --git a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h index b64e622bdaba..399e7d4c3bc2 100644 --- a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h +++ b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h @@ -1605,6 +1605,19 @@ enum band_info wlan_reg_band_bitmap_to_band_info(uint32_t band_bitmap); #endif #if defined(CONFIG_BAND_6GHZ) +/** + * wlan_reg_get_cur_6g_ap_pwr_type() - Get the current 6G regulatory AP power + * type. + * @pdev: Pointer to PDEV object. + * @reg_cur_6g_ap_pwr_type: The current regulatory 6G AP power type ie. + * LPI/SP/VLP. + * + * Return: QDF_STATUS. + */ +QDF_STATUS +wlan_reg_get_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev, + enum reg_6g_ap_type *reg_cur_6g_ap_pwr_type); + /** * wlan_reg_get_cur_6g_client_type() - Get the current 6G regulatory client * type. @@ -1730,6 +1743,14 @@ wlan_reg_get_client_power_for_6ghz_ap(struct wlan_objmgr_pdev *pdev, enum reg_6g_ap_type wlan_reg_decide_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev); #else +static inline QDF_STATUS +wlan_reg_get_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev, + enum reg_6g_ap_type *reg_cur_6g_ap_pwr_type) +{ + *reg_cur_6g_ap_pwr_type = REG_VERY_LOW_POWER_AP; + return QDF_STATUS_E_NOSUPPORT; +} + static inline QDF_STATUS wlan_reg_get_cur_6g_client_type(struct wlan_objmgr_pdev *pdev, enum reg_6g_client_type diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c index 5806c3e1b59c..2b62430d9c77 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c @@ -1315,6 +1315,13 @@ QDF_STATUS wlan_reg_get_unspecified_ap_usable(struct wlan_objmgr_pdev *pdev, return reg_get_unspecified_ap_usable(pdev, reg_unspecified_ap_usable); } +QDF_STATUS +wlan_reg_get_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev, + enum reg_6g_ap_type *reg_cur_6g_ap_pwr_type) +{ + return reg_get_cur_6g_ap_pwr_type(pdev, reg_cur_6g_ap_pwr_type); +} + QDF_STATUS wlan_reg_get_cur_6g_client_type(struct wlan_objmgr_pdev *pdev, enum reg_6g_client_type