blob: e03ee90d2870888c732f846b4d6567cace7ed8f9 [file] [log] [blame]
Ali Bahar0e54f602011-08-23 13:53:37 +08001/******************************************************************************
2 *
3 * Copyright(c) 2007 - 2010 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 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17 *
Ali Baharb4f62092011-08-23 13:53:38 +080018 * Modifications for inclusion into the Linux staging tree are
19 * Copyright(c) 2010 Larry Finger. All rights reserved.
20 *
21 * Contact information:
22 * WLAN FAE <wlanfae@realtek.com>
23 * Larry Finger <Larry.Finger@lwfinger.net>
Ali Bahar0e54f602011-08-23 13:53:37 +080024 *
25 ******************************************************************************/
Larry Finger2865d422010-08-20 10:15:30 -050026#ifndef _RTL871x_EVENT_H_
27#define _RTL871x_EVENT_H_
28
29#include "osdep_service.h"
30
31#include "wlan_bssdef.h"
32#include <linux/semaphore.h>
33#include <linux/sem.h>
34
35/*
36 * Used to report a bss has been scanned
37*/
38struct survey_event {
39 struct ndis_wlan_bssid_ex bss;
40};
41
42/*
43 * Used to report that the requested site survey has been done.
44 * bss_cnt indicates the number of bss that has been reported.
45*/
46struct surveydone_event {
47 unsigned int bss_cnt;
48
49};
50
51/*
52 * Used to report the link result of joinning the given bss
53 * join_res:
54 * -1: authentication fail
55 * -2: association fail
56 * > 0: TID
57*/
58struct joinbss_event {
59 struct wlan_network network;
60};
61
62/*
63 * Used to report a given STA has joinned the created BSS.
64 * It is used in AP/Ad-HoC(M) mode.
65*/
66struct stassoc_event {
67 unsigned char macaddr[6];
68 unsigned char rsvd[2];
69 int cam_id;
70};
71
72struct stadel_event {
Javier M. Mellid05937582011-04-02 03:01:49 +020073 unsigned char macaddr[6];
74 unsigned char rsvd[2];
Larry Finger2865d422010-08-20 10:15:30 -050075};
76
77struct addba_event {
78 unsigned int tid;
79};
80
81#define GEN_EVT_CODE(event) event ## _EVT_
82
83struct fwevent {
84 u32 parmsize;
85 void (*event_callback)(struct _adapter *dev, u8 *pbuf);
86};
87
88#define C2HEVENT_SZ 32
Javier M. Mellid05937582011-04-02 03:01:49 +020089struct event_node {
Larry Finger2865d422010-08-20 10:15:30 -050090 unsigned char *node;
91 unsigned char evt_code;
92 unsigned short evt_sz;
93 /*volatile*/ int *caller_ff_tail;
94 int caller_ff_sz;
95};
96
97struct c2hevent_queue {
98 /*volatile*/ int head;
99 /*volatile*/ int tail;
100 struct event_node nodes[C2HEVENT_SZ];
101 unsigned char seq;
102};
103
104#define NETWORK_QUEUE_SZ 4
105
106struct network_queue {
107 /*volatile*/ int head;
108 /*volatile*/ int tail;
109 struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ];
110};
111
112struct ADDBA_Req_Report_parm {
Javier M. Mellid05937582011-04-02 03:01:49 +0200113 unsigned char MacAddress[ETH_ALEN];
114 unsigned short StartSeqNum;
115 unsigned char tid;
Larry Finger2865d422010-08-20 10:15:30 -0500116};
117#include "rtl8712_event.h"
118
119#endif /* _WLANEVENT_H_ */
120