Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License along |
| 16 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | * |
| 19 | * |
| 20 | * File: rf.h |
| 21 | * |
| 22 | * Purpose: |
| 23 | * |
| 24 | * Author: Jerry Chen |
| 25 | * |
| 26 | * Date: Feb. 19, 2004 |
| 27 | * |
| 28 | */ |
| 29 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 30 | #ifndef __RF_H__ |
| 31 | #define __RF_H__ |
| 32 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 33 | #include "ttype.h" |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 34 | #include "device.h" |
Jim Lieb | a7ad322 | 2009-08-12 14:54:09 -0700 | [diff] [blame] | 35 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 36 | /*--------------------- Export Definitions -------------------------*/ |
| 37 | // |
| 38 | // Baseband RF pair definition in eeprom (Bits 6..0) |
| 39 | // |
| 40 | #define RF_RFMD2959 0x01 |
| 41 | #define RF_MAXIMAG 0x02 |
| 42 | #define RF_AIROHA 0x03 |
| 43 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 44 | #define RF_UW2451 0x05 |
| 45 | #define RF_MAXIMG 0x06 |
| 46 | #define RF_MAXIM2829 0x07 // RobertYu: 20041118 |
| 47 | #define RF_UW2452 0x08 // RobertYu: 20041210 |
| 48 | #define RF_AIROHA7230 0x0a // RobertYu: 20050104 |
| 49 | #define RF_UW2453 0x0b |
| 50 | |
| 51 | #define RF_VT3226 0x09 |
| 52 | #define RF_AL2230S 0x0e |
| 53 | |
| 54 | #define RF_NOTHING 0x7E |
| 55 | #define RF_EMU 0x80 |
| 56 | #define RF_MASK 0x7F |
| 57 | |
| 58 | #define ZONE_FCC 0 |
| 59 | #define ZONE_MKK1 1 |
| 60 | #define ZONE_ETSI 2 |
| 61 | #define ZONE_IC 3 |
| 62 | #define ZONE_SPAIN 4 |
| 63 | #define ZONE_FRANCE 5 |
| 64 | #define ZONE_MKK 6 |
| 65 | #define ZONE_ISRAEL 7 |
| 66 | |
| 67 | //[20050104] CB_MAXIM2829_CHANNEL_5G_HIGH, CB_UW2452_CHANNEL_5G_HIGH: 40==>41 |
| 68 | #define CB_MAXIM2829_CHANNEL_5G_HIGH 41 //Index41: channel = 100, Tf = 5500MHz, set the (A3:A0=0101) D6=1 |
| 69 | #define CB_UW2452_CHANNEL_5G_HIGH 41 //[20041210] Index41: channel = 100, Tf = 5500MHz, change VCO2->VCO3 |
| 70 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 71 | /*--------------------- Export Classes ----------------------------*/ |
| 72 | |
| 73 | /*--------------------- Export Variables --------------------------*/ |
| 74 | |
| 75 | /*--------------------- Export Functions --------------------------*/ |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 76 | |
Guillaume Clement | 1683440 | 2014-07-22 22:08:26 +0200 | [diff] [blame] | 77 | bool IFRFbWriteEmbedded(void __iomem *dwIoBase, unsigned long dwData); |
| 78 | bool RFbSelectChannel(void __iomem *dwIoBase, unsigned char byRFType, unsigned char byChannel); |
Joe Perches | 3bd1996 | 2013-03-18 10:45:00 -0700 | [diff] [blame] | 79 | bool RFbInit( |
Malcolm Priestley | 6af4336 | 2014-08-10 15:47:01 +0100 | [diff] [blame] | 80 | struct vnt_private * |
Joe Perches | 3bd1996 | 2013-03-18 10:45:00 -0700 | [diff] [blame] | 81 | ); |
Guillaume Clement | 1683440 | 2014-07-22 22:08:26 +0200 | [diff] [blame] | 82 | bool RFvWriteWakeProgSyn(void __iomem *dwIoBase, unsigned char byRFType, unsigned int uChannel); |
Malcolm Priestley | 6af4336 | 2014-08-10 15:47:01 +0100 | [diff] [blame] | 83 | bool RFbSetPower(struct vnt_private *, unsigned int uRATE, unsigned int uCH); |
Charles Clément | 7b6a001 | 2010-08-01 17:15:50 +0200 | [diff] [blame] | 84 | bool RFbRawSetPower( |
Malcolm Priestley | 6af4336 | 2014-08-10 15:47:01 +0100 | [diff] [blame] | 85 | struct vnt_private *, |
Joe Perches | 3bd1996 | 2013-03-18 10:45:00 -0700 | [diff] [blame] | 86 | unsigned char byPwr, |
| 87 | unsigned int uRATE |
| 88 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 89 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 90 | void |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 91 | RFvRSSITodBm( |
Malcolm Priestley | 6af4336 | 2014-08-10 15:47:01 +0100 | [diff] [blame] | 92 | struct vnt_private *, |
Joe Perches | 3bd1996 | 2013-03-18 10:45:00 -0700 | [diff] [blame] | 93 | unsigned char byCurrRSSI, |
| 94 | long *pldBm |
| 95 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 96 | |
| 97 | //{{ RobertYu: 20050104 |
Guillaume Clement | 1683440 | 2014-07-22 22:08:26 +0200 | [diff] [blame] | 98 | bool RFbAL7230SelectChannelPostProcess(void __iomem *dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 99 | //}} RobertYu |
| 100 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 101 | #endif // __RF_H__ |