Explorar o código

Merge "qcacmn: Add API to get current dfs domain"

Linux Build Service Account %!s(int64=7) %!d(string=hai) anos
pai
achega
8b5f5bdeac

+ 17 - 0
umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h

@@ -83,6 +83,23 @@ wlan_lmac_if_get_dfs_rx_ops(struct wlan_objmgr_psoc *psoc)
     return &psoc->soc_cb.rx_ops.dfs_rx_ops;
 }
 
+/**
+ * wlan_lmac_if_get_reg_rx_ops() - retrieve the reg rx_ops
+ * @psoc: psoc context
+ *
+ * API to retrieve the reg rx_ops from the psoc context
+ *
+ * Return: reg_rx_ops pointer
+ */
+static inline struct wlan_lmac_if_reg_rx_ops *
+wlan_lmac_if_get_reg_rx_ops(struct wlan_objmgr_psoc *psoc)
+{
+	if (!psoc)
+		return NULL;
+
+	return &psoc->soc_cb.rx_ops.reg_rx_ops;
+}
+
 /**
  * mgmt_txrx_get_nbuf() - retrieve nbuf from mgmt desc_id
  * @psoc: psoc context

+ 2 - 0
umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h

@@ -595,6 +595,8 @@ struct wlan_lmac_if_reg_rx_ops {
 			bool val);
 	QDF_STATUS (*reg_set_11d_offloaded)(struct wlan_objmgr_psoc *psoc,
 			bool val);
+	QDF_STATUS (*get_dfs_region)(struct wlan_objmgr_pdev *pdev,
+			enum dfs_reg *dfs_reg);
 };
 
 #ifdef CONVERGED_P2P_ENABLE

+ 3 - 0
umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c

@@ -205,6 +205,9 @@ static void wlan_lmac_if_umac_reg_rx_ops_register(
 
 	rx_ops->reg_rx_ops.reg_set_11d_offloaded =
 		tgt_reg_set_11d_offloaded;
+
+	rx_ops->reg_rx_ops.get_dfs_region =
+		wlan_reg_get_dfs_region;
 }
 
 #ifdef CONVERGED_P2P_ENABLE

+ 2 - 2
umac/regulatory/dispatcher/inc/wlan_reg_services_api.h

@@ -127,9 +127,9 @@ void wlan_reg_set_channel_params(struct wlan_objmgr_pdev *pdev, uint8_t ch,
  * wlan_reg_get_dfs_region () - Get the current dfs region
  * @dfs_reg: pointer to dfs region
  *
- * Return: None
+ * Return: Status
  */
-void wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev,
+QDF_STATUS wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev,
 			     enum dfs_reg *dfs_reg);
 
 /**

+ 4 - 2
umac/regulatory/dispatcher/src/wlan_reg_services_api.c

@@ -131,15 +131,17 @@ void wlan_reg_set_channel_params(struct wlan_objmgr_pdev *pdev, uint8_t ch,
  * wlan_reg_get_dfs_region () - Get the current dfs region
  * @dfs_reg: pointer to dfs region
  *
- * Return: None
+ * Return: Status
  */
-void wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev,
+QDF_STATUS wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev,
 			     enum dfs_reg *dfs_reg)
 {
 	/*
 	 * Get the current dfs region
 	 */
 	reg_get_dfs_region(pdev, dfs_reg);
+
+	return QDF_STATUS_SUCCESS;
 }
 
 uint32_t wlan_reg_get_channel_reg_power(struct wlan_objmgr_pdev *pdev,