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
58 } MEASURE_REQ_MODE
, *PMEASURE_REQ_MODE
;
60 typedef struct PACKED _MEASURE_REQ
63 UINT64 MeasureStartTime
;
64 UINT16 MeasureDuration
;
65 } MEASURE_REQ
, *PMEASURE_REQ
;
67 typedef struct PACKED _MEASURE_REQ_INFO
70 MEASURE_REQ_MODE ReqMode
;
72 MEASURE_REQ MeasureReq
;
73 } MEASURE_REQ_INFO
, *PMEASURE_REQ_INFO
;
75 typedef union PACKED _MEASURE_BASIC_REPORT_MAP
81 UINT8 UnidentifiedSignal
:1;
87 } MEASURE_BASIC_REPORT_MAP
, *PMEASURE_BASIC_REPORT_MAP
;
89 typedef struct PACKED _MEASURE_BASIC_REPORT
92 UINT64 MeasureStartTime
;
93 UINT16 MeasureDuration
;
94 MEASURE_BASIC_REPORT_MAP Map
;
95 } MEASURE_BASIC_REPORT
, *PMEASURE_BASIC_REPORT
;
97 typedef struct PACKED _MEASURE_CCA_REPORT
100 UINT64 MeasureStartTime
;
101 UINT16 MeasureDuration
;
102 UINT8 CCA_Busy_Fraction
;
103 } MEASURE_CCA_REPORT
, *PMEASURE_CCA_REPORT
;
105 typedef struct PACKED _MEASURE_RPI_REPORT
108 UINT64 MeasureStartTime
;
109 UINT16 MeasureDuration
;
110 UINT8 RPI_Density
[8];
111 } MEASURE_RPI_REPORT
, *PMEASURE_RPI_REPORT
;
113 typedef union PACKED _MEASURE_REPORT_MODE
123 } MEASURE_REPORT_MODE
, *PMEASURE_REPORT_MODE
;
125 typedef struct PACKED _MEASURE_REPORT_INFO
128 MEASURE_REPORT_MODE ReportMode
;
131 } MEASURE_REPORT_INFO
, *PMEASURE_REPORT_INFO
;
133 typedef struct PACKED _QUIET_INFO
139 } QUIET_INFO
, *PQUIET_INFO
;
142 ==========================================================================
144 Prepare Measurement request action frame and enqueue it into
145 management queue waiting for transmition.
148 1. the destination mac address of the frame.
151 ==========================================================================
153 VOID
EnqueueMeasurementReq(
154 IN PRTMP_ADAPTER pAd
,
156 IN UINT8 MeasureToken
,
157 IN UINT8 MeasureReqMode
,
158 IN UINT8 MeasureReqType
,
160 IN UINT16 MeasureDuration
);
163 ==========================================================================
165 Prepare Measurement report action frame and enqueue it into
166 management queue waiting for transmition.
169 1. the destination mac address of the frame.
172 ==========================================================================
174 VOID
EnqueueMeasurementRep(
175 IN PRTMP_ADAPTER pAd
,
177 IN UINT8 DialogToken
,
178 IN UINT8 MeasureToken
,
179 IN UINT8 MeasureReqMode
,
180 IN UINT8 MeasureReqType
,
181 IN UINT8 ReportInfoLen
,
182 IN PUINT8 pReportInfo
);
185 ==========================================================================
187 Prepare TPC Request action frame and enqueue it into
188 management queue waiting for transmition.
191 1. the destination mac address of the frame.
194 ==========================================================================
197 IN PRTMP_ADAPTER pAd
,
199 IN UCHAR DialogToken
);
202 ==========================================================================
204 Prepare TPC Report action frame and enqueue it into
205 management queue waiting for transmition.
208 1. the destination mac address of the frame.
211 ==========================================================================
214 IN PRTMP_ADAPTER pAd
,
216 IN UINT8 DialogToken
,
218 IN UINT8 LinkMargin
);
221 ==========================================================================
223 Prepare Channel Switch Announcement action frame and enqueue it into
224 management queue waiting for transmition.
227 1. the destination mac address of the frame.
228 2. Channel switch announcement mode.
229 2. a New selected channel.
232 ==========================================================================
235 IN PRTMP_ADAPTER pAd
,
241 ==========================================================================
243 Spectrun action frames Handler such as channel switch annoucement,
244 measurement report, measurement request actions frames.
247 Elme - MLME message containing the received frame
250 ==========================================================================
252 VOID
PeerSpectrumAction(
253 IN PRTMP_ADAPTER pAd
,
254 IN MLME_QUEUE_ELEM
*Elem
);
257 ==========================================================================
263 ==========================================================================
265 INT
Set_MeasureReq_Proc(
266 IN PRTMP_ADAPTER pAd
,
270 IN PRTMP_ADAPTER pAd
,
273 VOID
MeasureReqTabInit(
274 IN PRTMP_ADAPTER pAd
);
276 VOID
MeasureReqTabExit(
277 IN PRTMP_ADAPTER pAd
);
280 IN PRTMP_ADAPTER pAd
);
283 IN PRTMP_ADAPTER pAd
);
285 VOID
NotifyChSwAnnToPeerAPs(
286 IN PRTMP_ADAPTER pAd
,
291 #endif // __SPECTRUM_H__ //