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 *************************************************************************
28 #ifndef __SPECTRUM_H__
29 #define __SPECTRUM_H__
31 #include "rtmp_type.h"
32 #include "spectrum_def.h"
34 typedef struct PACKED _TPC_REPORT_INFO
38 } TPC_REPORT_INFO, *PTPC_REPORT_INFO;
40 typedef struct PACKED _CH_SW_ANN_INFO
45 } CH_SW_ANN_INFO, *PCH_SW_ANN_INFO;
47 typedef union PACKED _MEASURE_REQ_MODE
67 #endif // RT_BIG_ENDIAN //
69 } MEASURE_REQ_MODE, *PMEASURE_REQ_MODE;
71 typedef struct PACKED _MEASURE_REQ
74 UINT64 MeasureStartTime;
75 UINT16 MeasureDuration;
76 } MEASURE_REQ, *PMEASURE_REQ;
78 typedef struct PACKED _MEASURE_REQ_INFO
81 MEASURE_REQ_MODE ReqMode;
83 MEASURE_REQ MeasureReq;
84 } MEASURE_REQ_INFO, *PMEASURE_REQ_INFO;
86 typedef union PACKED _MEASURE_BASIC_REPORT_MAP
94 UINT8 UnidentifiedSignal:1;
102 UINT8 OfdmPreamble:1;
103 UINT8 UnidentifiedSignal:1;
108 #endif // RT_BIG_ENDIAN //
110 } MEASURE_BASIC_REPORT_MAP, *PMEASURE_BASIC_REPORT_MAP;
112 typedef struct PACKED _MEASURE_BASIC_REPORT
115 UINT64 MeasureStartTime;
116 UINT16 MeasureDuration;
117 MEASURE_BASIC_REPORT_MAP Map;
118 } MEASURE_BASIC_REPORT, *PMEASURE_BASIC_REPORT;
120 typedef struct PACKED _MEASURE_CCA_REPORT
123 UINT64 MeasureStartTime;
124 UINT16 MeasureDuration;
125 UINT8 CCA_Busy_Fraction;
126 } MEASURE_CCA_REPORT, *PMEASURE_CCA_REPORT;
128 typedef struct PACKED _MEASURE_RPI_REPORT
131 UINT64 MeasureStartTime;
132 UINT16 MeasureDuration;
133 UINT8 RPI_Density[8];
134 } MEASURE_RPI_REPORT, *PMEASURE_RPI_REPORT;
136 typedef union PACKED _MEASURE_REPORT_MODE
150 #endif // RT_BIG_ENDIAN //
153 } MEASURE_REPORT_MODE, *PMEASURE_REPORT_MODE;
155 typedef struct PACKED _MEASURE_REPORT_INFO
158 MEASURE_REPORT_MODE ReportMode;
161 } MEASURE_REPORT_INFO, *PMEASURE_REPORT_INFO;
163 typedef struct PACKED _QUIET_INFO
169 } QUIET_INFO, *PQUIET_INFO;
172 ==========================================================================
174 Prepare Measurement request action frame and enqueue it into
175 management queue waiting for transmition.
178 1. the destination mac address of the frame.
181 ==========================================================================
183 VOID EnqueueMeasurementReq(
184 IN PRTMP_ADAPTER pAd,
186 IN UINT8 MeasureToken,
187 IN UINT8 MeasureReqMode,
188 IN UINT8 MeasureReqType,
190 IN UINT16 MeasureDuration);
193 ==========================================================================
195 Prepare Measurement report action frame and enqueue it into
196 management queue waiting for transmition.
199 1. the destination mac address of the frame.
202 ==========================================================================
204 VOID EnqueueMeasurementRep(
205 IN PRTMP_ADAPTER pAd,
207 IN UINT8 DialogToken,
208 IN UINT8 MeasureToken,
209 IN UINT8 MeasureReqMode,
210 IN UINT8 MeasureReqType,
211 IN UINT8 ReportInfoLen,
212 IN PUINT8 pReportInfo);
215 ==========================================================================
217 Prepare TPC Request action frame and enqueue it into
218 management queue waiting for transmition.
221 1. the destination mac address of the frame.
224 ==========================================================================
227 IN PRTMP_ADAPTER pAd,
229 IN UCHAR DialogToken);
232 ==========================================================================
234 Prepare TPC Report action frame and enqueue it into
235 management queue waiting for transmition.
238 1. the destination mac address of the frame.
241 ==========================================================================
244 IN PRTMP_ADAPTER pAd,
246 IN UINT8 DialogToken,
248 IN UINT8 LinkMargin);
251 ==========================================================================
253 Prepare Channel Switch Announcement action frame and enqueue it into
254 management queue waiting for transmition.
257 1. the destination mac address of the frame.
258 2. Channel switch announcement mode.
259 2. a New selected channel.
262 ==========================================================================
265 IN PRTMP_ADAPTER pAd,
271 ==========================================================================
273 Spectrun action frames Handler such as channel switch annoucement,
274 measurement report, measurement request actions frames.
277 Elme - MLME message containing the received frame
280 ==========================================================================
282 VOID PeerSpectrumAction(
283 IN PRTMP_ADAPTER pAd,
284 IN MLME_QUEUE_ELEM *Elem);
287 ==========================================================================
293 ==========================================================================
295 INT Set_MeasureReq_Proc(
296 IN PRTMP_ADAPTER pAd,
300 IN PRTMP_ADAPTER pAd,
303 VOID MeasureReqTabInit(
304 IN PRTMP_ADAPTER pAd);
306 VOID MeasureReqTabExit(
307 IN PRTMP_ADAPTER pAd);
310 IN PRTMP_ADAPTER pAd);
313 IN PRTMP_ADAPTER pAd);
315 VOID NotifyChSwAnnToPeerAPs(
316 IN PRTMP_ADAPTER pAd,
321 #endif // __SPECTRUM_H__ //