2 * This file is part of wl1271
4 * Copyright (C) 2009 Nokia Corporation
6 * Contact: Luciano Coelho <luciano.coelho@nokia.com>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 #ifndef __WL1271_INIT_H__
25 #define __WL1271_INIT_H__
29 int wl1271_hw_init_power_auth(struct wl1271
*wl
);
30 int wl1271_hw_init(struct wl1271
*wl
);
32 /* These are not really a TEST_CMD, but the ref driver uses them as such */
33 #define TEST_CMD_INI_FILE_RADIO_PARAM 0x19
34 #define TEST_CMD_INI_FILE_GENERAL_PARAM 0x1E
36 struct wl1271_general_parms
{
42 u8 clk_valid_on_wakeup
;
46 u8 tx_bip_fem_autodetect
;
47 u8 tx_bip_fem_manufacturer
;
49 } __attribute__ ((packed
));
58 #define RSSI_AND_PROCESS_COMPENSATION_SIZE 15
59 #define NUMBER_OF_SUB_BANDS_5 7
60 #define NUMBER_OF_RATE_GROUPS 6
61 #define NUMBER_OF_CHANNELS_2_4 14
62 #define NUMBER_OF_CHANNELS_5 35
64 struct wl1271_radio_parms
{
68 /* Static radio parameters */
72 s8 rx_rssi_and_proc_compens
[RSSI_AND_PROCESS_COMPENSATION_SIZE
];
75 u8 rx_trace_loss_5
[NUMBER_OF_SUB_BANDS_5
];
76 u8 tx_trace_loss_5
[NUMBER_OF_SUB_BANDS_5
];
77 s8 rx_rssi_and_proc_compens_5
[RSSI_AND_PROCESS_COMPENSATION_SIZE
];
79 /* Dynamic radio parameters */
81 s16 tx_ref_pd_voltage
;
85 s8 tx_rate_limits_normal
[NUMBER_OF_RATE_GROUPS
];
86 s8 tx_rate_limits_degraded
[NUMBER_OF_RATE_GROUPS
];
88 s8 tx_channel_limits_11b
[NUMBER_OF_CHANNELS_2_4
];
89 s8 tx_channel_limits_ofdm
[NUMBER_OF_CHANNELS_2_4
];
90 s8 tx_pdv_rate_offsets
[NUMBER_OF_RATE_GROUPS
];
92 u8 tx_ibias
[NUMBER_OF_RATE_GROUPS
];
93 u8 rx_fem_insertion_loss
;
98 s16 tx_ref_pd_voltage_5
[NUMBER_OF_SUB_BANDS_5
];
99 s8 tx_ref_power_5
[NUMBER_OF_SUB_BANDS_5
];
100 s8 tx_offset_db_5
[NUMBER_OF_SUB_BANDS_5
];
102 s8 tx_rate_limits_normal_5
[NUMBER_OF_RATE_GROUPS
];
103 s8 tx_rate_limits_degraded_5
[NUMBER_OF_RATE_GROUPS
];
105 s8 tx_channel_limits_ofdm_5
[NUMBER_OF_CHANNELS_5
];
106 s8 tx_pdv_rate_offsets_5
[NUMBER_OF_RATE_GROUPS
];
108 /* FIXME: this is inconsistent with the types for 2.4GHz */
109 s8 tx_ibias_5
[NUMBER_OF_RATE_GROUPS
];
110 s8 rx_fem_insertion_loss_5
[NUMBER_OF_SUB_BANDS_5
];
113 } __attribute__ ((packed
));