2 *************************************************************************
4 * 5F., No.36, Taiyuan St., Jhubei City,
8 * (c) Copyright 2002-2007, Ralink Technology, Inc.
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 * GNU General Public License for more details. *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, write to the *
22 * Free Software Foundation, Inc., *
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
25 *************************************************************************
31 Handle association related requests either from WSTA or from local MLME
35 --------- ---------- ----------------------------------------------
36 Fonchi Wu 2008 created for 802.11h
39 #ifndef __SPECTRUM_DEF_H__
40 #define __SPECTRUM_DEF_H__
42 #define MAX_MEASURE_REQ_TAB_SIZE 32
43 #define MAX_HASH_MEASURE_REQ_TAB_SIZE MAX_MEASURE_REQ_TAB_SIZE
45 #define MAX_TPC_REQ_TAB_SIZE 32
46 #define MAX_HASH_TPC_REQ_TAB_SIZE MAX_TPC_REQ_TAB_SIZE
48 #define MIN_RCV_PWR 100 /* Negative value ((dBm) */
50 #define TPC_REQ_AGE_OUT 500 /* ms */
51 #define MQ_REQ_AGE_OUT 500 /* ms */
53 #define TPC_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) % MAX_HASH_TPC_REQ_TAB_SIZE)
54 #define MQ_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) % MAX_MEASURE_REQ_TAB_SIZE)
56 typedef struct _MEASURE_REQ_ENTRY
{
57 struct _MEASURE_REQ_ENTRY
*pNext
;
61 UINT8 MeasureDialogToken
[3]; // 0:basic measure, 1: CCA measure, 2: RPI_Histogram measure.
62 } MEASURE_REQ_ENTRY
, *PMEASURE_REQ_ENTRY
;
64 typedef struct _MEASURE_REQ_TAB
{
66 PMEASURE_REQ_ENTRY Hash
[MAX_HASH_MEASURE_REQ_TAB_SIZE
];
67 MEASURE_REQ_ENTRY Content
[MAX_MEASURE_REQ_TAB_SIZE
];
68 } MEASURE_REQ_TAB
, *PMEASURE_REQ_TAB
;
70 typedef struct _TPC_REQ_ENTRY
{
71 struct _TPC_REQ_ENTRY
*pNext
;
75 } TPC_REQ_ENTRY
, *PTPC_REQ_ENTRY
;
77 typedef struct _TPC_REQ_TAB
{
79 PTPC_REQ_ENTRY Hash
[MAX_HASH_TPC_REQ_TAB_SIZE
];
80 TPC_REQ_ENTRY Content
[MAX_TPC_REQ_TAB_SIZE
];
81 } TPC_REQ_TAB
, *PTPC_REQ_TAB
;
83 /* The regulatory information */
84 typedef struct _DOT11_CHANNEL_SET
{
85 UCHAR NumberOfChannels
;
87 UCHAR ChannelList
[16];
88 } DOT11_CHANNEL_SET
, *PDOT11_CHANNEL_SET
;
90 typedef struct _DOT11_REGULATORY_INFORMATION
{
91 UCHAR RegulatoryClass
;
92 DOT11_CHANNEL_SET ChannelSet
;
93 } DOT11_REGULATORY_INFORMATION
, *PDOT11_REGULATORY_INFORMATION
;
96 #define RM_MEASURE_REQ 1
100 #define RM_RPI_HISTOGRAM 2
102 #define RM_NOISE_HISTOGRAM 4
104 typedef struct PACKED _TPC_REPORT_INFO
{
107 } TPC_REPORT_INFO
, *PTPC_REPORT_INFO
;
109 typedef struct PACKED _CH_SW_ANN_INFO
{
113 } CH_SW_ANN_INFO
, *PCH_SW_ANN_INFO
;
115 typedef union PACKED _MEASURE_REQ_MODE
{
121 UINT8 DurationMandatory
:1;
125 } MEASURE_REQ_MODE
, *PMEASURE_REQ_MODE
;
127 typedef struct PACKED _MEASURE_REQ
{
129 UINT64 MeasureStartTime
;
130 UINT16 MeasureDuration
;
131 } MEASURE_REQ
, *PMEASURE_REQ
;
133 typedef struct PACKED _MEASURE_REQ_INFO
{
135 MEASURE_REQ_MODE ReqMode
;
138 } MEASURE_REQ_INFO
, *PMEASURE_REQ_INFO
;
140 typedef union PACKED _MEASURE_BASIC_REPORT_MAP
{
144 UINT8 OfdmPreamble
:1;
145 UINT8 UnidentifiedSignal
:1;
151 } MEASURE_BASIC_REPORT_MAP
, *PMEASURE_BASIC_REPORT_MAP
;
153 typedef struct PACKED _MEASURE_BASIC_REPORT
{
155 UINT64 MeasureStartTime
;
156 UINT16 MeasureDuration
;
157 MEASURE_BASIC_REPORT_MAP Map
;
158 } MEASURE_BASIC_REPORT
, *PMEASURE_BASIC_REPORT
;
160 typedef struct PACKED _MEASURE_CCA_REPORT
{
162 UINT64 MeasureStartTime
;
163 UINT16 MeasureDuration
;
164 UINT8 CCA_Busy_Fraction
;
165 } MEASURE_CCA_REPORT
, *PMEASURE_CCA_REPORT
;
167 typedef struct PACKED _MEASURE_RPI_REPORT
{
169 UINT64 MeasureStartTime
;
170 UINT16 MeasureDuration
;
171 UINT8 RPI_Density
[8];
172 } MEASURE_RPI_REPORT
, *PMEASURE_RPI_REPORT
;
174 typedef union PACKED _MEASURE_REPORT_MODE
{
182 } MEASURE_REPORT_MODE
, *PMEASURE_REPORT_MODE
;
184 typedef struct PACKED _MEASURE_REPORT_INFO
{
189 } MEASURE_REPORT_INFO
, *PMEASURE_REPORT_INFO
;
191 typedef struct PACKED _QUIET_INFO
{
194 UINT16 QuietDuration
;
196 } QUIET_INFO
, *PQUIET_INFO
;
198 #endif // __SPECTRUM_DEF_H__ //