浏览代码

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
Hariharan Basuthkar 5 年之前
父节点
当前提交
6cb56806d3

+ 3 - 1
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

+ 2 - 0
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

+ 2 - 0
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
 /**

+ 2 - 0
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