GNU Linux-libre 4.19.286-gnu1
[releases.git] / drivers / staging / rtl8188eu / include / rtw_event.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5  *
6  ******************************************************************************/
7 #ifndef _RTW_EVENT_H_
8 #define _RTW_EVENT_H_
9
10 #include <osdep_service.h>
11
12 #include <wlan_bssdef.h>
13 #include <linux/mutex.h>
14 #include <linux/sem.h>
15
16 /*
17  * Used to report a bss has been scanned
18  */
19 struct survey_event     {
20         struct wlan_bssid_ex bss;
21 };
22
23 /*
24  * Used to report that the requested site survey has been done.
25  *
26  * bss_cnt indicates the number of bss that has been reported.
27  *
28  *
29  */
30 struct surveydone_event {
31         unsigned int    bss_cnt;
32
33 };
34
35 /*
36  * Used to report the link result of joinning the given bss
37  *
38  *
39  * join_res:
40  * -1: authentication fail
41  * -2: association fail
42  * > 0: TID
43  *
44  */
45 struct joinbss_event {
46         struct  wlan_network    network;
47 };
48
49 /*
50  * Used to report a given STA has joinned the created BSS.
51  * It is used in AP/Ad-HoC(M) mode.
52  */
53
54 struct stassoc_event {
55         unsigned char macaddr[6];
56         unsigned char rsvd[2];
57         int    cam_id;
58 };
59
60 struct stadel_event {
61         unsigned char macaddr[6];
62         unsigned char rsvd[2]; /* for reason */
63         int mac_id;
64 };
65
66 struct fwevent {
67         u32     parmsize;
68         void (*event_callback)(struct adapter *dev, u8 *pbuf);
69 };
70
71 #define C2HEVENT_SZ                     32
72
73 #define NETWORK_QUEUE_SZ        4
74
75 struct network_queue {
76         int     head;
77         int     tail;
78         struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ];
79 };
80
81 #endif /*  _WLANEVENT_H_ */