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__
43 #define MAX_MEASURE_REQ_TAB_SIZE 32
44 #define MAX_HASH_MEASURE_REQ_TAB_SIZE MAX_MEASURE_REQ_TAB_SIZE
46 #define MAX_TPC_REQ_TAB_SIZE 32
47 #define MAX_HASH_TPC_REQ_TAB_SIZE MAX_TPC_REQ_TAB_SIZE
49 #define MIN_RCV_PWR 100 /* Negative value ((dBm) */
51 #define TPC_REQ_AGE_OUT 500 /* ms */
52 #define MQ_REQ_AGE_OUT 500 /* ms */
54 #define TPC_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) % MAX_HASH_TPC_REQ_TAB_SIZE)
55 #define MQ_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) % MAX_MEASURE_REQ_TAB_SIZE)
57 typedef struct _MEASURE_REQ_ENTRY
59 struct _MEASURE_REQ_ENTRY
*pNext
;
63 UINT8 MeasureDialogToken
[3]; // 0:basic measure, 1: CCA measure, 2: RPI_Histogram measure.
64 } MEASURE_REQ_ENTRY
, *PMEASURE_REQ_ENTRY
;
66 typedef struct _MEASURE_REQ_TAB
69 PMEASURE_REQ_ENTRY Hash
[MAX_HASH_MEASURE_REQ_TAB_SIZE
];
70 MEASURE_REQ_ENTRY Content
[MAX_MEASURE_REQ_TAB_SIZE
];
71 } MEASURE_REQ_TAB
, *PMEASURE_REQ_TAB
;
73 typedef struct _TPC_REQ_ENTRY
75 struct _TPC_REQ_ENTRY
*pNext
;
79 } TPC_REQ_ENTRY
, *PTPC_REQ_ENTRY
;
81 typedef struct _TPC_REQ_TAB
84 PTPC_REQ_ENTRY Hash
[MAX_HASH_TPC_REQ_TAB_SIZE
];
85 TPC_REQ_ENTRY Content
[MAX_TPC_REQ_TAB_SIZE
];
86 } TPC_REQ_TAB
, *PTPC_REQ_TAB
;
89 /* The regulatory information */
90 typedef struct _DOT11_CHANNEL_SET
92 UCHAR NumberOfChannels
;
94 UCHAR ChannelList
[16];
95 } DOT11_CHANNEL_SET
, *PDOT11_CHANNEL_SET
;
97 typedef struct _DOT11_REGULATORY_INFORMATION
99 UCHAR RegulatoryClass
;
100 DOT11_CHANNEL_SET ChannelSet
;
101 } DOT11_REGULATORY_INFORMATION
, *PDOT11_REGULATORY_INFORMATION
;
106 #define RM_MEASURE_REQ 1
110 #define RM_RPI_HISTOGRAM 2
112 #define RM_NOISE_HISTOGRAM 4
115 typedef struct PACKED _TPC_REPORT_INFO
119 } TPC_REPORT_INFO
, *PTPC_REPORT_INFO
;
121 typedef struct PACKED _CH_SW_ANN_INFO
126 } CH_SW_ANN_INFO
, *PCH_SW_ANN_INFO
;
128 typedef union PACKED _MEASURE_REQ_MODE
135 UINT8 DurationMandatory
:1;
148 UINT8 DurationMandatory
:1;
151 #endif // RT_BIG_ENDIAN //
153 } MEASURE_REQ_MODE
, *PMEASURE_REQ_MODE
;
155 typedef struct PACKED _MEASURE_REQ
158 UINT64 MeasureStartTime
;
159 UINT16 MeasureDuration
;
160 } MEASURE_REQ
, *PMEASURE_REQ
;
162 typedef struct PACKED _MEASURE_REQ_INFO
165 MEASURE_REQ_MODE ReqMode
;
168 } MEASURE_REQ_INFO
, *PMEASURE_REQ_INFO
;
170 typedef union PACKED _MEASURE_BASIC_REPORT_MAP
179 UINT8 UnidentifiedSignal
:1;
180 UINT8 OfdmPreamble
:1;
188 UINT8 OfdmPreamble
:1;
189 UINT8 UnidentifiedSignal
:1;
194 #endif // RT_BIG_ENDIAN //
196 } MEASURE_BASIC_REPORT_MAP
, *PMEASURE_BASIC_REPORT_MAP
;
198 typedef struct PACKED _MEASURE_BASIC_REPORT
201 UINT64 MeasureStartTime
;
202 UINT16 MeasureDuration
;
203 MEASURE_BASIC_REPORT_MAP Map
;
204 } MEASURE_BASIC_REPORT
, *PMEASURE_BASIC_REPORT
;
206 typedef struct PACKED _MEASURE_CCA_REPORT
209 UINT64 MeasureStartTime
;
210 UINT16 MeasureDuration
;
211 UINT8 CCA_Busy_Fraction
;
212 } MEASURE_CCA_REPORT
, *PMEASURE_CCA_REPORT
;
214 typedef struct PACKED _MEASURE_RPI_REPORT
217 UINT64 MeasureStartTime
;
218 UINT16 MeasureDuration
;
219 UINT8 RPI_Density
[8];
220 } MEASURE_RPI_REPORT
, *PMEASURE_RPI_REPORT
;
222 typedef union PACKED _MEASURE_REPORT_MODE
236 #endif // RT_BIG_ENDIAN //
239 } MEASURE_REPORT_MODE
, *PMEASURE_REPORT_MODE
;
241 typedef struct PACKED _MEASURE_REPORT_INFO
247 } MEASURE_REPORT_INFO
, *PMEASURE_REPORT_INFO
;
249 typedef struct PACKED _QUIET_INFO
253 UINT16 QuietDuration
;
255 } QUIET_INFO
, *PQUIET_INFO
;
257 #endif // __SPECTRUM_DEF_H__ //