wifi.h revision 40954b63859f373ad83454a2598bc8d251973a34
1/******************************************************************************
2 *
3 * Copyright(c) 2007 - 2012 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 _WIFI_H_
16#define _WIFI_H_
17
18#define P80211CAPTURE_VERSION	0x80211001
19
20/*  This value is tested by WiFi 11n Test Plan 5.2.3.
21 *  This test verifies the WLAN NIC can update the NAV through sending
22 *  the CTS with large duration.
23 */
24#define	WiFiNavUpperUs		30000	/*  30 ms */
25
26#define _ASOCREQ_IE_OFFSET_		4	/*  excluding wlan_hdr */
27#define	_ASOCRSP_IE_OFFSET_		6
28#define _REASOCREQ_IE_OFFSET_		10
29#define _REASOCRSP_IE_OFFSET_		6
30#define _PROBEREQ_IE_OFFSET_		0
31#define	_PROBERSP_IE_OFFSET_		12
32#define _AUTH_IE_OFFSET_		6
33#define _DEAUTH_IE_OFFSET_		0
34#define _BEACON_IE_OFFSET_		12
35
36#define _FIXED_IE_LENGTH_		_BEACON_IE_OFFSET_
37
38
39#define	EID_BSSIntolerantChlReport	73
40
41/*-----------------------------------------------------------------------------
42				Below is the definition for 802.11n
43------------------------------------------------------------------------------*/
44
45struct AC_param {
46	unsigned char		ACI_AIFSN;
47	unsigned char		CW;
48	unsigned short	TXOP_limit;
49}  __packed;
50
51struct WMM_para_element {
52	unsigned char		QoS_info;
53	unsigned char		reserved;
54	struct AC_param	ac_param[4];
55}  __packed;
56
57struct ADDBA_request {
58	unsigned char		dialog_token;
59	unsigned short	BA_para_set;
60	unsigned short	BA_timeout_value;
61	unsigned short	BA_starting_seqctrl;
62}  __packed;
63
64
65/*	===============WPS Section=============== */
66/*	WPS attribute ID */
67#define WPS_ATTR_VER1				0x104A
68#define WPS_ATTR_SIMPLE_CONF_STATE		0x1044
69#define WPS_ATTR_RESP_TYPE			0x103B
70#define WPS_ATTR_UUID_E				0x1047
71#define WPS_ATTR_MANUFACTURER			0x1021
72#define WPS_ATTR_MODEL_NAME			0x1023
73#define WPS_ATTR_MODEL_NUMBER			0x1024
74#define WPS_ATTR_SERIAL_NUMBER			0x1042
75#define WPS_ATTR_PRIMARY_DEV_TYPE		0x1054
76#define WPS_ATTR_SEC_DEV_TYPE_LIST		0x1055
77#define WPS_ATTR_DEVICE_NAME			0x1011
78#define WPS_ATTR_CONF_METHOD			0x1008
79#define WPS_ATTR_RF_BANDS			0x103C
80#define WPS_ATTR_DEVICE_PWID			0x1012
81#define WPS_ATTR_REQUEST_TYPE			0x103A
82#define WPS_ATTR_ASSOCIATION_STATE		0x1002
83#define WPS_ATTR_CONFIG_ERROR			0x1009
84#define WPS_ATTR_VENDOR_EXT			0x1049
85#define WPS_ATTR_SELECTED_REGISTRAR		0x1041
86
87/*	WPS Configuration Method */
88#define	WPS_CM_NONE					0x0000
89#define	WPS_CM_LABEL					0x0004
90#define	WPS_CM_DISPLYA					0x0008
91#define	WPS_CM_EXTERNAL_NFC_TOKEN			0x0010
92#define	WPS_CM_INTEGRATED_NFC_TOKEN			0x0020
93#define	WPS_CM_NFC_INTERFACE				0x0040
94#define	WPS_CM_PUSH_BUTTON				0x0080
95#define	WPS_CM_KEYPAD					0x0100
96#define	WPS_CM_SW_PUHS_BUTTON				0x0280
97#define	WPS_CM_HW_PUHS_BUTTON				0x0480
98#define	WPS_CM_SW_DISPLAY_PIN				0x2008
99#define	WPS_CM_LCD_DISPLAY_PIN				0x4008
100
101#endif /*  _WIFI_H_ */
102