xref: /freebsd/sys/compat/linuxkpi/common/src/linux_80211.h (revision 59d262fe969af5a8a83f0ccd7586c9bd2c8fb1f3)
1 /*-
2  * Copyright (c) 2020-2023 The FreeBSD Foundation
3  * Copyright (c) 2020-2021 Bjoern A. Zeeb
4  *
5  * This software was developed by Björn Zeeb under sponsorship from
6  * the FreeBSD Foundation.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  */
29 
30 /*
31  * Public functions are called linuxkpi_*().
32  * Internal (static) functions are called lkpi_*().
33  *
34  * The internal structures holding metadata over public structures are also
35  * called lkpi_xxx (usually with a member at the end called xxx).
36  * Note: we do not replicate the structure names but the general variable names
37  * for these (e.g., struct hw -> struct lkpi_hw, struct sta -> struct lkpi_sta).
38  * There are macros to access one from the other.
39  * We call the internal versions lxxx (e.g., hw -> lhw, sta -> lsta).
40  */
41 
42 #ifndef _LKPI_SRC_LINUX_80211_H
43 #define _LKPI_SRC_LINUX_80211_H
44 
45 #include "opt_wlan.h"
46 
47 #if defined(IEEE80211_DEBUG) && !defined(LINUXKPI_DEBUG_80211)
48 #define	LINUXKPI_DEBUG_80211
49 #endif
50 
51 /* #define	LINUXKPI_DEBUG_80211 */
52 
53 #ifndef	D80211_TODO
54 #define	D80211_TODO		0x00000001
55 #endif
56 #ifndef D80211_IMPROVE
57 #define	D80211_IMPROVE		0x00000002
58 #endif
59 #define	D80211_IMPROVE_TXQ	0x00000004
60 #define	D80211_TRACE		0x00000010
61 #define	D80211_TRACEOK		0x00000020
62 #define	D80211_TRACE_TX		0x00000100
63 #define	D80211_TRACE_TX_DUMP	0x00000200
64 #define	D80211_TRACE_RX		0x00001000
65 #define	D80211_TRACE_RX_DUMP	0x00002000
66 #define	D80211_TRACE_RX_BEACONS	0x00004000
67 #define	D80211_TRACEX		(D80211_TRACE_TX|D80211_TRACE_RX)
68 #define	D80211_TRACEX_DUMP	(D80211_TRACE_TX_DUMP|D80211_TRACE_RX_DUMP)
69 #define	D80211_TRACE_STA	0x00010000
70 #define	D80211_TRACE_MO		0x00100000
71 #define	D80211_TRACE_MODE	0x0f000000
72 #define	D80211_TRACE_MODE_HT	0x01000000
73 #define	D80211_TRACE_MODE_VHT	0x02000000
74 #define	D80211_TRACE_MODE_HE	0x04000000
75 #define	D80211_TRACE_MODE_EHT	0x08000000
76 
77 #define	IMPROVE_TXQ(...)						\
78     if (linuxkpi_debug_80211 & D80211_IMPROVE_TXQ)			\
79 	printf("%s:%d: XXX LKPI80211 IMPROVE_TXQ\n", __func__, __LINE__)
80 
81 #define	IMPROVE_HT(...)							\
82     if (linuxkpi_debug_80211 & D80211_TRACE_MODE_HT)			\
83 	printf("%s:%d: XXX LKPI80211 IMPROVE_HT\n", __func__, __LINE__)
84 
85 #define	MTAG_ABI_LKPI80211	1707696513	/* LinuxKPI 802.11 KBI */
86 
87 /*
88  * Deferred RX path.
89  * We need to pass *ni along (and possibly more in the future so
90  * we use a struct right from the start.
91  */
92 #define	LKPI80211_TAG_RXNI	0		/* deferred RX path */
93 struct lkpi_80211_tag_rxni {
94 	struct ieee80211_node	*ni;		/* MUST hold a reference to it. */
95 };
96 
97 struct lkpi_radiotap_tx_hdr {
98 	struct ieee80211_radiotap_header wt_ihdr;
99 	uint8_t		wt_flags;
100 	uint8_t		wt_rate;
101 	uint16_t	wt_chan_freq;
102 	uint16_t	wt_chan_flags;
103 } __packed;
104 #define	LKPI_RTAP_TX_FLAGS_PRESENT					\
105 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\
106 	 (1 << IEEE80211_RADIOTAP_RATE) |				\
107 	 (1 << IEEE80211_RADIOTAP_CHANNEL))
108 
109 struct lkpi_radiotap_rx_hdr {
110 	struct ieee80211_radiotap_header wr_ihdr;
111 	uint64_t	wr_tsft;
112 	uint8_t		wr_flags;
113 	uint8_t		wr_rate;
114 	uint16_t	wr_chan_freq;
115 	uint16_t	wr_chan_flags;
116 	int8_t		wr_dbm_antsignal;
117 	int8_t		wr_dbm_antnoise;
118 } __packed __aligned(8);
119 #define	LKPI_RTAP_RX_FLAGS_PRESENT					\
120 	((1 << IEEE80211_RADIOTAP_TSFT) |				\
121 	 (1 << IEEE80211_RADIOTAP_FLAGS) |				\
122 	 (1 << IEEE80211_RADIOTAP_RATE) |				\
123 	 (1 << IEEE80211_RADIOTAP_CHANNEL) |				\
124 	 (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) |			\
125 	 (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE))
126 
127 struct lkpi_txq {
128 	TAILQ_ENTRY(lkpi_txq)	txq_entry;
129 
130 	struct mtx		ltxq_mtx;
131 	bool			seen_dequeue;
132 	bool			stopped;
133 	uint32_t		txq_generation;
134 	struct sk_buff_head	skbq;
135 
136 	/* Must be last! */
137 	struct ieee80211_txq	txq __aligned(CACHE_LINE_SIZE);
138 };
139 #define	TXQ_TO_LTXQ(_txq)	container_of(_txq, struct lkpi_txq, txq)
140 
141 
142 struct lkpi_sta {
143         TAILQ_ENTRY(lkpi_sta)	lsta_entry;
144 	struct ieee80211_node	*ni;
145 
146 	/* Deferred TX path. */
147 	/* Eventually we might want to migrate this into net80211 entirely. */
148 	/* XXX-BZ can we use sta->txq[] instead directly? */
149 	struct task		txq_task;
150 	struct mbufq		txq;
151 	struct mtx		txq_mtx;
152 
153 	struct ieee80211_key_conf *kc;
154 	enum ieee80211_sta_state state;
155 	bool			txq_ready;			/* Can we run the taskq? */
156 	bool			added_to_drv;			/* Driver knows; i.e. we called ...(). */
157 	bool			in_mgd;				/* XXX-BZ should this be per-vif? */
158 
159 	/* Must be last! */
160 	struct ieee80211_sta	sta __aligned(CACHE_LINE_SIZE);
161 };
162 #define	STA_TO_LSTA(_sta)	container_of(_sta, struct lkpi_sta, sta)
163 #define	LSTA_TO_STA(_lsta)	(&(_lsta)->sta)
164 
165 struct lkpi_vif {
166         TAILQ_ENTRY(lkpi_vif)	lvif_entry;
167 	struct ieee80211vap	iv_vap;
168 
169 	struct mtx		mtx;
170 	struct wireless_dev	wdev;
171 
172 	/* Other local stuff. */
173 	int			(*iv_newstate)(struct ieee80211vap *,
174 				    enum ieee80211_state, int);
175 	struct ieee80211_node *	(*iv_update_bss)(struct ieee80211vap *,
176 				    struct ieee80211_node *);
177 	TAILQ_HEAD(, lkpi_sta)	lsta_head;
178 	struct lkpi_sta		*lvif_bss;
179 	bool			lvif_bss_synched;
180 	bool			added_to_drv;			/* Driver knows; i.e. we called add_interface(). */
181 
182 	bool			hw_queue_stopped[IEEE80211_NUM_ACS];
183 
184 	/* Must be last! */
185 	struct ieee80211_vif	vif __aligned(CACHE_LINE_SIZE);
186 };
187 #define	VAP_TO_LVIF(_vap)	container_of(_vap, struct lkpi_vif, iv_vap)
188 #define	LVIF_TO_VAP(_lvif)	(&(_lvif)->iv_vap)
189 #define	VIF_TO_LVIF(_vif)	container_of(_vif, struct lkpi_vif, vif)
190 #define	LVIF_TO_VIF(_lvif)	(&(_lvif)->vif)
191 
192 
193 struct lkpi_hw {	/* name it mac80211_sc? */
194 	const struct ieee80211_ops	*ops;
195 	struct ieee80211_scan_request	*hw_req;
196 	struct workqueue_struct		*workq;
197 
198 	/* FreeBSD specific compat. */
199 	/* Linux device is in hw.wiphy->dev after SET_IEEE80211_DEV(). */
200 	struct ieee80211com		*ic;
201 	struct lkpi_radiotap_tx_hdr	rtap_tx;
202 	struct lkpi_radiotap_rx_hdr	rtap_rx;
203 
204 	TAILQ_HEAD(, lkpi_vif)		lvif_head;
205 	struct sx			lvif_sx;
206 
207 	struct sx			sx;
208 
209 	struct mtx			txq_mtx;
210 	uint32_t			txq_generation[IEEE80211_NUM_ACS];
211 	TAILQ_HEAD(, lkpi_txq)		scheduled_txqs[IEEE80211_NUM_ACS];
212 
213 	/* Deferred RX path. */
214 	struct task		rxq_task;
215 	struct mbufq		rxq;
216 	struct mtx		rxq_mtx;
217 
218 	/* Scan functions we overload to handle depending on scan mode. */
219 	void                    (*ic_scan_curchan)(struct ieee80211_scan_state *,
220 				    unsigned long);
221 	void                    (*ic_scan_mindwell)(struct ieee80211_scan_state *);
222 
223 	/* Node functions we overload to sync state. */
224 	struct ieee80211_node *	(*ic_node_alloc)(struct ieee80211vap *,
225 				    const uint8_t [IEEE80211_ADDR_LEN]);
226 	int			(*ic_node_init)(struct ieee80211_node *);
227 	void			(*ic_node_cleanup)(struct ieee80211_node *);
228 	void			(*ic_node_free)(struct ieee80211_node *);
229 
230 	/* HT and later functions. */
231 	int			(*ic_recv_action)(struct ieee80211_node *,
232 				    const struct ieee80211_frame *,
233 				    const uint8_t *, const uint8_t *);
234 	int			(*ic_send_action)(struct ieee80211_node *,
235 				    int, int, void *);
236 	int			(*ic_ampdu_enable)(struct ieee80211_node *,
237 				    struct ieee80211_tx_ampdu *);
238 	int			(*ic_addba_request)(struct ieee80211_node *,
239 				    struct ieee80211_tx_ampdu *, int, int, int);
240 	int			(*ic_addba_response)(struct ieee80211_node *,
241 				    struct ieee80211_tx_ampdu *, int, int, int);
242 	void			(*ic_addba_stop)(struct ieee80211_node *,
243 				    struct ieee80211_tx_ampdu *);
244 	void			(*ic_addba_response_timeout)(struct ieee80211_node *,
245 				    struct ieee80211_tx_ampdu *);
246 	void			(*ic_bar_response)(struct ieee80211_node *,
247 				    struct ieee80211_tx_ampdu *, int);
248 	int			(*ic_ampdu_rx_start)(struct ieee80211_node *,
249 				    struct ieee80211_rx_ampdu *, int, int, int);
250 	void			(*ic_ampdu_rx_stop)(struct ieee80211_node *,
251 				    struct ieee80211_rx_ampdu *);
252 
253 #define	LKPI_MAC80211_DRV_STARTED	0x00000001
254 	uint32_t			sc_flags;
255 #define	LKPI_LHW_SCAN_RUNNING		0x00000001
256 #define	LKPI_LHW_SCAN_HW		0x00000002
257 	uint32_t			scan_flags;
258 	struct mtx			scan_mtx;
259 
260 	int				supbands;	/* Number of supported bands. */
261 	int				max_rates;	/* Maximum number of bitrates supported in any channel. */
262 	int				scan_ie_len;	/* Length of common per-band scan IEs. */
263 
264 	bool				update_mc;
265 	bool				update_wme;
266 	bool				rxq_stopped;
267 
268 	/* Must be last! */
269 	struct ieee80211_hw		hw __aligned(CACHE_LINE_SIZE);
270 };
271 #define	LHW_TO_HW(_lhw)		(&(_lhw)->hw)
272 #define	HW_TO_LHW(_hw)		container_of(_hw, struct lkpi_hw, hw)
273 
274 struct lkpi_chanctx {
275 	bool				added_to_drv;	/* Managed by MO */
276 	struct ieee80211_chanctx_conf	chanctx_conf __aligned(CACHE_LINE_SIZE);
277 };
278 #define	LCHANCTX_TO_CHANCTX_CONF(_lchanctx)		\
279     (&(_lchanctx)->chanctx_conf)
280 #define	CHANCTX_CONF_TO_LCHANCTX(_conf)			\
281     container_of(_conf, struct lkpi_chanctx, chanctx_conf)
282 
283 struct lkpi_wiphy {
284 	const struct cfg80211_ops	*ops;
285 
286 	/* Must be last! */
287 	struct wiphy			wiphy __aligned(CACHE_LINE_SIZE);
288 };
289 #define	WIPHY_TO_LWIPHY(_wiphy)	container_of(_wiphy, struct lkpi_wiphy, wiphy)
290 #define	LWIPHY_TO_WIPHY(_lwiphy)	(&(_lwiphy)->wiphy)
291 
292 #define	LKPI_80211_LHW_LOCK_INIT(_lhw)			\
293     sx_init_flags(&(_lhw)->sx, "lhw", SX_RECURSE);
294 #define	LKPI_80211_LHW_LOCK_DESTROY(_lhw)		\
295     sx_destroy(&(_lhw)->sx);
296 #define	LKPI_80211_LHW_LOCK(_lhw)			\
297     sx_xlock(&(_lhw)->sx)
298 #define	LKPI_80211_LHW_UNLOCK(_lhw)			\
299     sx_xunlock(&(_lhw)->sx)
300 #define	LKPI_80211_LHW_LOCK_ASSERT(_lhw)		\
301     sx_assert(&(_lhw)->sx, SA_LOCKED)
302 #define	LKPI_80211_LHW_UNLOCK_ASSERT(_lhw)		\
303     sx_assert(&(_lhw)->sx, SA_UNLOCKED)
304 
305 #define	LKPI_80211_LHW_SCAN_LOCK_INIT(_lhw)		\
306     mtx_init(&(_lhw)->scan_mtx, "lhw-scan", NULL, MTX_DEF | MTX_RECURSE);
307 #define	LKPI_80211_LHW_SCAN_LOCK_DESTROY(_lhw)		\
308     mtx_destroy(&(_lhw)->scan_mtx);
309 #define	LKPI_80211_LHW_SCAN_LOCK(_lhw)			\
310     mtx_lock(&(_lhw)->scan_mtx)
311 #define	LKPI_80211_LHW_SCAN_UNLOCK(_lhw)		\
312     mtx_unlock(&(_lhw)->scan_mtx)
313 #define	LKPI_80211_LHW_SCAN_LOCK_ASSERT(_lhw)		\
314     mtx_assert(&(_lhw)->scan_mtx, MA_OWNED)
315 #define	LKPI_80211_LHW_SCAN_UNLOCK_ASSERT(_lhw)		\
316     mtx_assert(&(_lhw)->scan_mtx, MA_NOTOWNED)
317 
318 #define	LKPI_80211_LHW_TXQ_LOCK_INIT(_lhw)		\
319     mtx_init(&(_lhw)->txq_mtx, "lhw-txq", NULL, MTX_DEF | MTX_RECURSE);
320 #define	LKPI_80211_LHW_TXQ_LOCK_DESTROY(_lhw)		\
321     mtx_destroy(&(_lhw)->txq_mtx);
322 #define	LKPI_80211_LHW_TXQ_LOCK(_lhw)			\
323     mtx_lock(&(_lhw)->txq_mtx)
324 #define	LKPI_80211_LHW_TXQ_UNLOCK(_lhw)			\
325     mtx_unlock(&(_lhw)->txq_mtx)
326 #define	LKPI_80211_LHW_TXQ_LOCK_ASSERT(_lhw)		\
327     mtx_assert(&(_lhw)->txq_mtx, MA_OWNED)
328 #define	LKPI_80211_LHW_TXQ_UNLOCK_ASSERT(_lhw)		\
329     mtx_assert(&(_lhw)->txq_mtx, MA_NOTOWNED)
330 
331 #define	LKPI_80211_LHW_RXQ_LOCK_INIT(_lhw)		\
332     mtx_init(&(_lhw)->rxq_mtx, "lhw-rxq", NULL, MTX_DEF | MTX_RECURSE);
333 #define	LKPI_80211_LHW_RXQ_LOCK_DESTROY(_lhw)		\
334     mtx_destroy(&(_lhw)->rxq_mtx);
335 #define	LKPI_80211_LHW_RXQ_LOCK(_lhw)			\
336     mtx_lock(&(_lhw)->rxq_mtx)
337 #define	LKPI_80211_LHW_RXQ_UNLOCK(_lhw)			\
338     mtx_unlock(&(_lhw)->rxq_mtx)
339 #define	LKPI_80211_LHW_RXQ_LOCK_ASSERT(_lhw)		\
340     mtx_assert(&(_lhw)->rxq_mtx, MA_OWNED)
341 #define	LKPI_80211_LHW_RXQ_UNLOCK_ASSERT(_lhw)		\
342     mtx_assert(&(_lhw)->rxq_mtx, MA_NOTOWNED)
343 
344 #define	LKPI_80211_LHW_LVIF_LOCK(_lhw)	sx_xlock(&(_lhw)->lvif_sx)
345 #define	LKPI_80211_LHW_LVIF_UNLOCK(_lhw) sx_xunlock(&(_lhw)->lvif_sx)
346 
347 #define	LKPI_80211_LVIF_LOCK(_lvif)	mtx_lock(&(_lvif)->mtx)
348 #define	LKPI_80211_LVIF_UNLOCK(_lvif)	mtx_unlock(&(_lvif)->mtx)
349 
350 #define	LKPI_80211_LSTA_TXQ_LOCK_INIT(_lsta)		\
351     mtx_init(&(_lsta)->txq_mtx, "lsta-txq", NULL, MTX_DEF);
352 #define	LKPI_80211_LSTA_TXQ_LOCK_DESTROY(_lsta)		\
353     mtx_destroy(&(_lsta)->txq_mtx);
354 #define	LKPI_80211_LSTA_TXQ_LOCK(_lsta)			\
355     mtx_lock(&(_lsta)->txq_mtx)
356 #define	LKPI_80211_LSTA_TXQ_UNLOCK(_lsta)		\
357     mtx_unlock(&(_lsta)->txq_mtx)
358 #define	LKPI_80211_LSTA_TXQ_LOCK_ASSERT(_lsta)		\
359     mtx_assert(&(_lsta)->txq_mtx, MA_OWNED)
360 #define	LKPI_80211_LSTA_TXQ_UNLOCK_ASSERT(_lsta)	\
361     mtx_assert(&(_lsta)->txq_mtx, MA_NOTOWNED)
362 
363 #define	LKPI_80211_LTXQ_LOCK_INIT(_ltxq)		\
364     mtx_init(&(_ltxq)->ltxq_mtx, "ltxq", NULL, MTX_DEF);
365 #define	LKPI_80211_LTXQ_LOCK_DESTROY(_ltxq)		\
366     mtx_destroy(&(_ltxq)->ltxq_mtx);
367 #define	LKPI_80211_LTXQ_LOCK(_ltxq)			\
368     mtx_lock(&(_ltxq)->ltxq_mtx)
369 #define	LKPI_80211_LTXQ_UNLOCK(_ltxq)			\
370     mtx_unlock(&(_ltxq)->ltxq_mtx)
371 #define	LKPI_80211_LTXQ_LOCK_ASSERT(_ltxq)		\
372     mtx_assert(&(_ltxq)->ltxq_mtx, MA_OWNED)
373 #define	LKPI_80211_LTXQ_UNLOCK_ASSERT(_ltxq)		\
374     mtx_assert(&(_ltxq)->ltxq_mtx, MA_NOTOWNED)
375 
376 int lkpi_80211_mo_start(struct ieee80211_hw *);
377 void lkpi_80211_mo_stop(struct ieee80211_hw *);
378 int lkpi_80211_mo_get_antenna(struct ieee80211_hw *, u32 *, u32 *);
379 int lkpi_80211_mo_set_frag_threshold(struct ieee80211_hw *, uint32_t);
380 int lkpi_80211_mo_set_rts_threshold(struct ieee80211_hw *, uint32_t);
381 int lkpi_80211_mo_add_interface(struct ieee80211_hw *, struct ieee80211_vif *);
382 void lkpi_80211_mo_remove_interface(struct ieee80211_hw *, struct ieee80211_vif *);
383 int lkpi_80211_mo_hw_scan(struct ieee80211_hw *, struct ieee80211_vif *,
384     struct ieee80211_scan_request *);
385 void lkpi_80211_mo_cancel_hw_scan(struct ieee80211_hw *, struct ieee80211_vif *);
386 void lkpi_80211_mo_sw_scan_complete(struct ieee80211_hw *, struct ieee80211_vif *);
387 void lkpi_80211_mo_sw_scan_start(struct ieee80211_hw *, struct ieee80211_vif *,
388     const u8 *);
389 u64 lkpi_80211_mo_prepare_multicast(struct ieee80211_hw *,
390     struct netdev_hw_addr_list *);
391 void lkpi_80211_mo_configure_filter(struct ieee80211_hw *, unsigned int,
392     unsigned int *, u64);
393 int lkpi_80211_mo_sta_state(struct ieee80211_hw *, struct ieee80211_vif *,
394     struct lkpi_sta *, enum ieee80211_sta_state);
395 int lkpi_80211_mo_config(struct ieee80211_hw *, uint32_t);
396 int lkpi_80211_mo_assign_vif_chanctx(struct ieee80211_hw *, struct ieee80211_vif *,
397     struct ieee80211_bss_conf *, struct ieee80211_chanctx_conf *);
398 void lkpi_80211_mo_unassign_vif_chanctx(struct ieee80211_hw *, struct ieee80211_vif *,
399     struct ieee80211_bss_conf *, struct ieee80211_chanctx_conf **);
400 int lkpi_80211_mo_add_chanctx(struct ieee80211_hw *, struct ieee80211_chanctx_conf *);
401 void lkpi_80211_mo_change_chanctx(struct ieee80211_hw *,
402     struct ieee80211_chanctx_conf *, uint32_t);
403 void lkpi_80211_mo_remove_chanctx(struct ieee80211_hw *,
404     struct ieee80211_chanctx_conf *);
405 void lkpi_80211_mo_bss_info_changed(struct ieee80211_hw *, struct ieee80211_vif *,
406     struct ieee80211_bss_conf *, uint64_t);
407 int lkpi_80211_mo_conf_tx(struct ieee80211_hw *, struct ieee80211_vif *,
408     uint32_t, uint16_t, const struct ieee80211_tx_queue_params *);
409 void lkpi_80211_mo_flush(struct ieee80211_hw *, struct ieee80211_vif *,
410     uint32_t, bool);
411 void lkpi_80211_mo_mgd_prepare_tx(struct ieee80211_hw *, struct ieee80211_vif *,
412     struct ieee80211_prep_tx_info *);
413 void lkpi_80211_mo_mgd_complete_tx(struct ieee80211_hw *, struct ieee80211_vif *,
414     struct ieee80211_prep_tx_info *);
415 void lkpi_80211_mo_tx(struct ieee80211_hw *, struct ieee80211_tx_control *,
416     struct sk_buff *);
417 void lkpi_80211_mo_wake_tx_queue(struct ieee80211_hw *, struct ieee80211_txq *);
418 void lkpi_80211_mo_sync_rx_queues(struct ieee80211_hw *);
419 void lkpi_80211_mo_sta_pre_rcu_remove(struct ieee80211_hw *,
420     struct ieee80211_vif *, struct ieee80211_sta *);
421 int lkpi_80211_mo_set_key(struct ieee80211_hw *, enum set_key_cmd,
422     struct ieee80211_vif *, struct ieee80211_sta *,
423     struct ieee80211_key_conf *);
424 int lkpi_80211_mo_ampdu_action(struct ieee80211_hw *, struct ieee80211_vif *,
425     struct ieee80211_ampdu_params *);
426 
427 
428 #endif	/* _LKPI_SRC_LINUX_80211_H */
429