From 6cb56806d36f4c8d553c7d14c8accd902fc7c308 Mon Sep 17 00:00:00 2001 From: Hariharan Basuthkar Date: Mon, 8 Jun 2020 11:48:21 +0530 Subject: [PATCH] qcacmn: Place wlan_reg_is_6ghz_supported under CONFIG_REG_CLIENT macro Place wlan_reg_is_6ghz_supported under CONFIG_REG_CLIENT macro as it is an MCC specific API. Also, within reg_update_pdev_wireless_modes, return QDF_STATUS_E_INVAL if pdev_priv_obj is NULL. Change-Id: I1ec23b2f44aec037ba99a2fd71812c8287c9f4dc CRs-Fixed: 2704712 --- umac/regulatory/core/src/reg_services_common.c | 4 +++- umac/regulatory/core/src/reg_services_common.h | 2 ++ umac/regulatory/dispatcher/inc/wlan_reg_services_api.h | 2 ++ umac/regulatory/dispatcher/src/wlan_reg_services_api.c | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index 5d6066a699..02031dbabc 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -2928,7 +2928,7 @@ QDF_STATUS reg_update_pdev_wireless_modes(struct wlan_objmgr_pdev *pdev, if (!pdev_priv_obj) { reg_err("reg pdev private obj is NULL"); - return QDF_STATUS_E_FAULT; + return QDF_STATUS_E_INVAL; } pdev_priv_obj->wireless_modes = wireless_modes; @@ -3810,6 +3810,7 @@ bool reg_is_6ghz_op_class(struct wlan_objmgr_pdev *pdev, uint8_t op_class) (op_class <= MAX_6GHZ_OPER_CLASS)); } +#ifdef CONFIG_REG_CLIENT bool reg_is_6ghz_supported(struct wlan_objmgr_psoc *psoc) { struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; @@ -3823,6 +3824,7 @@ bool reg_is_6ghz_supported(struct wlan_objmgr_psoc *psoc) return psoc_priv_obj->six_ghz_supported; } +#endif #ifdef DISABLE_UNII_SHARED_BANDS QDF_STATUS diff --git a/umac/regulatory/core/src/reg_services_common.h b/umac/regulatory/core/src/reg_services_common.h index 86d45c4d3b..1ac3f6410b 100644 --- a/umac/regulatory/core/src/reg_services_common.h +++ b/umac/regulatory/core/src/reg_services_common.h @@ -1090,12 +1090,14 @@ QDF_STATUS reg_set_6ghz_supported(struct wlan_objmgr_psoc *psoc, bool reg_is_6ghz_op_class(struct wlan_objmgr_pdev *pdev, uint8_t op_class); +#ifdef CONFIG_REG_CLIENT /** * reg_is_6ghz_supported() - Whether 6ghz is supported * * @psoc: pointer to psoc */ bool reg_is_6ghz_supported(struct wlan_objmgr_psoc *psoc); +#endif /** * reg_get_unii_5g_bitmap() - get unii_5g_bitmap value diff --git a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h index 1d81e43b40..d15cbfb268 100644 --- a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h +++ b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h @@ -1346,6 +1346,7 @@ uint16_t wlan_reg_get_op_class_width(struct wlan_objmgr_pdev *pdev, bool wlan_reg_is_6ghz_op_class(struct wlan_objmgr_pdev *pdev, uint8_t op_class); +#ifdef CONFIG_REG_CLIENT /** * wlan_reg_is_6ghz_supported() - Whether 6ghz is supported * @psoc: psoc ptr @@ -1353,6 +1354,7 @@ bool wlan_reg_is_6ghz_op_class(struct wlan_objmgr_pdev *pdev, * Return: bool */ bool wlan_reg_is_6ghz_supported(struct wlan_objmgr_psoc *psoc); +#endif #ifdef HOST_OPCLASS_EXT /** diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c index f9a4271dca..0c27f31557 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c @@ -1124,10 +1124,12 @@ bool wlan_reg_is_6ghz_op_class(struct wlan_objmgr_pdev *pdev, return reg_is_6ghz_op_class(pdev, op_class); } +#ifdef CONFIG_REG_CLIENT bool wlan_reg_is_6ghz_supported(struct wlan_objmgr_psoc *psoc) { return reg_is_6ghz_supported(psoc); } +#endif #ifdef HOST_OPCLASS_EXT qdf_freq_t