xref: /freebsd/sys/compat/linuxkpi/common/src/linux_80211.h (revision b8dfc3ecf7031a0a7764cdb67d85ebe0c03d5d93)
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_HW_CRYPTO	0x00020000
71 #define	D80211_TRACE_MO		0x00100000
72 #define	D80211_TRACE_MODE	0x0f000000
73 #define	D80211_TRACE_MODE_HT	0x01000000
74 #define	D80211_TRACE_MODE_VHT	0x02000000
75 #define	D80211_TRACE_MODE_HE	0x04000000
76 #define	D80211_TRACE_MODE_EHT	0x08000000
77 
78 #define	IMPROVE_TXQ(...)						\
79     if (linuxkpi_debug_80211 & D80211_IMPROVE_TXQ)			\
80 	printf("%s:%d: XXX LKPI80211 IMPROVE_TXQ\n", __func__, __LINE__)
81 
82 #define	IMPROVE_HT(fmt, ...)						\
83     if (linuxkpi_debug_80211 & D80211_TRACE_MODE_HT)			\
84 	printf("%s:%d: XXX LKPI80211 IMPROVE_HT " fmt "\n",		\
85 	    __func__, __LINE__, ##__VA_ARGS__);
86 
87 #define	MTAG_ABI_LKPI80211	1707696513	/* LinuxKPI 802.11 KBI */
88 
89 /*
90  * Deferred RX path.
91  * We need to pass *ni along (and possibly more in the future so
92  * we use a struct right from the start.
93  */
94 #define	LKPI80211_TAG_RXNI	0		/* deferred RX path */
95 struct lkpi_80211_tag_rxni {
96 	struct ieee80211_node	*ni;		/* MUST hold a reference to it. */
97 };
98 
99 struct lkpi_radiotap_tx_hdr {
100 	struct ieee80211_radiotap_header wt_ihdr;
101 	uint8_t		wt_flags;
102 	uint8_t		wt_rate;
103 	uint16_t	wt_chan_freq;
104 	uint16_t	wt_chan_flags;
105 } __packed;
106 #define	LKPI_RTAP_TX_FLAGS_PRESENT					\
107 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\
108 	 (1 << IEEE80211_RADIOTAP_RATE) |				\
109 	 (1 << IEEE80211_RADIOTAP_CHANNEL))
110 
111 struct lkpi_radiotap_rx_hdr {
112 	struct ieee80211_radiotap_header wr_ihdr;
113 	uint64_t	wr_tsft;
114 	uint8_t		wr_flags;
115 	uint8_t		wr_rate;
116 	uint16_t	wr_chan_freq;
117 	uint16_t	wr_chan_flags;
118 	int8_t		wr_dbm_antsignal;
119 	int8_t		wr_dbm_antnoise;
120 } __packed __aligned(8);
121 #define	LKPI_RTAP_RX_FLAGS_PRESENT					\
122 	((1 << IEEE80211_RADIOTAP_TSFT) |				\
123 	 (1 << IEEE80211_RADIOTAP_FLAGS) |				\
124 	 (1 << IEEE80211_RADIOTAP_RATE) |				\
125 	 (1 << IEEE80211_RADIOTAP_CHANNEL) |				\
126 	 (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) |			\
127 	 (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE))
128 
129 struct lkpi_hw;
130 
131 struct lkpi_txq {
132 	TAILQ_ENTRY(lkpi_txq)	txq_entry;
133 
134 	struct mtx		ltxq_mtx;
135 	bool			seen_dequeue;
136 	bool			stopped;
137 	uint32_t		txq_generation;
138 	struct sk_buff_head	skbq;
139 
140 	/* Must be last! */
141 	struct ieee80211_txq	txq __aligned(CACHE_LINE_SIZE);
142 };
143 #define	TXQ_TO_LTXQ(_txq)	container_of(_txq, struct lkpi_txq, txq)
144 
145 
146 struct lkpi_sta {
147 	struct list_head	lsta_list;
148 	struct ieee80211_node	*ni;
149 	struct ieee80211_hw	*hw;		/* back pointer f. locking. */
150 
151 	/* Deferred TX path. */
152 	/* Eventually we might want to migrate this into net80211 entirely. */
153 	/* XXX-BZ can we use sta->txq[] instead directly? */
154 	struct task		txq_task;
155 	struct mbufq		txq;
156 	struct mtx		txq_mtx;
157 
158 	struct ieee80211_key_conf *kc[IEEE80211_WEP_NKID];
159 	enum ieee80211_sta_state state;
160 	bool			txq_ready;			/* Can we run the taskq? */
161 	bool			added_to_drv;			/* Driver knows; i.e. we called ...(). */
162 	bool			in_mgd;				/* XXX-BZ should this be per-vif? */
163 
164 	/* Must be last! */
165 	struct ieee80211_sta	sta __aligned(CACHE_LINE_SIZE);
166 };
167 #define	STA_TO_LSTA(_sta)	container_of(_sta, struct lkpi_sta, sta)
168 #define	LSTA_TO_STA(_lsta)	(&(_lsta)->sta)
169 
170 /* Either protected by wiphy lock or rcu for the list. */
171 struct lkpi_vif {
172         TAILQ_ENTRY(lkpi_vif)	lvif_entry;
173 	struct ieee80211vap	iv_vap;
174 	eventhandler_tag	lvif_ifllevent;
175 
176 	struct sysctl_ctx_list	sysctl_ctx;
177 
178 	struct mtx		mtx;
179 	struct wireless_dev	wdev;
180 
181 	/* Other local stuff. */
182 	int			(*iv_newstate)(struct ieee80211vap *,
183 				    enum ieee80211_state, int);
184 	struct ieee80211_node *	(*iv_update_bss)(struct ieee80211vap *,
185 				    struct ieee80211_node *);
186 	struct list_head	lsta_list;
187 
188 	struct lkpi_sta		*lvif_bss;
189 
190 	int			nt_unlocked;			/* Count of nt unlocks pending (*mo_set_key) */
191 	bool			lvif_bss_synched;
192 	bool			added_to_drv;			/* Driver knows; i.e. we called add_interface(). */
193 
194 	bool			hw_queue_stopped[IEEE80211_NUM_ACS];
195 
196 	/* Must be last! */
197 	struct ieee80211_vif	vif __aligned(CACHE_LINE_SIZE);
198 };
199 #define	VAP_TO_LVIF(_vap)	container_of(_vap, struct lkpi_vif, iv_vap)
200 #define	LVIF_TO_VAP(_lvif)	(&(_lvif)->iv_vap)
201 #define	VIF_TO_LVIF(_vif)	container_of(_vif, struct lkpi_vif, vif)
202 #define	LVIF_TO_VIF(_lvif)	(&(_lvif)->vif)
203 
204 
205 struct lkpi_hw {	/* name it mac80211_sc? */
206 	const struct ieee80211_ops	*ops;
207 	struct ieee80211_scan_request	*hw_req;
208 	struct workqueue_struct		*workq;
209 
210 	/* FreeBSD specific compat. */
211 	/* Linux device is in hw.wiphy->dev after SET_IEEE80211_DEV(). */
212 	struct ieee80211com		*ic;
213 	struct lkpi_radiotap_tx_hdr	rtap_tx;
214 	struct lkpi_radiotap_rx_hdr	rtap_rx;
215 
216 	TAILQ_HEAD(, lkpi_vif)		lvif_head;
217 	struct sx			lvif_sx;
218 
219 	struct sx			sx;			/* XXX-BZ Can this be wiphy->mtx in the future? */
220 
221 	struct mtx			txq_mtx;
222 	uint32_t			txq_generation[IEEE80211_NUM_ACS];
223 	TAILQ_HEAD(, lkpi_txq)		scheduled_txqs[IEEE80211_NUM_ACS];
224 
225 	/* Deferred RX path. */
226 	struct task		rxq_task;
227 	struct mbufq		rxq;
228 	struct mtx		rxq_mtx;
229 
230 	/* Scan functions we overload to handle depending on scan mode. */
231 	void                    (*ic_scan_curchan)(struct ieee80211_scan_state *,
232 				    unsigned long);
233 	void                    (*ic_scan_mindwell)(struct ieee80211_scan_state *);
234 
235 	/* Node functions we overload to sync state. */
236 	struct ieee80211_node *	(*ic_node_alloc)(struct ieee80211vap *,
237 				    const uint8_t [IEEE80211_ADDR_LEN]);
238 	int			(*ic_node_init)(struct ieee80211_node *);
239 	void			(*ic_node_cleanup)(struct ieee80211_node *);
240 	void			(*ic_node_free)(struct ieee80211_node *);
241 
242 	/* HT and later functions. */
243 	int			(*ic_recv_action)(struct ieee80211_node *,
244 				    const struct ieee80211_frame *,
245 				    const uint8_t *, const uint8_t *);
246 	int			(*ic_send_action)(struct ieee80211_node *,
247 				    int, int, void *);
248 	int			(*ic_ampdu_enable)(struct ieee80211_node *,
249 				    struct ieee80211_tx_ampdu *);
250 	int			(*ic_addba_request)(struct ieee80211_node *,
251 				    struct ieee80211_tx_ampdu *, int, int, int);
252 	int			(*ic_addba_response)(struct ieee80211_node *,
253 				    struct ieee80211_tx_ampdu *, int, int, int);
254 	void			(*ic_addba_stop)(struct ieee80211_node *,
255 				    struct ieee80211_tx_ampdu *);
256 	void			(*ic_addba_response_timeout)(struct ieee80211_node *,
257 				    struct ieee80211_tx_ampdu *);
258 	void			(*ic_bar_response)(struct ieee80211_node *,
259 				    struct ieee80211_tx_ampdu *, int);
260 	int			(*ic_ampdu_rx_start)(struct ieee80211_node *,
261 				    struct ieee80211_rx_ampdu *, int, int, int);
262 	void			(*ic_ampdu_rx_stop)(struct ieee80211_node *,
263 				    struct ieee80211_rx_ampdu *);
264 
265 #define	LKPI_MAC80211_DRV_STARTED	0x00000001
266 	uint32_t			sc_flags;
267 #define	LKPI_LHW_SCAN_RUNNING		0x00000001
268 #define	LKPI_LHW_SCAN_HW		0x00000002
269 	uint32_t			scan_flags;
270 	struct mtx			scan_mtx;
271 
272 	int				supbands;	/* Number of supported bands. */
273 	int				max_rates;	/* Maximum number of bitrates supported in any channel. */
274 	int				scan_ie_len;	/* Length of common per-band scan IEs. */
275 
276 	bool				update_mc;
277 	bool				update_wme;
278 	bool				rxq_stopped;
279 
280 	/* Must be last! */
281 	struct ieee80211_hw		hw __aligned(CACHE_LINE_SIZE);
282 };
283 #define	LHW_TO_HW(_lhw)		(&(_lhw)->hw)
284 #define	HW_TO_LHW(_hw)		container_of(_hw, struct lkpi_hw, hw)
285 
286 struct lkpi_chanctx {
287 	bool				added_to_drv;	/* Managed by MO */
288 	struct ieee80211_chanctx_conf	chanctx_conf __aligned(CACHE_LINE_SIZE);
289 };
290 #define	LCHANCTX_TO_CHANCTX_CONF(_lchanctx)		\
291     (&(_lchanctx)->chanctx_conf)
292 #define	CHANCTX_CONF_TO_LCHANCTX(_conf)			\
293     container_of(_conf, struct lkpi_chanctx, chanctx_conf)
294 
295 struct lkpi_wiphy {
296 	const struct cfg80211_ops	*ops;
297 
298 	struct work_struct		wwk;
299 	struct list_head		wwk_list;
300 	struct mtx			wwk_mtx;
301 
302 	/* Must be last! */
303 	struct wiphy			wiphy __aligned(CACHE_LINE_SIZE);
304 };
305 #define	WIPHY_TO_LWIPHY(_wiphy)	container_of(_wiphy, struct lkpi_wiphy, wiphy)
306 #define	LWIPHY_TO_WIPHY(_lwiphy)	(&(_lwiphy)->wiphy)
307 
308 #define	LKPI_80211_LWIPHY_WORK_LOCK_INIT(_lwiphy)	\
309     mtx_init(&(_lwiphy)->wwk_mtx, "lwiphy-work", NULL, MTX_DEF);
310 #define	LKPI_80211_LWIPHY_WORK_LOCK_DESTROY(_lwiphy)	\
311     mtx_destroy(&(_lwiphy)->wwk_mtx)
312 #define	LKPI_80211_LWIPHY_WORK_LOCK(_lwiphy)		\
313     mtx_lock(&(_lwiphy)->wwk_mtx)
314 #define	LKPI_80211_LWIPHY_WORK_UNLOCK(_lwiphy)		\
315     mtx_unlock(&(_lwiphy)->wwk_mtx)
316 #define	LKPI_80211_LWIPHY_WORK_LOCK_ASSERT(_lwiphy)	\
317     mtx_assert(&(_lwiphy)->wwk_mtx, MA_OWNED)
318 #define	LKPI_80211_LWIPHY_WORK_UNLOCK_ASSERT(_lwiphy)	\
319     mtx_assert(&(_lwiphy)->wwk_mtx, MA_NOTOWNED)
320 
321 #define	LKPI_80211_LHW_LOCK_INIT(_lhw)			\
322     sx_init_flags(&(_lhw)->sx, "lhw", SX_RECURSE);
323 #define	LKPI_80211_LHW_LOCK_DESTROY(_lhw)		\
324     sx_destroy(&(_lhw)->sx);
325 #define	LKPI_80211_LHW_LOCK(_lhw)			\
326     sx_xlock(&(_lhw)->sx)
327 #define	LKPI_80211_LHW_UNLOCK(_lhw)			\
328     sx_xunlock(&(_lhw)->sx)
329 #define	LKPI_80211_LHW_LOCK_ASSERT(_lhw)		\
330     sx_assert(&(_lhw)->sx, SA_LOCKED)
331 #define	LKPI_80211_LHW_UNLOCK_ASSERT(_lhw)		\
332     sx_assert(&(_lhw)->sx, SA_UNLOCKED)
333 
334 #define	LKPI_80211_LHW_SCAN_LOCK_INIT(_lhw)		\
335     mtx_init(&(_lhw)->scan_mtx, "lhw-scan", NULL, MTX_DEF | MTX_RECURSE);
336 #define	LKPI_80211_LHW_SCAN_LOCK_DESTROY(_lhw)		\
337     mtx_destroy(&(_lhw)->scan_mtx);
338 #define	LKPI_80211_LHW_SCAN_LOCK(_lhw)			\
339     mtx_lock(&(_lhw)->scan_mtx)
340 #define	LKPI_80211_LHW_SCAN_UNLOCK(_lhw)		\
341     mtx_unlock(&(_lhw)->scan_mtx)
342 #define	LKPI_80211_LHW_SCAN_LOCK_ASSERT(_lhw)		\
343     mtx_assert(&(_lhw)->scan_mtx, MA_OWNED)
344 #define	LKPI_80211_LHW_SCAN_UNLOCK_ASSERT(_lhw)		\
345     mtx_assert(&(_lhw)->scan_mtx, MA_NOTOWNED)
346 
347 #define	LKPI_80211_LHW_TXQ_LOCK_INIT(_lhw)		\
348     mtx_init(&(_lhw)->txq_mtx, "lhw-txq", NULL, MTX_DEF | MTX_RECURSE);
349 #define	LKPI_80211_LHW_TXQ_LOCK_DESTROY(_lhw)		\
350     mtx_destroy(&(_lhw)->txq_mtx);
351 #define	LKPI_80211_LHW_TXQ_LOCK(_lhw)			\
352     mtx_lock(&(_lhw)->txq_mtx)
353 #define	LKPI_80211_LHW_TXQ_UNLOCK(_lhw)			\
354     mtx_unlock(&(_lhw)->txq_mtx)
355 #define	LKPI_80211_LHW_TXQ_LOCK_ASSERT(_lhw)		\
356     mtx_assert(&(_lhw)->txq_mtx, MA_OWNED)
357 #define	LKPI_80211_LHW_TXQ_UNLOCK_ASSERT(_lhw)		\
358     mtx_assert(&(_lhw)->txq_mtx, MA_NOTOWNED)
359 
360 #define	LKPI_80211_LHW_RXQ_LOCK_INIT(_lhw)		\
361     mtx_init(&(_lhw)->rxq_mtx, "lhw-rxq", NULL, MTX_DEF | MTX_RECURSE);
362 #define	LKPI_80211_LHW_RXQ_LOCK_DESTROY(_lhw)		\
363     mtx_destroy(&(_lhw)->rxq_mtx);
364 #define	LKPI_80211_LHW_RXQ_LOCK(_lhw)			\
365     mtx_lock(&(_lhw)->rxq_mtx)
366 #define	LKPI_80211_LHW_RXQ_UNLOCK(_lhw)			\
367     mtx_unlock(&(_lhw)->rxq_mtx)
368 #define	LKPI_80211_LHW_RXQ_LOCK_ASSERT(_lhw)		\
369     mtx_assert(&(_lhw)->rxq_mtx, MA_OWNED)
370 #define	LKPI_80211_LHW_RXQ_UNLOCK_ASSERT(_lhw)		\
371     mtx_assert(&(_lhw)->rxq_mtx, MA_NOTOWNED)
372 
373 #define	LKPI_80211_LHW_LVIF_LOCK(_lhw)	sx_xlock(&(_lhw)->lvif_sx)
374 #define	LKPI_80211_LHW_LVIF_UNLOCK(_lhw) sx_xunlock(&(_lhw)->lvif_sx)
375 
376 #define	LKPI_80211_LVIF_LOCK(_lvif)	mtx_lock(&(_lvif)->mtx)
377 #define	LKPI_80211_LVIF_UNLOCK(_lvif)	mtx_unlock(&(_lvif)->mtx)
378 
379 #define	LKPI_80211_LSTA_TXQ_LOCK_INIT(_lsta)		\
380     mtx_init(&(_lsta)->txq_mtx, "lsta-txq", NULL, MTX_DEF);
381 #define	LKPI_80211_LSTA_TXQ_LOCK_DESTROY(_lsta)		\
382     mtx_destroy(&(_lsta)->txq_mtx);
383 #define	LKPI_80211_LSTA_TXQ_LOCK(_lsta)			\
384     mtx_lock(&(_lsta)->txq_mtx)
385 #define	LKPI_80211_LSTA_TXQ_UNLOCK(_lsta)		\
386     mtx_unlock(&(_lsta)->txq_mtx)
387 #define	LKPI_80211_LSTA_TXQ_LOCK_ASSERT(_lsta)		\
388     mtx_assert(&(_lsta)->txq_mtx, MA_OWNED)
389 #define	LKPI_80211_LSTA_TXQ_UNLOCK_ASSERT(_lsta)	\
390     mtx_assert(&(_lsta)->txq_mtx, MA_NOTOWNED)
391 
392 #define	LKPI_80211_LTXQ_LOCK_INIT(_ltxq)		\
393     mtx_init(&(_ltxq)->ltxq_mtx, "ltxq", NULL, MTX_DEF);
394 #define	LKPI_80211_LTXQ_LOCK_DESTROY(_ltxq)		\
395     mtx_destroy(&(_ltxq)->ltxq_mtx);
396 #define	LKPI_80211_LTXQ_LOCK(_ltxq)			\
397     mtx_lock(&(_ltxq)->ltxq_mtx)
398 #define	LKPI_80211_LTXQ_UNLOCK(_ltxq)			\
399     mtx_unlock(&(_ltxq)->ltxq_mtx)
400 #define	LKPI_80211_LTXQ_LOCK_ASSERT(_ltxq)		\
401     mtx_assert(&(_ltxq)->ltxq_mtx, MA_OWNED)
402 #define	LKPI_80211_LTXQ_UNLOCK_ASSERT(_ltxq)		\
403     mtx_assert(&(_ltxq)->ltxq_mtx, MA_NOTOWNED)
404 
405 int lkpi_80211_mo_start(struct ieee80211_hw *);
406 void lkpi_80211_mo_stop(struct ieee80211_hw *, bool);
407 int lkpi_80211_mo_get_antenna(struct ieee80211_hw *, u32 *, u32 *);
408 int lkpi_80211_mo_set_frag_threshold(struct ieee80211_hw *, uint32_t);
409 int lkpi_80211_mo_set_rts_threshold(struct ieee80211_hw *, uint32_t);
410 int lkpi_80211_mo_add_interface(struct ieee80211_hw *, struct ieee80211_vif *);
411 void lkpi_80211_mo_remove_interface(struct ieee80211_hw *, struct ieee80211_vif *);
412 int lkpi_80211_mo_hw_scan(struct ieee80211_hw *, struct ieee80211_vif *,
413     struct ieee80211_scan_request *);
414 void lkpi_80211_mo_cancel_hw_scan(struct ieee80211_hw *, struct ieee80211_vif *);
415 void lkpi_80211_mo_sw_scan_complete(struct ieee80211_hw *, struct ieee80211_vif *);
416 void lkpi_80211_mo_sw_scan_start(struct ieee80211_hw *, struct ieee80211_vif *,
417     const u8 *);
418 u64 lkpi_80211_mo_prepare_multicast(struct ieee80211_hw *,
419     struct netdev_hw_addr_list *);
420 void lkpi_80211_mo_configure_filter(struct ieee80211_hw *, unsigned int,
421     unsigned int *, u64);
422 int lkpi_80211_mo_sta_state(struct ieee80211_hw *, struct ieee80211_vif *,
423     struct lkpi_sta *, enum ieee80211_sta_state);
424 int lkpi_80211_mo_config(struct ieee80211_hw *, uint32_t);
425 int lkpi_80211_mo_assign_vif_chanctx(struct ieee80211_hw *, struct ieee80211_vif *,
426     struct ieee80211_bss_conf *, struct ieee80211_chanctx_conf *);
427 void lkpi_80211_mo_unassign_vif_chanctx(struct ieee80211_hw *, struct ieee80211_vif *,
428     struct ieee80211_bss_conf *, struct ieee80211_chanctx_conf **);
429 int lkpi_80211_mo_add_chanctx(struct ieee80211_hw *, struct ieee80211_chanctx_conf *);
430 void lkpi_80211_mo_change_chanctx(struct ieee80211_hw *,
431     struct ieee80211_chanctx_conf *, uint32_t);
432 void lkpi_80211_mo_remove_chanctx(struct ieee80211_hw *,
433     struct ieee80211_chanctx_conf *);
434 void lkpi_80211_mo_bss_info_changed(struct ieee80211_hw *, struct ieee80211_vif *,
435     struct ieee80211_bss_conf *, uint64_t);
436 int lkpi_80211_mo_conf_tx(struct ieee80211_hw *, struct ieee80211_vif *,
437     uint32_t, uint16_t, const struct ieee80211_tx_queue_params *);
438 void lkpi_80211_mo_flush(struct ieee80211_hw *, struct ieee80211_vif *,
439     uint32_t, bool);
440 void lkpi_80211_mo_mgd_prepare_tx(struct ieee80211_hw *, struct ieee80211_vif *,
441     struct ieee80211_prep_tx_info *);
442 void lkpi_80211_mo_mgd_complete_tx(struct ieee80211_hw *, struct ieee80211_vif *,
443     struct ieee80211_prep_tx_info *);
444 void lkpi_80211_mo_tx(struct ieee80211_hw *, struct ieee80211_tx_control *,
445     struct sk_buff *);
446 void lkpi_80211_mo_wake_tx_queue(struct ieee80211_hw *, struct ieee80211_txq *);
447 void lkpi_80211_mo_sync_rx_queues(struct ieee80211_hw *);
448 void lkpi_80211_mo_sta_pre_rcu_remove(struct ieee80211_hw *,
449     struct ieee80211_vif *, struct ieee80211_sta *);
450 int lkpi_80211_mo_set_key(struct ieee80211_hw *, enum set_key_cmd,
451     struct ieee80211_vif *, struct ieee80211_sta *,
452     struct ieee80211_key_conf *);
453 int lkpi_80211_mo_ampdu_action(struct ieee80211_hw *, struct ieee80211_vif *,
454     struct ieee80211_ampdu_params *);
455 int lkpi_80211_mo_sta_statistics(struct ieee80211_hw *, struct ieee80211_vif *,
456     struct ieee80211_sta *, struct station_info *);
457 
458 #endif	/* _LKPI_SRC_LINUX_80211_H */
459