diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945-hw.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-hw.h | 50 |
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 */ |
136 | struct iwl_eeprom_channel { | 136 | struct 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 | */ |
151 | struct iwl_eeprom_txpower_sample { | 151 | struct 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 | */ |
165 | struct iwl_eeprom_txpower_group { | 165 | struct 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 | */ |
184 | struct iwl_eeprom_temperature_corr { | 184 | struct 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 | ||
192 | struct iwl_eeprom { | 192 | struct 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 | ||
707 | static inline int iwl_hw_valid_rtc_data_addr(u32 addr) | 707 | static 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) */ |
715 | struct iwl_shared { | 715 | struct 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 | ||
720 | struct iwl_tfd_frame_data { | 720 | struct iwl3945_tfd_frame_data { |
721 | __le32 addr; | 721 | __le32 addr; |
722 | __le32 len; | 722 | __le32 len; |
723 | } __attribute__ ((packed)); | 723 | } __attribute__ ((packed)); |
724 | 724 | ||
725 | struct iwl_tfd_frame { | 725 | struct 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 | ||
731 | static inline u8 iwl_hw_get_rate(__le16 rate_n_flags) | 731 | static 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 | ||
736 | static inline u16 iwl_hw_get_rate_n_flags(__le16 rate_n_flags) | 736 | static 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 | ||
741 | static inline __le16 iwl_hw_set_rate_n_flags(u8 rate, u16 flags) | 741 | static 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 | } |