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 { 65 unsigned int tid; 66 }; 67 68 struct wmm_event 69 { 70 unsigned char wmm; 71 }; 72 73 #define GEN_EVT_CODE(event) event ## _EVT_ 74 75 76 77 struct fwevent { 78 u32 parmsize; 79 void (*event_callback)(struct adapter *dev, u8 *pbuf); 80 }; 81 82 83 #define C2HEVENT_SZ 32 84 85 struct event_node{ 86 unsigned char *node; 87 unsigned char evt_code; 88 unsigned short evt_sz; 89 volatile int *caller_ff_tail; 90 int caller_ff_sz; 91 }; 92 93 struct c2hevent_queue { 94 volatile int head; 95 volatile int tail; 96 struct event_node nodes[C2HEVENT_SZ]; 97 unsigned char seq; 98 }; 99 100 #define NETWORK_QUEUE_SZ 4 101 102 struct network_queue { 103 volatile int head; 104 volatile int tail; 105 struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ]; 106 }; 107 108 109 #endif /* _WLANEVENT_H_ */ 110