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 *************************************************************************
34 -------- ---------- ----------------------------------------------
35 Fonchi Wu 2007-12-19 created
41 #include "rtmp_type.h"
55 char MaxTxPwr; /* dBm */
56 u8 Geography; /* 0:out door, 1:in door, 2:both */
57 BOOLEAN DfsReq; /* Dfs require, 0: No, 1: yes. */
62 u8 DfsType; /* 0: CE, 1: FCC, 2: JAP, 3:JAP_W53, JAP_W56 */
63 struct rt_ch_desp ChDesp[10];
66 extern struct rt_ch_region ChRegion[];
68 struct rt_ch_freq_map {
73 extern struct rt_ch_freq_map CH_HZ_ID_MAP[];
74 extern int CH_HZ_ID_MAP_NUM;
76 #define MAP_CHANNEL_ID_TO_KHZ(_ch, _khz) \
79 for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++)\
81 if ((_ch) == CH_HZ_ID_MAP[_chIdx].channel) \
83 (_khz) = CH_HZ_ID_MAP[_chIdx].freqKHz * 1000; \
87 if (_chIdx == CH_HZ_ID_MAP_NUM) \
91 #define MAP_KHZ_TO_CHANNEL_ID(_khz, _ch) \
94 for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++)\
96 if ((_khz) == CH_HZ_ID_MAP[_chIdx].freqKHz) \
98 (_ch) = CH_HZ_ID_MAP[_chIdx].channel; \
102 if (_chIdx == CH_HZ_ID_MAP_NUM) \
106 void BuildChannelListEx(struct rt_rtmp_adapter *pAd);
108 void BuildBeaconChList(struct rt_rtmp_adapter *pAd,
109 u8 *pBuf, unsigned long *pBufLen);
111 void N_ChannelCheck(struct rt_rtmp_adapter *pAd);
113 void N_SetCenCh(struct rt_rtmp_adapter *pAd);
115 u8 GetCuntryMaxTxPwr(struct rt_rtmp_adapter *pAd, u8 channel);
117 #endif /* __CHLIST_H__ */