1/******************************************************************************
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 *
18 * 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>
24 *
25 ******************************************************************************/
26#ifndef _RTL8712_EVENT_H_
27#define _RTL8712_EVENT_H_
28
29void r8712_event_handle(struct _adapter *padapter, uint *peventbuf);
30void r8712_got_addbareq_event_callback(struct _adapter *adapter, u8 *pbuf);
31
32enum rtl8712_c2h_event {
33	GEN_EVT_CODE(_Read_MACREG) = 0,		/*0*/
34	GEN_EVT_CODE(_Read_BBREG),
35	GEN_EVT_CODE(_Read_RFREG),
36	GEN_EVT_CODE(_Read_EEPROM),
37	GEN_EVT_CODE(_Read_EFUSE),
38	GEN_EVT_CODE(_Read_CAM),		/*5*/
39	GEN_EVT_CODE(_Get_BasicRate),
40	GEN_EVT_CODE(_Get_DataRate),
41	GEN_EVT_CODE(_Survey),			/*8*/
42	GEN_EVT_CODE(_SurveyDone),		/*9*/
43
44	GEN_EVT_CODE(_JoinBss),			/*10*/
45	GEN_EVT_CODE(_AddSTA),
46	GEN_EVT_CODE(_DelSTA),
47	GEN_EVT_CODE(_AtimDone),
48	GEN_EVT_CODE(_TX_Report),
49	GEN_EVT_CODE(_CCX_Report),		/*15*/
50	GEN_EVT_CODE(_DTM_Report),
51	GEN_EVT_CODE(_TX_Rate_Statistics),
52	GEN_EVT_CODE(_C2HLBK),
53	GEN_EVT_CODE(_FWDBG),
54	GEN_EVT_CODE(_C2HFEEDBACK),		/*20*/
55	GEN_EVT_CODE(_ADDBA),
56	GEN_EVT_CODE(_C2HBCN),
57	GEN_EVT_CODE(_ReportPwrState),		/*filen: only for PCIE, USB*/
58	GEN_EVT_CODE(_WPS_PBC),			/*24*/
59	GEN_EVT_CODE(_ADDBAReq_Report),		/*25*/
60	MAX_C2HEVT
61};
62
63
64#ifdef _RTL8712_CMD_C_
65
66static struct fwevent wlanevents[] = {
67	{0, NULL},	/*0*/
68	{0, NULL},
69	{0, NULL},
70	{0, NULL},
71	{0, NULL},
72	{0, NULL},
73	{0, NULL},
74	{0, NULL},
75	{0, &r8712_survey_event_callback},		/*8*/
76	{sizeof(struct surveydone_event),
77		&r8712_surveydone_event_callback},	/*9*/
78
79	{0, &r8712_joinbss_event_callback},		/*10*/
80	{sizeof(struct stassoc_event), &r8712_stassoc_event_callback},
81	{sizeof(struct stadel_event), &r8712_stadel_event_callback},
82	{0, &r8712_atimdone_event_callback},
83	{0, NULL},
84	{0, NULL},	/*15*/
85	{0, NULL},
86	{0, NULL},
87	{0, NULL},
88	{0, NULL},	/*fwdbg_event_callback},*/
89	{0, NULL},	/*20*/
90	{0, NULL},
91	{0, NULL},
92	{0, &r8712_cpwm_event_callback},
93	{0, &r8712_wpspbc_event_callback},
94	{0, &r8712_got_addbareq_event_callback},
95};
96
97#endif/*_RTL8712_CMD_C_*/
98
99#endif
100