Staging: rspiusb: remove the driver
[safe/jmp/linux-2.6] / drivers / staging / rt3090 / spectrum.h
1 /*
2  *************************************************************************
3  * Ralink Tech Inc.
4  * 5F., No.36, Taiyuan St., Jhubei City,
5  * Hsinchu County 302,
6  * Taiwan, R.O.C.
7  *
8  * (c) Copyright 2002-2007, Ralink Technology, Inc.
9  *
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.                                   *
14  *                                                                       *
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.                          *
19  *                                                                       *
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.             *
24  *                                                                       *
25  *************************************************************************
26  */
27
28 #ifndef __SPECTRUM_H__
29 #define __SPECTRUM_H__
30
31 #include "rtmp_type.h"
32 #include "spectrum_def.h"
33
34
35 CHAR RTMP_GetTxPwr(
36         IN PRTMP_ADAPTER pAd,
37         IN HTTRANSMIT_SETTING HTTxMode);
38
39 /*
40         ==========================================================================
41         Description:
42                 Prepare Measurement request action frame and enqueue it into
43                 management queue waiting for transmition.
44
45         Parametrs:
46                 1. the destination mac address of the frame.
47
48         Return  : None.
49         ==========================================================================
50  */
51 VOID MakeMeasurementReqFrame(
52         IN PRTMP_ADAPTER pAd,
53         OUT PUCHAR pOutBuffer,
54         OUT PULONG pFrameLen,
55         IN UINT8 TotalLen,
56         IN UINT8 Category,
57         IN UINT8 Action,
58         IN UINT8 MeasureToken,
59         IN UINT8 MeasureReqMode,
60         IN UINT8 MeasureReqType,
61         IN UINT8 NumOfRepetitions);
62
63 /*
64         ==========================================================================
65         Description:
66                 Prepare Measurement report action frame and enqueue it into
67                 management queue waiting for transmition.
68
69         Parametrs:
70                 1. the destination mac address of the frame.
71
72         Return  : None.
73         ==========================================================================
74  */
75 VOID EnqueueMeasurementRep(
76         IN PRTMP_ADAPTER pAd,
77         IN PUCHAR pDA,
78         IN UINT8 DialogToken,
79         IN UINT8 MeasureToken,
80         IN UINT8 MeasureReqMode,
81         IN UINT8 MeasureReqType,
82         IN UINT8 ReportInfoLen,
83         IN PUINT8 pReportInfo);
84
85 /*
86         ==========================================================================
87         Description:
88                 Prepare TPC Request action frame and enqueue it into
89                 management queue waiting for transmition.
90
91         Parametrs:
92                 1. the destination mac address of the frame.
93
94         Return  : None.
95         ==========================================================================
96  */
97 VOID EnqueueTPCReq(
98         IN PRTMP_ADAPTER pAd,
99         IN PUCHAR pDA,
100         IN UCHAR DialogToken);
101
102 /*
103         ==========================================================================
104         Description:
105                 Prepare TPC Report action frame and enqueue it into
106                 management queue waiting for transmition.
107
108         Parametrs:
109                 1. the destination mac address of the frame.
110
111         Return  : None.
112         ==========================================================================
113  */
114 VOID EnqueueTPCRep(
115         IN PRTMP_ADAPTER pAd,
116         IN PUCHAR pDA,
117         IN UINT8 DialogToken,
118         IN UINT8 TxPwr,
119         IN UINT8 LinkMargin);
120
121 /*
122         ==========================================================================
123         Description:
124                 Prepare Channel Switch Announcement action frame and enqueue it into
125                 management queue waiting for transmition.
126
127         Parametrs:
128                 1. the destination mac address of the frame.
129                 2. Channel switch announcement mode.
130                 2. a New selected channel.
131
132         Return  : None.
133         ==========================================================================
134  */
135 VOID EnqueueChSwAnn(
136         IN PRTMP_ADAPTER pAd,
137         IN PUCHAR pDA,
138         IN UINT8 ChSwMode,
139         IN UINT8 NewCh);
140
141 /*
142         ==========================================================================
143         Description:
144                 Spectrun action frames Handler such as channel switch annoucement,
145                 measurement report, measurement request actions frames.
146
147         Parametrs:
148                 Elme - MLME message containing the received frame
149
150         Return  : None.
151         ==========================================================================
152  */
153 VOID PeerSpectrumAction(
154     IN PRTMP_ADAPTER pAd,
155     IN MLME_QUEUE_ELEM *Elem);
156
157 /*
158         ==========================================================================
159         Description:
160
161         Parametrs:
162
163         Return  : None.
164         ==========================================================================
165  */
166 INT Set_MeasureReq_Proc(
167         IN      PRTMP_ADAPTER   pAd,
168         IN      PSTRING                 arg);
169
170 INT Set_TpcReq_Proc(
171         IN      PRTMP_ADAPTER   pAd,
172         IN      PSTRING                 arg);
173
174 INT Set_PwrConstraint(
175         IN      PRTMP_ADAPTER   pAd,
176         IN      PSTRING                 arg);
177
178
179 VOID MeasureReqTabInit(
180         IN PRTMP_ADAPTER pAd);
181
182 VOID MeasureReqTabExit(
183         IN PRTMP_ADAPTER pAd);
184
185 PMEASURE_REQ_ENTRY MeasureReqLookUp(
186         IN PRTMP_ADAPTER        pAd,
187         IN UINT8                        DialogToken);
188
189 PMEASURE_REQ_ENTRY MeasureReqInsert(
190         IN PRTMP_ADAPTER        pAd,
191         IN UINT8                        DialogToken);
192
193 VOID MeasureReqDelete(
194         IN PRTMP_ADAPTER        pAd,
195         IN UINT8                        DialogToken);
196
197 VOID InsertChannelRepIE(
198         IN PRTMP_ADAPTER pAd,
199         OUT PUCHAR pFrameBuf,
200         OUT PULONG pFrameLen,
201         IN PSTRING pCountry,
202         IN UINT8 RegulatoryClass);
203
204 VOID InsertTpcReportIE(
205         IN PRTMP_ADAPTER pAd,
206         OUT PUCHAR pFrameBuf,
207         OUT PULONG pFrameLen,
208         IN UINT8 TxPwr,
209         IN UINT8 LinkMargin);
210
211 VOID InsertDialogToken(
212         IN PRTMP_ADAPTER pAd,
213         OUT PUCHAR pFrameBuf,
214         OUT PULONG pFrameLen,
215         IN UINT8 DialogToken);
216
217 VOID TpcReqTabInit(
218         IN PRTMP_ADAPTER pAd);
219
220 VOID TpcReqTabExit(
221         IN PRTMP_ADAPTER pAd);
222
223 VOID NotifyChSwAnnToPeerAPs(
224         IN PRTMP_ADAPTER pAd,
225         IN PUCHAR pRA,
226         IN PUCHAR pTA,
227         IN UINT8 ChSwMode,
228         IN UINT8 Channel);
229
230 VOID RguClass_BuildBcnChList(
231         IN PRTMP_ADAPTER pAd,
232         OUT PUCHAR pBuf,
233         OUT     PULONG pBufLen);
234 #endif // __SPECTRUM_H__ //