From a329901cca4b1956da2abe31ea085b0504e3a2f4 Mon Sep 17 00:00:00 2001 From: Lincoln Tran Date: Tue, 3 Mar 2020 11:39:02 -0800 Subject: [PATCH] qcacmn: Add regulatory API to get country code Implement function to allow regulatory code to get country code and source Change-Id: I2713913ba212509e778229b3041363a32ca6049e CRs-fixed: 2634077 --- umac/regulatory/dispatcher/inc/wlan_reg_services_api.h | 10 ++++++++++ umac/regulatory/dispatcher/src/wlan_reg_services_api.c | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h index 086cf1e36016..584bea9bf0f8 100644 --- a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h +++ b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h @@ -637,6 +637,16 @@ wlan_reg_get_opclass_details(struct wlan_objmgr_pdev *pdev, uint8_t max_supp_op_class, bool global_tbl_lookup); +/** + * wlan_reg_get_cc_and_src () - get country code and src + * @psoc: psoc ptr + * @alpha2: country code alpha2 + * + * Return: country_src + */ +enum country_src wlan_reg_get_cc_and_src(struct wlan_objmgr_psoc *psoc, + uint8_t *alpha); + /** * wlan_regulatory_init() - init regulatory component * diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c index 4a9c043f946d..72f73709359c 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c @@ -322,6 +322,12 @@ wlan_reg_get_opclass_details(struct wlan_objmgr_pdev *pdev, global_tbl_lookup); } +enum country_src wlan_reg_get_cc_and_src(struct wlan_objmgr_psoc *psoc, + uint8_t *alpha) +{ + return reg_get_cc_and_src(psoc, alpha); +} + QDF_STATUS wlan_regulatory_init(void) { QDF_STATUS status;