Explorar el Código

qcacmn: Add AFC device deployment type support

Add AFC device deployment type support in regulatory pdev
private object and add API to return the deployment type

Change-Id: I45e44766b25b21ce3024d73f4ed7a4daf3ecb026
CRs-Fixed: 3190240
Kai Chen hace 3 años
padre
commit
90907bdedd

+ 17 - 0
umac/regulatory/core/src/reg_services_common.c

@@ -7437,6 +7437,23 @@ reg_unregister_afc_power_event_callback(struct wlan_objmgr_pdev *pdev,
 
 	return QDF_STATUS_SUCCESS;
 }
+
+QDF_STATUS
+reg_get_afc_dev_deploy_type(struct wlan_objmgr_pdev *pdev,
+			    enum reg_afc_dev_deploy_type *reg_afc_dev_type)
+{
+	struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
+
+	pdev_priv_obj = reg_get_pdev_obj(pdev);
+	if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
+		reg_err("pdev reg component is NULL");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	*reg_afc_dev_type = pdev_priv_obj->reg_afc_dev_deployment_type;
+
+	return QDF_STATUS_SUCCESS;
+}
 #endif /* CONFIG_AFC_SUPPORT */
 
 QDF_STATUS

+ 12 - 1
umac/regulatory/core/src/reg_services_common.h

@@ -1573,7 +1573,18 @@ reg_unregister_afc_power_event_callback(struct wlan_objmgr_pdev *pdev,
  */
 QDF_STATUS reg_send_afc_power_event(struct wlan_objmgr_pdev *pdev,
 				    struct reg_fw_afc_power_event *power_info);
-#endif
+
+/**
+ * reg_get_afc_dev_deploy_type() - Get AFC device deployment type
+ * @pdev: Pointer to pdev
+ * @reg_afc_dev_type: Pointer to afc device deployment type
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+reg_get_afc_dev_deploy_type(struct wlan_objmgr_pdev *pdev,
+			    enum reg_afc_dev_deploy_type *reg_afc_dev_type);
+#endif /* CONFIG_AFC_SUPPORT */
 
 /**
  * reg_get_cur_6g_client_type() - Get the current 6G regulatory client Type.

+ 11 - 0
umac/regulatory/dispatcher/inc/wlan_reg_services_api.h

@@ -784,6 +784,17 @@ bool wlan_reg_is_afc_expiry_event_received(struct wlan_objmgr_pdev *pdev);
  */
 bool
 wlan_reg_is_noaction_on_afc_pwr_evt(struct wlan_objmgr_pdev *pdev);
+
+/**
+ * wlan_reg_get_afc_dev_deploy_type() - Get AFC device deployment type
+ * @pdev: pdev pointer
+ * @afc_dev_type: Pointer to afc device deployment type
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_reg_get_afc_dev_deploy_type(struct wlan_objmgr_pdev *pdev,
+				 enum reg_afc_dev_deploy_type *afc_dev_type);
 #else
 static inline bool
 wlan_reg_is_afc_power_event_received(struct wlan_objmgr_pdev *pdev)

+ 9 - 1
umac/regulatory/dispatcher/src/wlan_reg_services_api.c

@@ -1747,7 +1747,15 @@ bool wlan_reg_is_noaction_on_afc_pwr_evt(struct wlan_objmgr_pdev *pdev)
 {
 	return reg_is_noaction_on_afc_pwr_evt(pdev);
 }
-#endif
+
+QDF_STATUS
+wlan_reg_get_afc_dev_deploy_type(struct wlan_objmgr_pdev *pdev,
+				 enum reg_afc_dev_deploy_type *afc_dev_type)
+{
+	return reg_get_afc_dev_deploy_type(pdev, afc_dev_type);
+}
+
+#endif /* CONFIG_AFC_SUPPORT */
 
 QDF_STATUS wlan_reg_is_chwidth_supported(struct wlan_objmgr_pdev *pdev,
 					 enum phy_ch_width ch_width,