Merge "qcacmn: Add API to get current dfs domain"
diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h
index 2e3c236..3cc252f 100644
--- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h
+++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h
@@ -84,6 +84,23 @@
}
/**
+ * 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
* @desc_id: mgmt desc_id
diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h
index 495c013..e6c3d0e 100644
--- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h
+++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h
@@ -595,6 +595,8 @@
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
diff --git a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c b/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c
index 554743b..96d8b32 100644
--- a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c
+++ b/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c
@@ -205,6 +205,9 @@
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
diff --git a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h
index c7ce864..ba6e843 100644
--- a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h
+++ b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h
@@ -127,9 +127,9 @@
* 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);
/**
diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c
index 01f4425..6a6351f 100644
--- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c
+++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c
@@ -131,15 +131,17 @@
* 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,