]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/staging/rtl8723au/include/rtw_event.h
Merge tag 'efi-urgent' into x86/urgent
[karo-tx-linux.git] / drivers / staging / rtl8723au / include / rtw_event.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  ******************************************************************************/
15 #ifndef _RTW_EVENT_H_
16 #define _RTW_EVENT_H_
17
18 #include <osdep_service.h>
19
20 #include <wlan_bssdef.h>
21
22 /*
23 Used to report a bss has been scanned
24
25 */
26 struct survey_event     {
27         struct wlan_bssid_ex bss;
28 };
29
30 /*
31 Used to report that the requested site survey has been done.
32
33 bss_cnt indicates the number of bss that has been reported.
34
35
36 */
37 struct surveydone_event {
38         unsigned int    bss_cnt;
39
40 };
41
42 /*
43 Used to report the link result of joinning the given bss
44
45
46 join_res:
47 -1: authentication fail
48 -2: association fail
49 > 0: TID
50
51 */
52 struct joinbss_event {
53         struct  wlan_network    network;
54 };
55
56 /*
57 Used to report a given STA has joinned the created BSS.
58 It is used in AP/Ad-HoC(M) mode.
59
60
61 */
62 struct stassoc_event {
63         unsigned char macaddr[6];
64         unsigned char rsvd[2];
65         int    cam_id;
66
67 };
68
69 struct stadel_event {
70  unsigned char macaddr[6];
71  unsigned char rsvd[2]; /* for reason */
72  int mac_id;
73 };
74
75 struct addba_event
76 {
77         unsigned int tid;
78 };
79
80 #define GEN_EVT_CODE(event)     event ## _EVT_
81
82 struct fwevent {
83         u32     parmsize;
84         void (*event_callback)(struct rtw_adapter *dev, u8 *pbuf);
85 };
86
87
88 #define C2HEVENT_SZ                     32
89
90 struct event_node{
91         unsigned char *node;
92         unsigned char evt_code;
93         unsigned short evt_sz;
94         volatile int    *caller_ff_tail;
95         int     caller_ff_sz;
96 };
97
98 struct c2hevent_queue {
99         volatile int    head;
100         volatile int    tail;
101         struct  event_node      nodes[C2HEVENT_SZ];
102         unsigned char   seq;
103 };
104
105 #define NETWORK_QUEUE_SZ        4
106
107 struct network_queue {
108         volatile int    head;
109         volatile int    tail;
110         struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ];
111 };
112
113
114 #endif /*  _WLANEVENT_H_ */