Explorar o código

qcacmn: Implement a dispatcher API to retrieve precac chan state

Implement a frequency API based dispatcher function to retrieve
the precac channel state of a given channel frequency.

Change-Id: Iefd70c8b6e60a42f8dc95db5f8a2e8c66ae013ea
CRs-Fixed: 2526372
Priyadarshnee S %!s(int64=5) %!d(string=hai) anos
pai
achega
54e3ffe37f
Modificáronse 1 ficheiros con 16 adicións e 2 borrados
  1. 16 2
      umac/dfs/dispatcher/src/wlan_dfs_ucfg_api.c

+ 16 - 2
umac/dfs/dispatcher/src/wlan_dfs_ucfg_api.c

@@ -278,8 +278,22 @@ enum precac_chan_state
 ucfg_dfs_get_precac_chan_state_for_freq(struct wlan_objmgr_pdev *pdev,
 					uint16_t precac_chan_freq)
 {
-	/* To be implemented when component dev changes are ready */
-	return PRECAC_ERR;
+	struct wlan_dfs *dfs;
+	enum precac_chan_state retval = PRECAC_ERR;
+
+	dfs = wlan_pdev_get_dfs_obj(pdev);
+	if (!dfs) {
+		dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,  "null dfs");
+		return PRECAC_ERR;
+	}
+
+	retval = dfs_get_precac_chan_state_for_freq(dfs, precac_chan_freq);
+	if (retval == PRECAC_ERR) {
+		dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,
+			"Could not find precac channel state");
+	}
+
+	return retval;
 }
 #endif
 #endif