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 /*
11 Used to report a bss has been scanned
12 
13 */
14 struct survey_event	{
15 	struct wlan_bssid_ex bss;
16 };
17 
18 /*
19 Used to report that the requested site survey has been done.
20 
21 bss_cnt indicates the number of bss that has been reported.
22 
23 
24 */
25 struct surveydone_event {
26 	unsigned int	bss_cnt;
27 
28 };
29 
30 /*
31 Used to report the link result of joinning the given bss
32 
33 
34 join_res:
35 -1: authentication fail
36 -2: association fail
37 > 0: TID
38 
39 */
40 struct joinbss_event {
41 	struct	wlan_network	network;
42 };
43 
44 /*
45 Used to report a given STA has joinned the created BSS.
46 It is used in AP/Ad-HoC(M) mode.
47 
48 
49 */
50 struct stassoc_event {
51 	unsigned char macaddr[6];
52 	unsigned char rsvd[2];
53 	int    cam_id;
54 
55 };
56 
57 struct stadel_event {
58  unsigned char macaddr[6];
59  unsigned char rsvd[2]; /* for reason */
60  int mac_id;
61 };
62 
63 struct addba_event {
64 	unsigned int tid;
65 };
66 
67 struct wmm_event {
68 	unsigned char wmm;
69 };
70 
71 #define GEN_EVT_CODE(event)	event ## _EVT_
72 
73 
74 
75 struct fwevent {
76 	u32 parmsize;
77 	void (*event_callback)(struct adapter *dev, u8 *pbuf);
78 };
79 
80 
81 #define C2HEVENT_SZ			32
82 
83 struct event_node {
84 	unsigned char *node;
85 	unsigned char evt_code;
86 	unsigned short evt_sz;
87 	volatile int	*caller_ff_tail;
88 	int	caller_ff_sz;
89 };
90 
91 struct c2hevent_queue {
92 	volatile int	head;
93 	volatile int	tail;
94 	struct	event_node	nodes[C2HEVENT_SZ];
95 	unsigned char seq;
96 };
97 
98 #define NETWORK_QUEUE_SZ	4
99 
100 struct network_queue {
101 	volatile int	head;
102 	volatile int	tail;
103 	struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ];
104 };
105 
106 
107 #endif /*  _WLANEVENT_H_ */
108