aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945-hw.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-01-27 19:41:47 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:04:35 -0500
commitbb8c093bdea62f2ae371b98ebff81b0407852faf (patch)
tree7937a70c333356a85b344f883608eeaf93dd3d2b /drivers/net/wireless/iwlwifi/iwl-3945-hw.h
parent403ab56b1c2786b0e1d58c27f5ce667b529c7faa (diff)
iwlwifi: cleanup namespace
Prefix all symbols with iwl3945_ or iwl4965_ and thus allow building the driver into the kernel. Also remove all the useless default statements in Kconfig while we're at it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945-hw.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-hw.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h
index 71c9a7e32d1b..8bbaa16442a5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h
@@ -133,7 +133,7 @@ enum {
133#define EEPROM_SKU_CAP_OP_MODE_MRC (1 << 7) 133#define EEPROM_SKU_CAP_OP_MODE_MRC (1 << 7)
134 134
135/* *regulatory* channel data from eeprom, one for each channel */ 135/* *regulatory* channel data from eeprom, one for each channel */
136struct iwl_eeprom_channel { 136struct iwl3945_eeprom_channel {
137 u8 flags; /* flags copied from EEPROM */ 137 u8 flags; /* flags copied from EEPROM */
138 s8 max_power_avg; /* max power (dBm) on this chnl, limit 31 */ 138 s8 max_power_avg; /* max power (dBm) on this chnl, limit 31 */
139} __attribute__ ((packed)); 139} __attribute__ ((packed));
@@ -148,7 +148,7 @@ struct iwl_eeprom_channel {
148 * level. 148 * level.
149 * Data copied from EEPROM. 149 * Data copied from EEPROM.
150 */ 150 */
151struct iwl_eeprom_txpower_sample { 151struct iwl3945_eeprom_txpower_sample {
152 u8 gain_index; /* index into power (gain) setup table ... */ 152 u8 gain_index; /* index into power (gain) setup table ... */
153 s8 power; /* ... for this pwr level for this chnl group */ 153 s8 power; /* ... for this pwr level for this chnl group */
154 u16 v_det; /* PA output voltage */ 154 u16 v_det; /* PA output voltage */
@@ -162,8 +162,8 @@ struct iwl_eeprom_txpower_sample {
162 * Data copied from EEPROM. 162 * Data copied from EEPROM.
163 * DO NOT ALTER THIS STRUCTURE!!! 163 * DO NOT ALTER THIS STRUCTURE!!!
164 */ 164 */
165struct iwl_eeprom_txpower_group { 165struct iwl3945_eeprom_txpower_group {
166 struct iwl_eeprom_txpower_sample samples[5]; /* 5 power levels */ 166 struct iwl3945_eeprom_txpower_sample samples[5]; /* 5 power levels */
167 s32 a, b, c, d, e; /* coefficients for voltage->power 167 s32 a, b, c, d, e; /* coefficients for voltage->power
168 * formula (signed) */ 168 * formula (signed) */
169 s32 Fa, Fb, Fc, Fd, Fe; /* these modify coeffs based on 169 s32 Fa, Fb, Fc, Fd, Fe; /* these modify coeffs based on
@@ -181,7 +181,7 @@ struct iwl_eeprom_txpower_group {
181 * difference between current temperature and factory calib temperature. 181 * difference between current temperature and factory calib temperature.
182 * Data copied from EEPROM. 182 * Data copied from EEPROM.
183 */ 183 */
184struct iwl_eeprom_temperature_corr { 184struct iwl3945_eeprom_temperature_corr {
185 u32 Ta; 185 u32 Ta;
186 u32 Tb; 186 u32 Tb;
187 u32 Tc; 187 u32 Tc;
@@ -189,7 +189,7 @@ struct iwl_eeprom_temperature_corr {
189 u32 Te; 189 u32 Te;
190} __attribute__ ((packed)); 190} __attribute__ ((packed));
191 191
192struct iwl_eeprom { 192struct iwl3945_eeprom {
193 u8 reserved0[16]; 193 u8 reserved0[16];
194#define EEPROM_DEVICE_ID (2*0x08) /* 2 bytes */ 194#define EEPROM_DEVICE_ID (2*0x08) /* 2 bytes */
195 u16 device_id; /* abs.ofs: 16 */ 195 u16 device_id; /* abs.ofs: 16 */
@@ -232,23 +232,23 @@ struct iwl_eeprom {
232#define EEPROM_REGULATORY_BAND_1 (2*0x62) /* 2 bytes */ 232#define EEPROM_REGULATORY_BAND_1 (2*0x62) /* 2 bytes */
233 u16 band_1_count; /* abs.ofs: 196 */ 233 u16 band_1_count; /* abs.ofs: 196 */
234#define EEPROM_REGULATORY_BAND_1_CHANNELS (2*0x63) /* 28 bytes */ 234#define EEPROM_REGULATORY_BAND_1_CHANNELS (2*0x63) /* 28 bytes */
235 struct iwl_eeprom_channel band_1_channels[14]; /* abs.ofs: 196 */ 235 struct iwl3945_eeprom_channel band_1_channels[14]; /* abs.ofs: 196 */
236#define EEPROM_REGULATORY_BAND_2 (2*0x71) /* 2 bytes */ 236#define EEPROM_REGULATORY_BAND_2 (2*0x71) /* 2 bytes */
237 u16 band_2_count; /* abs.ofs: 226 */ 237 u16 band_2_count; /* abs.ofs: 226 */
238#define EEPROM_REGULATORY_BAND_2_CHANNELS (2*0x72) /* 26 bytes */ 238#define EEPROM_REGULATORY_BAND_2_CHANNELS (2*0x72) /* 26 bytes */
239 struct iwl_eeprom_channel band_2_channels[13]; /* abs.ofs: 228 */ 239 struct iwl3945_eeprom_channel band_2_channels[13]; /* abs.ofs: 228 */
240#define EEPROM_REGULATORY_BAND_3 (2*0x7F) /* 2 bytes */ 240#define EEPROM_REGULATORY_BAND_3 (2*0x7F) /* 2 bytes */
241 u16 band_3_count; /* abs.ofs: 254 */ 241 u16 band_3_count; /* abs.ofs: 254 */
242#define EEPROM_REGULATORY_BAND_3_CHANNELS (2*0x80) /* 24 bytes */ 242#define EEPROM_REGULATORY_BAND_3_CHANNELS (2*0x80) /* 24 bytes */
243 struct iwl_eeprom_channel band_3_channels[12]; /* abs.ofs: 256 */ 243 struct iwl3945_eeprom_channel band_3_channels[12]; /* abs.ofs: 256 */
244#define EEPROM_REGULATORY_BAND_4 (2*0x8C) /* 2 bytes */ 244#define EEPROM_REGULATORY_BAND_4 (2*0x8C) /* 2 bytes */
245 u16 band_4_count; /* abs.ofs: 280 */ 245 u16 band_4_count; /* abs.ofs: 280 */
246#define EEPROM_REGULATORY_BAND_4_CHANNELS (2*0x8D) /* 22 bytes */ 246#define EEPROM_REGULATORY_BAND_4_CHANNELS (2*0x8D) /* 22 bytes */
247 struct iwl_eeprom_channel band_4_channels[11]; /* abs.ofs: 282 */ 247 struct iwl3945_eeprom_channel band_4_channels[11]; /* abs.ofs: 282 */
248#define EEPROM_REGULATORY_BAND_5 (2*0x98) /* 2 bytes */ 248#define EEPROM_REGULATORY_BAND_5 (2*0x98) /* 2 bytes */
249 u16 band_5_count; /* abs.ofs: 304 */ 249 u16 band_5_count; /* abs.ofs: 304 */
250#define EEPROM_REGULATORY_BAND_5_CHANNELS (2*0x99) /* 12 bytes */ 250#define EEPROM_REGULATORY_BAND_5_CHANNELS (2*0x99) /* 12 bytes */
251 struct iwl_eeprom_channel band_5_channels[6]; /* abs.ofs: 306 */ 251 struct iwl3945_eeprom_channel band_5_channels[6]; /* abs.ofs: 306 */
252 252
253 u8 reserved9[194]; 253 u8 reserved9[194];
254 254
@@ -258,10 +258,10 @@ struct iwl_eeprom {
258#define EEPROM_TXPOWER_CALIB_GROUP3 0x2c0 258#define EEPROM_TXPOWER_CALIB_GROUP3 0x2c0
259#define EEPROM_TXPOWER_CALIB_GROUP4 0x300 259#define EEPROM_TXPOWER_CALIB_GROUP4 0x300
260#define IWL_NUM_TX_CALIB_GROUPS 5 260#define IWL_NUM_TX_CALIB_GROUPS 5
261 struct iwl_eeprom_txpower_group groups[IWL_NUM_TX_CALIB_GROUPS]; 261 struct iwl3945_eeprom_txpower_group groups[IWL_NUM_TX_CALIB_GROUPS];
262/* abs.ofs: 512 */ 262/* abs.ofs: 512 */
263#define EEPROM_CALIB_TEMPERATURE_CORRECT 0x340 263#define EEPROM_CALIB_TEMPERATURE_CORRECT 0x340
264 struct iwl_eeprom_temperature_corr corrections; /* abs.ofs: 832 */ 264 struct iwl3945_eeprom_temperature_corr corrections; /* abs.ofs: 832 */
265 u8 reserved16[172]; /* fill out to full 1024 byte block */ 265 u8 reserved16[172]; /* fill out to full 1024 byte block */
266} __attribute__ ((packed)); 266} __attribute__ ((packed));
267 267
@@ -681,8 +681,8 @@ struct iwl_eeprom {
681#define TFD_TX_CMD_SLOTS 256 681#define TFD_TX_CMD_SLOTS 256
682#define TFD_CMD_SLOTS 32 682#define TFD_CMD_SLOTS 32
683 683
684#define TFD_MAX_PAYLOAD_SIZE (sizeof(struct iwl_cmd) - \ 684#define TFD_MAX_PAYLOAD_SIZE (sizeof(struct iwl3945_cmd) - \
685 sizeof(struct iwl_cmd_meta)) 685 sizeof(struct iwl3945_cmd_meta))
686 686
687/* 687/*
688 * RX related structures and functions 688 * RX related structures and functions
@@ -704,41 +704,41 @@ struct iwl_eeprom {
704#define IWL_MAX_DATA_SIZE ALM_RTC_DATA_SIZE 704#define IWL_MAX_DATA_SIZE ALM_RTC_DATA_SIZE
705#define IWL_MAX_NUM_QUEUES 8 705#define IWL_MAX_NUM_QUEUES 8
706 706
707static inline int iwl_hw_valid_rtc_data_addr(u32 addr) 707static inline int iwl3945_hw_valid_rtc_data_addr(u32 addr)
708{ 708{
709 return (addr >= RTC_DATA_LOWER_BOUND) && 709 return (addr >= RTC_DATA_LOWER_BOUND) &&
710 (addr < ALM_RTC_DATA_UPPER_BOUND); 710 (addr < ALM_RTC_DATA_UPPER_BOUND);
711} 711}
712 712
713/* Base physical address of iwl_shared is provided to FH_TSSR_CBB_BASE 713/* Base physical address of iwl3945_shared is provided to FH_TSSR_CBB_BASE
714 * and &iwl_shared.rx_read_ptr[0] is provided to FH_RCSR_RPTR_ADDR(0) */ 714 * and &iwl3945_shared.rx_read_ptr[0] is provided to FH_RCSR_RPTR_ADDR(0) */
715struct iwl_shared { 715struct iwl3945_shared {
716 __le32 tx_base_ptr[8]; 716 __le32 tx_base_ptr[8];
717 __le32 rx_read_ptr[3]; 717 __le32 rx_read_ptr[3];
718} __attribute__ ((packed)); 718} __attribute__ ((packed));
719 719
720struct iwl_tfd_frame_data { 720struct iwl3945_tfd_frame_data {
721 __le32 addr; 721 __le32 addr;
722 __le32 len; 722 __le32 len;
723} __attribute__ ((packed)); 723} __attribute__ ((packed));
724 724
725struct iwl_tfd_frame { 725struct iwl3945_tfd_frame {
726 __le32 control_flags; 726 __le32 control_flags;
727 struct iwl_tfd_frame_data pa[4]; 727 struct iwl3945_tfd_frame_data pa[4];
728 u8 reserved[28]; 728 u8 reserved[28];
729} __attribute__ ((packed)); 729} __attribute__ ((packed));
730 730
731static inline u8 iwl_hw_get_rate(__le16 rate_n_flags) 731static inline u8 iwl3945_hw_get_rate(__le16 rate_n_flags)
732{ 732{
733 return le16_to_cpu(rate_n_flags) & 0xFF; 733 return le16_to_cpu(rate_n_flags) & 0xFF;
734} 734}
735 735
736static inline u16 iwl_hw_get_rate_n_flags(__le16 rate_n_flags) 736static inline u16 iwl3945_hw_get_rate_n_flags(__le16 rate_n_flags)
737{ 737{
738 return le16_to_cpu(rate_n_flags); 738 return le16_to_cpu(rate_n_flags);
739} 739}
740 740
741static inline __le16 iwl_hw_set_rate_n_flags(u8 rate, u16 flags) 741static inline __le16 iwl3945_hw_set_rate_n_flags(u8 rate, u16 flags)
742{ 742{
743 return cpu_to_le16((u16)rate|flags); 743 return cpu_to_le16((u16)rate|flags);
744} 744}