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 char RTMP_GetTxPwr(struct rt_rtmp_adapter
*pAd
, IN HTTRANSMIT_SETTING HTTxMode
);
37 ==========================================================================
39 Prepare Measurement request action frame and enqueue it into
40 management queue waiting for transmition.
43 1. the destination mac address of the frame.
46 ==========================================================================
48 void MakeMeasurementReqFrame(struct rt_rtmp_adapter
*pAd
,
50 unsigned long *pFrameLen
,
60 ==========================================================================
62 Prepare Measurement report action frame and enqueue it into
63 management queue waiting for transmition.
66 1. the destination mac address of the frame.
69 ==========================================================================
71 void EnqueueMeasurementRep(struct rt_rtmp_adapter
*pAd
,
77 u8 ReportInfoLen
, u8
*pReportInfo
);
80 ==========================================================================
82 Prepare TPC Request action frame and enqueue it into
83 management queue waiting for transmition.
86 1. the destination mac address of the frame.
89 ==========================================================================
91 void EnqueueTPCReq(struct rt_rtmp_adapter
*pAd
, u8
*pDA
, u8 DialogToken
);
94 ==========================================================================
96 Prepare TPC Report action frame and enqueue it into
97 management queue waiting for transmition.
100 1. the destination mac address of the frame.
103 ==========================================================================
105 void EnqueueTPCRep(struct rt_rtmp_adapter
*pAd
,
107 u8 DialogToken
, u8 TxPwr
, u8 LinkMargin
);
110 ==========================================================================
112 Prepare Channel Switch Announcement action frame and enqueue it into
113 management queue waiting for transmition.
116 1. the destination mac address of the frame.
117 2. Channel switch announcement mode.
118 2. a New selected channel.
121 ==========================================================================
123 void EnqueueChSwAnn(struct rt_rtmp_adapter
*pAd
,
124 u8
*pDA
, u8 ChSwMode
, u8 NewCh
);
127 ==========================================================================
129 Spectrun action frames Handler such as channel switch annoucement,
130 measurement report, measurement request actions frames.
133 Elme - MLME message containing the received frame
136 ==========================================================================
138 void PeerSpectrumAction(struct rt_rtmp_adapter
*pAd
, struct rt_mlme_queue_elem
*Elem
);
141 ==========================================================================
147 ==========================================================================
149 int Set_MeasureReq_Proc(struct rt_rtmp_adapter
*pAd
, char *arg
);
151 int Set_TpcReq_Proc(struct rt_rtmp_adapter
*pAd
, char *arg
);
153 int Set_PwrConstraint(struct rt_rtmp_adapter
*pAd
, char *arg
);
155 void MeasureReqTabInit(struct rt_rtmp_adapter
*pAd
);
157 void MeasureReqTabExit(struct rt_rtmp_adapter
*pAd
);
159 struct rt_measure_req_entry
*MeasureReqLookUp(struct rt_rtmp_adapter
*pAd
, u8 DialogToken
);
161 struct rt_measure_req_entry
*MeasureReqInsert(struct rt_rtmp_adapter
*pAd
, u8 DialogToken
);
163 void MeasureReqDelete(struct rt_rtmp_adapter
*pAd
, u8 DialogToken
);
165 void InsertChannelRepIE(struct rt_rtmp_adapter
*pAd
,
167 unsigned long *pFrameLen
,
168 char *pCountry
, u8 RegulatoryClass
);
170 void InsertTpcReportIE(struct rt_rtmp_adapter
*pAd
,
172 unsigned long *pFrameLen
,
173 u8 TxPwr
, u8 LinkMargin
);
175 void InsertDialogToken(struct rt_rtmp_adapter
*pAd
,
177 unsigned long *pFrameLen
, u8 DialogToken
);
179 void TpcReqTabInit(struct rt_rtmp_adapter
*pAd
);
181 void TpcReqTabExit(struct rt_rtmp_adapter
*pAd
);
183 void NotifyChSwAnnToPeerAPs(struct rt_rtmp_adapter
*pAd
,
185 u8
*pTA
, u8 ChSwMode
, u8 Channel
);
187 void RguClass_BuildBcnChList(struct rt_rtmp_adapter
*pAd
,
188 u8
*pBuf
, unsigned long *pBufLen
);
189 #endif /* __SPECTRUM_H__ // */