diff mbox series

[RFC,v1,070/256] cl8k: add edca.h

Message ID 20210617160223.160998-71-viktor.barna@celeno.com (mailing list archive)
State RFC
Delegated to: Kalle Valo
Headers show
Series wireless: cl8k driver for Celeno IEEE 802.11ax devices | expand

Commit Message

Viktor Barna June 17, 2021, 3:59 p.m. UTC
From: Viktor Barna <viktor.barna@celeno.com>

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

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

--
2.30.0
diff mbox series

Patch

diff --git a/drivers/net/wireless/celeno/cl8k/edca.h b/drivers/net/wireless/celeno/cl8k/edca.h
new file mode 100644
index 000000000000..d8edcf12b95c
--- /dev/null
+++ b/drivers/net/wireless/celeno/cl8k/edca.h
@@ -0,0 +1,47 @@ 
+/* SPDX-License-Identifier: MIT */
+/* Copyright(c) 2019-2021, Celeno Communications Ltd. */
+
+#ifndef CL_EDCA_H
+#define CL_EDCA_H
+
+#include "vendor_cmd.h"
+#include "def.h"
+
+enum edca_ac {
+       EDCA_AC_BE,
+       EDCA_AC_BK,
+       EDCA_AC_VI,
+       EDCA_AC_VO,
+
+       EDCA_AC_MAX
+};
+
+#define EDCA_AIFSN      0
+#define EDCA_CW_MIN     1
+#define EDCA_CW_MAX     2
+#define EDCA_TXOP       3
+#define EDCA_MAX_PARAMS 4
+
+struct edca_params {
+       u16 txop;
+       u8 cw_max;
+       u8 cw_min;
+       u8 aifsn;
+};
+
+struct cl_edca_db {
+       struct edca_params hw_params[AC_MAX];
+};
+
+struct cl_hw;
+struct cl_sta;
+struct ieee80211_he_mu_edca_param_ac_rec;
+
+void cl_edca_hw_conf(struct cl_hw *cl_hw);
+void cl_edca_set(struct cl_hw *cl_hw, u8 ac, struct edca_params *params,
+                struct ieee80211_he_mu_edca_param_ac_rec *mu_edca);
+void cl_edca_restore_conf(struct cl_hw *cl_hw, u8 ac);
+void cl_edca_recovery(struct cl_hw *cl_hw);
+int cl_edca_cli(struct cl_hw *cl_hw, struct cli_params *cli_params);
+
+#endif /* CL_EDCA_H */