Archived
14
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/staging/rt2860/spectrum_def.h

226 lines
5.6 KiB
C
Raw Normal View History

/*
*************************************************************************
* Ralink Tech Inc.
* 5F., No.36, Taiyuan St., Jhubei City,
* Hsinchu County 302,
* Taiwan, R.O.C.
*
* (c) Copyright 2002-2007, Ralink Technology, Inc.
*
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
*************************************************************************
Module Name:
spectrum_def.h
Abstract:
Handle association related requests either from WSTA or from local MLME
Revision History:
Who When What
--------- ---------- ----------------------------------------------
Fonchi Wu 2008 created for 802.11h
*/
#ifndef __SPECTRUM_DEF_H__
#define __SPECTRUM_DEF_H__
Staging: rt28x0: updates from vendor's V2.1.0.0 drivers Port changes from: * 2009_0420_RT2860_Linux_STA_V2.1.0.0 * 2009_0302_RT2870_Linux_STA_v2.1.0.0 * 2009_0525_RT3070_Linux_STA_v2.1.1.0 to in-kernel drivers. From the RT2860 driver release note: [2.1.0.0] 1. New generation schema for multiple OS porting 2. Fixed Ad-hoc ping failed in noisy environment. (Probe Response has too many retry packet then cause "not enough space in MgmtRing") 3. Fixed WPA(2)PSK issue when group cipher of AP is WEP40 or WEP104. 4. Modified iwpriv ra0 get_site_survey: In scan list result: Security shows "NONE" when AP is OPEN/NONE, shows "WEP" when AP is OPEN/WEP or SHARED/WEP, shows "WPAPSK(WPA2PSK)/TKIP(AES)" when AP is WPAPSK(WPA2PSK)/TKIP(AES) shows "WPA(WPA2)/TKIP(AES)" when AP is WPA(WPA2)/TKIP(AES) 5. Support kthread. 6. Add New A band channel list region 15 contains the whole channels in the A band region 4 and the new CE channel 167,169,171,173 7. Add New IEEE802.11r functionality. 8. Fixed WPA2-Enterprise failed when AP reboot or turn off then turn on. 9. Fixed STA cannot connect to 11B only AP when the setting of is PHY_11GN. From the RT2870 driver release note: [V2.1.0.0] 1. New generation schema for multiple OS porting. 2. Fixed Ad-hoc ping failed in noisy environment. (Probe Response has too many retry packet then cause "not enough space in MgmtRing"). 3. Fixed WPS failed with D-Link DIR-628 in 5GHz. 4. Change FastRoaming in DAT file to AutoRoaming. 5. Support kthread. 6. Add New A band channel list region 15 contains the whole channels in the A band region and the new CE channel 167,169,171,173. 7. New IEEE802.11r functionality. From the RT3070 driver release note: Version V2.1.1.0 1. Linux kernel 2.6.29 support. 2. Fix eFuse write from BIN file bug. Version 2.1.0.0 1. New generation schema for multiple OS porting 2. Fixed Ad-hoc ping failed in noisy environment. 3. Modified iwpriv ra0 get_site_survey: 4. Change FastRoaming in DAT file to AutoRoaming. 5. Support kthread. 6. New IEEE802.11r functionality. Tested with RT2860 and RT3070 chipsets. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-22 18:44:07 +00:00
#define MAX_MEASURE_REQ_TAB_SIZE 32
#define MAX_HASH_MEASURE_REQ_TAB_SIZE MAX_MEASURE_REQ_TAB_SIZE
Staging: rt28x0: updates from vendor's V2.1.0.0 drivers Port changes from: * 2009_0420_RT2860_Linux_STA_V2.1.0.0 * 2009_0302_RT2870_Linux_STA_v2.1.0.0 * 2009_0525_RT3070_Linux_STA_v2.1.1.0 to in-kernel drivers. From the RT2860 driver release note: [2.1.0.0] 1. New generation schema for multiple OS porting 2. Fixed Ad-hoc ping failed in noisy environment. (Probe Response has too many retry packet then cause "not enough space in MgmtRing") 3. Fixed WPA(2)PSK issue when group cipher of AP is WEP40 or WEP104. 4. Modified iwpriv ra0 get_site_survey: In scan list result: Security shows "NONE" when AP is OPEN/NONE, shows "WEP" when AP is OPEN/WEP or SHARED/WEP, shows "WPAPSK(WPA2PSK)/TKIP(AES)" when AP is WPAPSK(WPA2PSK)/TKIP(AES) shows "WPA(WPA2)/TKIP(AES)" when AP is WPA(WPA2)/TKIP(AES) 5. Support kthread. 6. Add New A band channel list region 15 contains the whole channels in the A band region 4 and the new CE channel 167,169,171,173 7. Add New IEEE802.11r functionality. 8. Fixed WPA2-Enterprise failed when AP reboot or turn off then turn on. 9. Fixed STA cannot connect to 11B only AP when the setting of is PHY_11GN. From the RT2870 driver release note: [V2.1.0.0] 1. New generation schema for multiple OS porting. 2. Fixed Ad-hoc ping failed in noisy environment. (Probe Response has too many retry packet then cause "not enough space in MgmtRing"). 3. Fixed WPS failed with D-Link DIR-628 in 5GHz. 4. Change FastRoaming in DAT file to AutoRoaming. 5. Support kthread. 6. Add New A band channel list region 15 contains the whole channels in the A band region and the new CE channel 167,169,171,173. 7. New IEEE802.11r functionality. From the RT3070 driver release note: Version V2.1.1.0 1. Linux kernel 2.6.29 support. 2. Fix eFuse write from BIN file bug. Version 2.1.0.0 1. New generation schema for multiple OS porting 2. Fixed Ad-hoc ping failed in noisy environment. 3. Modified iwpriv ra0 get_site_survey: 4. Change FastRoaming in DAT file to AutoRoaming. 5. Support kthread. 6. New IEEE802.11r functionality. Tested with RT2860 and RT3070 chipsets. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-22 18:44:07 +00:00
#define MAX_TPC_REQ_TAB_SIZE 32
#define MAX_HASH_TPC_REQ_TAB_SIZE MAX_TPC_REQ_TAB_SIZE
#define MIN_RCV_PWR 100 /* Negative value ((dBm) */
#define TPC_REQ_AGE_OUT 500 /* ms */
#define MQ_REQ_AGE_OUT 500 /* ms */
#define TPC_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) % MAX_HASH_TPC_REQ_TAB_SIZE)
#define MQ_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) % MAX_MEASURE_REQ_TAB_SIZE)
typedef struct _MEASURE_REQ_ENTRY
{
struct _MEASURE_REQ_ENTRY *pNext;
ULONG lastTime;
BOOLEAN Valid;
UINT8 DialogToken;
UINT8 MeasureDialogToken[3]; // 0:basic measure, 1: CCA measure, 2: RPI_Histogram measure.
} MEASURE_REQ_ENTRY, *PMEASURE_REQ_ENTRY;
typedef struct _MEASURE_REQ_TAB
{
UCHAR Size;
PMEASURE_REQ_ENTRY Hash[MAX_HASH_MEASURE_REQ_TAB_SIZE];
MEASURE_REQ_ENTRY Content[MAX_MEASURE_REQ_TAB_SIZE];
} MEASURE_REQ_TAB, *PMEASURE_REQ_TAB;
typedef struct _TPC_REQ_ENTRY
{
struct _TPC_REQ_ENTRY *pNext;
ULONG lastTime;
BOOLEAN Valid;
UINT8 DialogToken;
} TPC_REQ_ENTRY, *PTPC_REQ_ENTRY;
typedef struct _TPC_REQ_TAB
{
UCHAR Size;
PTPC_REQ_ENTRY Hash[MAX_HASH_TPC_REQ_TAB_SIZE];
TPC_REQ_ENTRY Content[MAX_TPC_REQ_TAB_SIZE];
} TPC_REQ_TAB, *PTPC_REQ_TAB;
Staging: rt28x0: updates from vendor's V2.1.0.0 drivers Port changes from: * 2009_0420_RT2860_Linux_STA_V2.1.0.0 * 2009_0302_RT2870_Linux_STA_v2.1.0.0 * 2009_0525_RT3070_Linux_STA_v2.1.1.0 to in-kernel drivers. From the RT2860 driver release note: [2.1.0.0] 1. New generation schema for multiple OS porting 2. Fixed Ad-hoc ping failed in noisy environment. (Probe Response has too many retry packet then cause "not enough space in MgmtRing") 3. Fixed WPA(2)PSK issue when group cipher of AP is WEP40 or WEP104. 4. Modified iwpriv ra0 get_site_survey: In scan list result: Security shows "NONE" when AP is OPEN/NONE, shows "WEP" when AP is OPEN/WEP or SHARED/WEP, shows "WPAPSK(WPA2PSK)/TKIP(AES)" when AP is WPAPSK(WPA2PSK)/TKIP(AES) shows "WPA(WPA2)/TKIP(AES)" when AP is WPA(WPA2)/TKIP(AES) 5. Support kthread. 6. Add New A band channel list region 15 contains the whole channels in the A band region 4 and the new CE channel 167,169,171,173 7. Add New IEEE802.11r functionality. 8. Fixed WPA2-Enterprise failed when AP reboot or turn off then turn on. 9. Fixed STA cannot connect to 11B only AP when the setting of is PHY_11GN. From the RT2870 driver release note: [V2.1.0.0] 1. New generation schema for multiple OS porting. 2. Fixed Ad-hoc ping failed in noisy environment. (Probe Response has too many retry packet then cause "not enough space in MgmtRing"). 3. Fixed WPS failed with D-Link DIR-628 in 5GHz. 4. Change FastRoaming in DAT file to AutoRoaming. 5. Support kthread. 6. Add New A band channel list region 15 contains the whole channels in the A band region and the new CE channel 167,169,171,173. 7. New IEEE802.11r functionality. From the RT3070 driver release note: Version V2.1.1.0 1. Linux kernel 2.6.29 support. 2. Fix eFuse write from BIN file bug. Version 2.1.0.0 1. New generation schema for multiple OS porting 2. Fixed Ad-hoc ping failed in noisy environment. 3. Modified iwpriv ra0 get_site_survey: 4. Change FastRoaming in DAT file to AutoRoaming. 5. Support kthread. 6. New IEEE802.11r functionality. Tested with RT2860 and RT3070 chipsets. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-22 18:44:07 +00:00
/* The regulatory information */
typedef struct _DOT11_CHANNEL_SET
{
UCHAR NumberOfChannels;
UINT8 MaxTxPwr;
UCHAR ChannelList[16];
} DOT11_CHANNEL_SET, *PDOT11_CHANNEL_SET;
typedef struct _DOT11_REGULATORY_INFORMATION
{
UCHAR RegulatoryClass;
DOT11_CHANNEL_SET ChannelSet;
} DOT11_REGULATORY_INFORMATION, *PDOT11_REGULATORY_INFORMATION;
#define RM_TPC_REQ 0
#define RM_MEASURE_REQ 1
#define RM_BASIC 0
#define RM_CCA 1
#define RM_RPI_HISTOGRAM 2
#define RM_CH_LOAD 3
#define RM_NOISE_HISTOGRAM 4
typedef struct PACKED _TPC_REPORT_INFO
{
UINT8 TxPwr;
UINT8 LinkMargin;
} TPC_REPORT_INFO, *PTPC_REPORT_INFO;
typedef struct PACKED _CH_SW_ANN_INFO
{
UINT8 ChSwMode;
UINT8 Channel;
UINT8 ChSwCnt;
} CH_SW_ANN_INFO, *PCH_SW_ANN_INFO;
typedef union PACKED _MEASURE_REQ_MODE
{
struct PACKED
{
UINT8 Parallel:1;
UINT8 Enable:1;
UINT8 Request:1;
UINT8 Report:1;
UINT8 DurationMandatory:1;
UINT8 :3;
} field;
UINT8 word;
} MEASURE_REQ_MODE, *PMEASURE_REQ_MODE;
typedef struct PACKED _MEASURE_REQ
{
UINT8 ChNum;
UINT64 MeasureStartTime;
UINT16 MeasureDuration;
} MEASURE_REQ, *PMEASURE_REQ;
typedef struct PACKED _MEASURE_REQ_INFO
{
UINT8 Token;
MEASURE_REQ_MODE ReqMode;
UINT8 ReqType;
UINT8 Oct[0];
} MEASURE_REQ_INFO, *PMEASURE_REQ_INFO;
typedef union PACKED _MEASURE_BASIC_REPORT_MAP
{
struct PACKED
{
UINT8 BSS:1;
UINT8 OfdmPreamble:1;
UINT8 UnidentifiedSignal:1;
UINT8 Radar:1;
UINT8 Unmeasure:1;
UINT8 Rev:3;
} field;
UINT8 word;
} MEASURE_BASIC_REPORT_MAP, *PMEASURE_BASIC_REPORT_MAP;
typedef struct PACKED _MEASURE_BASIC_REPORT
{
UINT8 ChNum;
UINT64 MeasureStartTime;
UINT16 MeasureDuration;
MEASURE_BASIC_REPORT_MAP Map;
} MEASURE_BASIC_REPORT, *PMEASURE_BASIC_REPORT;
typedef struct PACKED _MEASURE_CCA_REPORT
{
UINT8 ChNum;
UINT64 MeasureStartTime;
UINT16 MeasureDuration;
UINT8 CCA_Busy_Fraction;
} MEASURE_CCA_REPORT, *PMEASURE_CCA_REPORT;
typedef struct PACKED _MEASURE_RPI_REPORT
{
UINT8 ChNum;
UINT64 MeasureStartTime;
UINT16 MeasureDuration;
UINT8 RPI_Density[8];
} MEASURE_RPI_REPORT, *PMEASURE_RPI_REPORT;
typedef union PACKED _MEASURE_REPORT_MODE
{
struct PACKED
{
UINT8 Late:1;
UINT8 Incapable:1;
UINT8 Refused:1;
UINT8 Rev:5;
} field;
UINT8 word;
} MEASURE_REPORT_MODE, *PMEASURE_REPORT_MODE;
typedef struct PACKED _MEASURE_REPORT_INFO
{
UINT8 Token;
UINT8 ReportMode;
UINT8 ReportType;
UINT8 Octect[0];
} MEASURE_REPORT_INFO, *PMEASURE_REPORT_INFO;
typedef struct PACKED _QUIET_INFO
{
UINT8 QuietCnt;
UINT8 QuietPeriod;
UINT16 QuietDuration;
UINT16 QuietOffset;
} QUIET_INFO, *PQUIET_INFO;
#endif // __SPECTRUM_DEF_H__ //