blob: c3d4f06d65f4405adccb97596329084cc81fa846 [file] [log] [blame]
Forest Bond92b96792009-06-13 07:38:31 -04001/*
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 *
Forest Bond92b96792009-06-13 07:38:31 -040015 *
16 * File: rf.h
17 *
18 * Purpose:
19 *
20 * Author: Jerry Chen
21 *
22 * Date: Feb. 19, 2004
23 *
24 */
25
Forest Bond92b96792009-06-13 07:38:31 -040026#ifndef __RF_H__
27#define __RF_H__
28
Forest Bond92b96792009-06-13 07:38:31 -040029#include "device.h"
Jim Lieb9d26d602009-08-12 14:54:08 -070030
Malcolm Priestleye96caf32014-07-25 20:51:56 +010031/* Baseband RF pair definition in eeprom (Bits 6..0) */
Forest Bond92b96792009-06-13 07:38:31 -040032#define RF_RFMD2959 0x01
33#define RF_MAXIMAG 0x02
34#define RF_AL2230 0x03
35#define RF_GCT5103 0x04
36#define RF_UW2451 0x05
37#define RF_MAXIMG 0x06
38#define RF_MAXIM2829 0x07
39#define RF_UW2452 0x08
40#define RF_VT3226 0x09
41#define RF_AIROHA7230 0x0a
42#define RF_UW2453 0x0b
Malcolm Priestleye96caf32014-07-25 20:51:56 +010043#define RF_VT3226D0 0x0c /* RobertYu:20051114 */
44#define RF_VT3342A0 0x0d /* RobertYu:20060609 */
Forest Bond92b96792009-06-13 07:38:31 -040045#define RF_AL2230S 0x0e
46
47#define RF_EMU 0x80
48#define RF_MASK 0x7F
49
Malcolm Priestleyf53d9f12014-05-17 09:50:18 +010050#define VNT_RF_MAX_POWER 0x3f
Malcolm Priestleyf1c840d2014-07-12 11:30:02 +010051#define VNT_RF_REG_LEN 0x17 /* 24 bit length */
Malcolm Priestleyf53d9f12014-05-17 09:50:18 +010052
Malcolm Priestley32c48cb2014-05-27 21:05:20 +010053int vnt_rf_write_embedded(struct vnt_private *, u32);
Malcolm Priestley4f5290e2014-05-27 21:05:21 +010054int vnt_rf_setpower(struct vnt_private *, u32, u32);
Malcolm Priestley8543bb92014-05-27 21:05:22 +010055int vnt_rf_set_txpower(struct vnt_private *, u8, u32);
Malcolm Priestley21bba582014-05-27 21:05:23 +010056void vnt_rf_rssi_to_dbm(struct vnt_private *, u8, long *);
Malcolm Priestleyc49d7552014-05-27 21:05:24 +010057void vnt_rf_table_download(struct vnt_private *);
Forest Bond92b96792009-06-13 07:38:31 -040058
Andres Moree7b07d12010-05-01 19:12:26 -030059#endif /* __RF_H__ */