Linux 2.6.20.7
[linux/fpc-iii.git] / drivers / net / wireless / zd1211rw / zd_rf.h
blob676b3734f1edd96e673a4aa7efbbd9269d0c78e5
1 /* zd_rf.h
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 #ifndef _ZD_RF_H
19 #define _ZD_RF_H
21 #include "zd_types.h"
23 #define UW2451_RF 0x2
24 #define UCHIP_RF 0x3
25 #define AL2230_RF 0x4
26 #define AL7230B_RF 0x5 /* a,b,g */
27 #define THETA_RF 0x6
28 #define AL2210_RF 0x7
29 #define MAXIM_NEW_RF 0x8
30 #define UW2453_RF 0x9
31 #define AL2230S_RF 0xa
32 #define RALINK_RF 0xb
33 #define INTERSIL_RF 0xc
34 #define RF2959_RF 0xd
35 #define MAXIM_NEW2_RF 0xe
36 #define PHILIPS_RF 0xf
38 #define RF_CHANNEL(ch) [(ch)-1]
40 /* Provides functions of the RF transceiver. */
42 enum {
43 RF_REG_BITS = 6,
44 RF_VALUE_BITS = 18,
45 RF_RV_BITS = RF_REG_BITS + RF_VALUE_BITS,
48 struct zd_rf {
49 u8 type;
51 u8 channel;
53 * Whether this RF should patch the 6M band edge
54 * (assuming E2P_POD agrees)
56 u8 patch_6m_band_edge:1;
58 /* RF-specific functions */
59 int (*init_hw)(struct zd_rf *rf);
60 int (*set_channel)(struct zd_rf *rf, u8 channel);
61 int (*switch_radio_on)(struct zd_rf *rf);
62 int (*switch_radio_off)(struct zd_rf *rf);
65 const char *zd_rf_name(u8 type);
66 void zd_rf_init(struct zd_rf *rf);
67 void zd_rf_clear(struct zd_rf *rf);
68 int zd_rf_init_hw(struct zd_rf *rf, u8 type);
70 int zd_rf_scnprint_id(struct zd_rf *rf, char *buffer, size_t size);
72 int zd_rf_set_channel(struct zd_rf *rf, u8 channel);
74 int zd_switch_radio_on(struct zd_rf *rf);
75 int zd_switch_radio_off(struct zd_rf *rf);
77 /* Functions for individual RF chips */
79 int zd_rf_init_rf2959(struct zd_rf *rf);
80 int zd_rf_init_al2230(struct zd_rf *rf);
81 int zd_rf_init_al7230b(struct zd_rf *rf);
83 #endif /* _ZD_RF_H */