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