Search Linux Wireless

[RFC v1 193/256] cl8k: add traffic.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/traffic.h | 57 ++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 drivers/net/wireless/celeno/cl8k/traffic.h

diff --git a/drivers/net/wireless/celeno/cl8k/traffic.h b/drivers/net/wireless/celeno/cl8k/traffic.h
new file mode 100644
index 000000000000..810bec60647d
--- /dev/null
+++ b/drivers/net/wireless/celeno/cl8k/traffic.h
@@ -0,0 +1,57 @@
+/* SPDX-License-Identifier: MIT */
+/* Copyright(c) 2019-2021, Celeno Communications Ltd. */
+
+#ifndef CL_TRAFFIC_H
+#define CL_TRAFFIC_H
+
+#include "vendor_cmd.h"
+
+enum cl_traffic_direction {
+       TRAFFIC_DIRECTION_TX,
+       TRAFFIC_DIRECTION_RX,
+
+       TRAFFIC_DIRECTION_MAX
+};
+
+enum cl_traffic_level {
+       TRAFFIC_LEVEL_DRV,
+       TRAFFIC_LEVEL_BF,
+       TRAFFIC_LEVEL_EDCA,
+       TRAFFIC_LEVEL_DFS,
+
+       TRAFFIC_LEVEL_MAX
+};
+
+struct cl_traffic_activity {
+       u8 cntr_active;
+       u8 cntr_idle;
+       bool is_active;
+};
+
+struct cl_traffic_sta {
+       struct cl_traffic_activity activity_db[TRAFFIC_LEVEL_MAX];
+       u32 num_bytes;
+};
+
+struct cl_traffic_main {
+       u32 num_active_sta[TRAFFIC_LEVEL_MAX];
+       u32 num_active_sta_dir[TRAFFIC_DIRECTION_MAX][TRAFFIC_LEVEL_MAX];
+       u32 active_bytes_thr[TRAFFIC_LEVEL_MAX];
+       bool dynamic_cts;
+};
+
+struct cl_hw;
+struct cl_sta;
+
+void cl_traffic_init(struct cl_hw *cl_hw);
+void cl_traffic_tx_handler(struct cl_hw *cl_hw, struct cl_sta *cl_sta, u32 num_bytes);
+void cl_traffic_rx_handler(struct cl_hw *cl_hw, struct cl_sta *cl_sta, u32 num_bytes);
+void cl_traffic_maintenance(struct cl_hw *cl_hw);
+void cl_traffic_sta_remove(struct cl_hw *cl_hw, struct cl_sta *cl_sta);
+bool cl_traffic_is_sta_active(struct cl_hw *cl_hw, struct cl_sta *cl_sta);
+bool cl_traffic_is_sta_active_tx(struct cl_hw *cl_hw, struct cl_sta *cl_sta);
+u32 cl_traffic_num_active_sta(struct cl_hw *cl_hw);
+u32 cl_traffic_num_active_dfs(struct cl_hw *cl_hw);
+int cl_traffic_cli(struct cl_hw *cl_hw, struct cli_params *cli_params);
+
+#endif /* CL_TRAFFIC_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