Search Linux Wireless

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

diff --git a/drivers/net/wireless/celeno/cl8k/twt.h b/drivers/net/wireless/celeno/cl8k/twt.h
new file mode 100644
index 000000000000..fa01c69abf4f
--- /dev/null
+++ b/drivers/net/wireless/celeno/cl8k/twt.h
@@ -0,0 +1,58 @@
+/* SPDX-License-Identifier: MIT */
+/* Copyright(c) 2019-2021, Celeno Communications Ltd. */
+
+#ifndef CL_TWT_H
+#define CL_TWT_H
+
+#include "hw.h"
+#include <linux/ieee80211.h>
+
+/**
+ * TWT (=Target Wake Time, 802.11ax)
+ */
+
+#define CL_TWT_DEFAULT_INTERVAL_US 524288 /* 512 TU */
+#define CL_TWT_DEFAULT_MIN_WAKE_DURATION_US 64000 /* 62.5 TU */
+#define CL_TWT_FLOW_ID_ALL 0xFF
+#define CL_TWT_FLOW_ID_MAX 0x7
+
+bool cl_twt_is_enabled(struct cl_hw *cl_hw);
+void cl_twt_init(struct cl_hw *cl_hw);
+void cl_twt_close(struct cl_hw *cl_hw);
+struct cl_twt_session_db *
+cl_twt_get_session(struct cl_hw *cl_hw, struct cl_sta *cl_sta, u8 flow_id);
+int cl_twt_update_session(struct cl_hw *cl_hw,
+                         struct cl_sta *cl_sta,
+                         struct ieee80211_twt_individual_elem *twt_elem,
+                         struct  cl_twt_session_db *session);
+int cl_twt_add_session(struct cl_hw *cl_hw,
+                      struct cl_sta *cl_sta,
+                      struct ieee80211_twt_individual_elem *twt_elem,
+                      struct  cl_twt_session_db **session_ptr);
+void cl_twt_remove_session(struct cl_hw *cl_hw,
+                          struct cl_twt_session_db *session,
+                          bool send_teardown_req);
+int cl_twt_teardown_individual_sesseion(struct cl_hw *cl_hw,
+                                       struct cl_sta *cl_sta,
+                                       u8 flow_id,
+                                       bool send_teardown_req);
+void cl_twt_sta_remove(struct cl_hw *cl_hw,
+                      struct cl_sta *cl_sta);
+u64 cl_twt_get_wake_interval_us(struct ieee80211_twt_individual_elem *elem);
+u32 cl_twt_get_min_wake_time_us(struct ieee80211_twt_individual_elem *elem);
+void cl_twt_set_target_wake_time(struct cl_hw *cl_hw,
+                                struct ieee80211_twt_individual_elem *elem);
+void cl_twt_set_min_wake_duration(struct cl_hw *cl_hw,
+                                 struct ieee80211_twt_individual_elem *elem,
+                                 u32 duration_us);
+void cl_twt_set_interval(struct cl_hw *cl_hw,
+                        struct ieee80211_twt_individual_elem *elem,
+                        u64 interval_us);
+int cl_twt_handle_individual_setup_request(struct cl_hw *cl_hw,
+                                          struct cl_sta *cl_sta,
+                                          struct cl_ieee80211_mgmt *request);
+int cl_twt_handle_individual_teardown_request(struct cl_hw *cl_hw,
+                                             struct cl_sta *cl_sta,
+                                             struct cl_ieee80211_mgmt *request);
+
+#endif /* CL_TWT_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