15449c685SForest Bond /* 25449c685SForest Bond * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. 35449c685SForest Bond * All rights reserved. 45449c685SForest Bond * 55449c685SForest Bond * This program is free software; you can redistribute it and/or modify 65449c685SForest Bond * it under the terms of the GNU General Public License as published by 75449c685SForest Bond * the Free Software Foundation; either version 2 of the License, or 85449c685SForest Bond * (at your option) any later version. 95449c685SForest Bond * 105449c685SForest Bond * This program is distributed in the hope that it will be useful, 115449c685SForest Bond * but WITHOUT ANY WARRANTY; without even the implied warranty of 125449c685SForest Bond * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 135449c685SForest Bond * GNU General Public License for more details. 145449c685SForest Bond * 155449c685SForest Bond * File: rf.h 165449c685SForest Bond * 175449c685SForest Bond * Purpose: 185449c685SForest Bond * 195449c685SForest Bond * Author: Jerry Chen 205449c685SForest Bond * 215449c685SForest Bond * Date: Feb. 19, 2004 225449c685SForest Bond * 235449c685SForest Bond */ 245449c685SForest Bond 255449c685SForest Bond #ifndef __RF_H__ 265449c685SForest Bond #define __RF_H__ 275449c685SForest Bond 285449c685SForest Bond #include "device.h" 29a7ad322aSJim Lieb 305449c685SForest Bond /*--------------------- Export Definitions -------------------------*/ 31353710ceSNicholas Parkanyi /* 32353710ceSNicholas Parkanyi * Baseband RF pair definition in eeprom (Bits 6..0) 33353710ceSNicholas Parkanyi */ 345449c685SForest Bond #define RF_RFMD2959 0x01 355449c685SForest Bond #define RF_MAXIMAG 0x02 365449c685SForest Bond #define RF_AIROHA 0x03 375449c685SForest Bond 385449c685SForest Bond #define RF_UW2451 0x05 395449c685SForest Bond #define RF_MAXIMG 0x06 40353710ceSNicholas Parkanyi #define RF_MAXIM2829 0x07 /* RobertYu: 20041118 */ 41353710ceSNicholas Parkanyi #define RF_UW2452 0x08 /* RobertYu: 20041210 */ 42353710ceSNicholas Parkanyi #define RF_AIROHA7230 0x0a /* RobertYu: 20050104 */ 435449c685SForest Bond #define RF_UW2453 0x0b 445449c685SForest Bond 455449c685SForest Bond #define RF_VT3226 0x09 465449c685SForest Bond #define RF_AL2230S 0x0e 475449c685SForest Bond 485449c685SForest Bond #define RF_NOTHING 0x7E 495449c685SForest Bond #define RF_EMU 0x80 505449c685SForest Bond #define RF_MASK 0x7F 515449c685SForest Bond 525449c685SForest Bond #define ZONE_FCC 0 535449c685SForest Bond #define ZONE_MKK1 1 545449c685SForest Bond #define ZONE_ETSI 2 555449c685SForest Bond #define ZONE_IC 3 565449c685SForest Bond #define ZONE_SPAIN 4 575449c685SForest Bond #define ZONE_FRANCE 5 585449c685SForest Bond #define ZONE_MKK 6 595449c685SForest Bond #define ZONE_ISRAEL 7 605449c685SForest Bond 61353710ceSNicholas Parkanyi /* [20050104] CB_MAXIM2829_CHANNEL_5G_HIGH, CB_UW2452_CHANNEL_5G_HIGH: 40==>41 */ 62353710ceSNicholas Parkanyi #define CB_MAXIM2829_CHANNEL_5G_HIGH 41 /* Index41: channel = 100, Tf = 5500MHz, set the (A3:A0=0101) D6=1 */ 63353710ceSNicholas Parkanyi #define CB_UW2452_CHANNEL_5G_HIGH 41 /* [20041210] Index41: channel = 100, Tf = 5500MHz, change VCO2->VCO3 */ 645449c685SForest Bond 655449c685SForest Bond /*--------------------- Export Classes ----------------------------*/ 665449c685SForest Bond 675449c685SForest Bond /*--------------------- Export Variables --------------------------*/ 685449c685SForest Bond 695449c685SForest Bond /*--------------------- Export Functions --------------------------*/ 705449c685SForest Bond 7124c8bd8fSDerek Robson bool IFRFbWriteEmbedded(struct vnt_private *priv, unsigned long dwData); 7224c8bd8fSDerek Robson bool RFbSelectChannel(struct vnt_private *priv, unsigned char byRFType, u16 byChannel); 737b6a0013SCharles Clément bool RFbInit( 7424c8bd8fSDerek Robson struct vnt_private *priv 755449c685SForest Bond ); 7624c8bd8fSDerek Robson bool RFvWriteWakeProgSyn(struct vnt_private *priv, unsigned char byRFType, u16 uChannel); 7724c8bd8fSDerek Robson bool RFbSetPower(struct vnt_private *priv, unsigned int rate, u16 uCH); 787b6a0013SCharles Clément bool RFbRawSetPower( 7924c8bd8fSDerek Robson struct vnt_private *priv, 803fc9b584SCharles Clément unsigned char byPwr, 81c1aa41dcSPaul McQuade unsigned int rate 825449c685SForest Bond ); 835449c685SForest Bond 846b35b7b3SCharles Clément void 855449c685SForest Bond RFvRSSITodBm( 8624c8bd8fSDerek Robson struct vnt_private *priv, 873fc9b584SCharles Clément unsigned char byCurrRSSI, 88a884847aSJim Lieb long *pldBm 895449c685SForest Bond ); 905449c685SForest Bond 91353710ceSNicholas Parkanyi /* {{ RobertYu: 20050104 */ 9224c8bd8fSDerek Robson bool RFbAL7230SelectChannelPostProcess(struct vnt_private *priv, u16 byOldChannel, u16 byNewChannel); 93353710ceSNicholas Parkanyi /* }} RobertYu */ 945449c685SForest Bond 95353710ceSNicholas Parkanyi #endif /* __RF_H__ */ 96