Search Linux Wireless

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

diff --git a/drivers/net/wireless/celeno/cl8k/wrs/wrs_tables.h b/drivers/net/wireless/celeno/cl8k/wrs/wrs_tables.h
new file mode 100644
index 000000000000..250755533f28
--- /dev/null
+++ b/drivers/net/wireless/celeno/cl8k/wrs/wrs_tables.h
@@ -0,0 +1,76 @@
+/* SPDX-License-Identifier: MIT */
+/* Copyright(c) 2019-2021, Celeno Communications Ltd. */
+
+#ifndef CL_WRS_TABLES_H
+#define CL_WRS_TABLES_H
+
+#include <linux/types.h>
+
+/* Rate Table Size */
+#define WRS_HE_RATE_TABLE_SIZE     (WRS_MCS_MAX_HE * WRS_SS_MAX * CHNL_BW_MAX * WRS_GI_MAX_HE)
+#define WRS_HT_VHT_RATE_TABLE_SIZE (WRS_MCS_MAX_VHT * WRS_SS_MAX * CHNL_BW_MAX * WRS_GI_MAX_VHT)
+
+/* Initial Thresholds */
+#define WRS_INIT_MSEC_WEIGHT_DOWN  (WRS_MAINTENANCE_PERIOD_MS * 3) /* Msec */
+#define WRS_INIT_MSEC_WEIGHT_UP    (WRS_MAINTENANCE_PERIOD_MS * 3) /* Msec */
+
+#define WRS_MSEC_WEIGHT_MIN        (WRS_MAINTENANCE_PERIOD_MS * 2) /* Msec */
+#define WRS_MSEC_WEIGHT_MAX_UP     30000 /* Msec */
+#define WRS_MSEC_WEIGHT_MAX_DOWN   4000  /* Msec */
+#define WRS_MSEC_STEP_DOWN         5000  /* Msec */
+#define WRS_MSEC_STEP_UP_SAME      1000  /* Msec */
+#define WRS_INVALID_RATE           ((u16)(~0))
+
+enum cl_wrs_table_node_up {
+       WRS_TABLE_NODE_UP_MCS,
+       WRS_TABLE_NODE_UP_BW,
+       WRS_TABLE_NODE_UP_NSS,
+       WRS_TABLE_NODE_UP_BF,
+       WRS_TABLE_NODE_UP_GI,
+
+       WRS_TABLE_NODE_UP_MAX
+};
+
+struct cl_wrs_table_validity {
+       bool is_valid;
+       u16 new_rate_idx;
+};
+
+struct cl_wrs_table_node {
+       u16 rate_idx;
+       u16 time_th;
+       bool quick_up_check;
+};
+
+struct cl_wrs_rate {
+       u16 mcs : 4,
+           nss : 3,
+           bw  : 2,
+           gi  : 2,
+           rsv : 2;
+};
+
+struct cl_wrs_table {
+       struct cl_wrs_rate rate;
+       struct cl_wrs_table_node rate_down;
+       struct cl_wrs_table_node rate_up[WRS_TABLE_NODE_UP_MAX];
+       u32 frames_total;
+       u32 ba_not_rcv_total;
+       u64 epr_acc;
+};
+
+struct cl_hw;
+struct cl_wrs_db;
+struct cl_wrs_sta;
+struct cl_wrs_params;
+
+void cl_wrs_tables_global_build(void);
+void cl_wrs_tables_print(struct cl_hw *cl_hw, struct cl_wrs_params *wrs_params);
+void cl_wrs_tables_reset(struct cl_wrs_db *wrs_db, struct cl_wrs_sta *wrs_sta,
+                        struct cl_wrs_params *wrs_params);
+void cl_wrs_tables_build(struct cl_hw *cl_hw, struct cl_wrs_sta *wrs_sta,
+                        struct cl_wrs_params *wrs_params);
+u16 cl_wrs_tables_find_rate_idx(struct cl_wrs_params *wrs_params,
+                               u8 bw, u8 nss, u8 mcs, u8 gi);
+
+#endif /* CL_WRS_TABLES_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