Search Linux Wireless

[RFC v1 063/256] cl8k: add dfs/radar.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Viktor Barna <viktor.barna@xxxxxxxxxx>

(Part of the split. Please, take a look at the cover letter for more
details).

Signed-off-by: Viktor Barna <viktor.barna@xxxxxxxxxx>
---
 drivers/net/wireless/celeno/cl8k/dfs/radar.h | 55 ++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 drivers/net/wireless/celeno/cl8k/dfs/radar.h

diff --git a/drivers/net/wireless/celeno/cl8k/dfs/radar.h b/drivers/net/wireless/celeno/cl8k/dfs/radar.h
new file mode 100644
index 000000000000..bed037cce624
--- /dev/null
+++ b/drivers/net/wireless/celeno/cl8k/dfs/radar.h
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: MIT */
+/* Copyright(c) 2019-2021, Celeno Communications Ltd. */
+
+#ifndef CL_RADAR_H
+#define CL_RADAR_H
+
+  #include <linux/types.h>
+
+/* Number of pulses in a radar event structure */
+#define RADAR_PULSE_MAX 4
+
+/*
+ * Structure used to store information regarding
+ * E2A radar events in the driver
+ */
+struct cl_radar_elem {
+       struct cl_radar_pulse_array *radarbuf_ptr;
+       dma_addr_t dma_addr;
+};
+
+/* Bit mapping inside a radar pulse element */
+struct cl_radar_pulse {
+       u64 freq        : 8;
+       u64 fom         : 8;
+       u64 len         : 8;  /* Pulse length timer */
+       u64 measure_cnt : 2;  /* Measure count */
+       u64 rsv1        : 6;  /* Reserve1 */
+       u64 rep         : 16; /* PRI */
+       u64 rsv2        : 16; /* Reserve2 */
+};
+
+/* Definition of an array of radar pulses */
+struct cl_radar_pulse_array {
+       /* Buffer containing the radar pulses */
+       u64 pulse[RADAR_PULSE_MAX];
+       /* Number of valid pulses in the buffer */
+       u32 cnt;
+};
+
+struct cl_radar_queue_elem {
+       struct list_head list;
+       struct cl_hw *cl_hw;
+       struct cl_radar_elem radar_elem;
+       unsigned long time;
+};
+
+struct cl_hw;
+
+void cl_radar_init(struct cl_hw *cl_hw);
+void cl_radar_push(struct cl_hw *cl_hw, struct cl_radar_elem *radar_elem);
+void cl_radar_tasklet_schedule(struct cl_hw *cl_hw);
+void cl_radar_flush(struct cl_hw *cl_hw);
+void cl_radar_close(struct cl_hw *cl_hw);
+
+#endif /* CL_RADAR_H */
--
2.30.0

________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any retransmission, dissemination, copying or other use of, or taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Nothing contained herein shall be deemed as a representation, warranty or a commitment by Celeno. No warranties are expressed or implied, including, but not limited to, any implied warranties of non-infringement, merchantability and fitness for a particular purpose.
________________________________





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux