diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-eeprom.h | 80 |
1 files changed, 79 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h index ca7920a8f52f..6b68db7b1b81 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h | |||
@@ -118,6 +118,30 @@ struct iwl_eeprom_channel { | |||
118 | s8 max_power_avg; /* max power (dBm) on this chnl, limit 31 */ | 118 | s8 max_power_avg; /* max power (dBm) on this chnl, limit 31 */ |
119 | } __attribute__ ((packed)); | 119 | } __attribute__ ((packed)); |
120 | 120 | ||
121 | /** | ||
122 | * iwl_eeprom_enhanced_txpwr structure | ||
123 | * This structure presents the enhanced regulatory tx power limit layout | ||
124 | * in eeprom image | ||
125 | * Enhanced regulatory tx power portion of eeprom image can be broken down | ||
126 | * into individual structures; each one is 8 bytes in size and contain the | ||
127 | * following information | ||
128 | * @chain_a_max_pwr: chain a max power in 1/2 dBm | ||
129 | * @chain_b_max_pwr: chain b max power in 1/2 dBm | ||
130 | * @chain_c_max_pwr: chain c max power in 1/2 dBm | ||
131 | * @mimo2_max_pwr: mimo2 max power in 1/2 dBm | ||
132 | * @mimo3_max_pwr: mimo3 max power in 1/2 dBm | ||
133 | * | ||
134 | */ | ||
135 | struct iwl_eeprom_enhanced_txpwr { | ||
136 | u16 reserved; | ||
137 | s8 chain_a_max; | ||
138 | s8 chain_b_max; | ||
139 | s8 chain_c_max; | ||
140 | s8 reserved1; | ||
141 | s8 mimo2_max; | ||
142 | s8 mimo3_max; | ||
143 | } __attribute__ ((packed)); | ||
144 | |||
121 | /* 3945 Specific */ | 145 | /* 3945 Specific */ |
122 | #define EEPROM_3945_EEPROM_VERSION (0x2f) | 146 | #define EEPROM_3945_EEPROM_VERSION (0x2f) |
123 | 147 | ||
@@ -175,6 +199,59 @@ struct iwl_eeprom_channel { | |||
175 | #define EEPROM_5000_REG_BAND_52_HT40_CHANNELS ((0x92)\ | 199 | #define EEPROM_5000_REG_BAND_52_HT40_CHANNELS ((0x92)\ |
176 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 22 bytes */ | 200 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 22 bytes */ |
177 | 201 | ||
202 | /* 6000 and up regulatory tx power - indirect access */ | ||
203 | /* max. elements per section */ | ||
204 | #define EEPROM_MAX_TXPOWER_SECTION_ELEMENTS (8) | ||
205 | #define EEPROM_TXPOWER_COMMON_HT40_INDEX (2) | ||
206 | |||
207 | /** | ||
208 | * Partition the enhanced tx power portion of eeprom image into | ||
209 | * 10 sections based on band, modulation, frequency and channel | ||
210 | * | ||
211 | * Section 1: all CCK channels | ||
212 | * Section 2: all 2.4 GHz OFDM (Legacy, HT and HT40 ) channels | ||
213 | * Section 3: all 5.2 GHz OFDM (Legacy, HT and HT40) channels | ||
214 | * Section 4: 2.4 GHz 20MHz channels: 1, 2, 10, 11. Both Legacy and HT | ||
215 | * Section 5: 2.4 GHz 40MHz channels: 1, 2, 6, 7, 9, (_above_) | ||
216 | * Section 6: 5.2 GHz 20MHz channels: 36, 64, 100, both Legacy and HT | ||
217 | * Section 7: 5.2 GHz 40MHz channels: 36, 60, 100 (_above_) | ||
218 | * Section 8: 2.4 GHz channel 13, Both Legacy and HT | ||
219 | * Section 9: 2.4 GHz channel 140, Both Legacy and HT | ||
220 | * Section 10: 2.4 GHz 40MHz channels: 132, 44 (_above_) | ||
221 | */ | ||
222 | /* 2.4 GHz band: CCK */ | ||
223 | #define EEPROM_LB_CCK_20_COMMON ((0xAA)\ | ||
224 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 8 bytes */ | ||
225 | /* 2.4 GHz band: 20MHz-Legacy, 20MHz-HT, 40MHz-HT */ | ||
226 | #define EEPROM_LB_OFDM_COMMON ((0xB2)\ | ||
227 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 24 bytes */ | ||
228 | /* 5.2 GHz band: 20MHz-Legacy, 20MHz-HT, 40MHz-HT */ | ||
229 | #define EEPROM_HB_OFDM_COMMON ((0xCA)\ | ||
230 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 24 bytes */ | ||
231 | /* 2.4GHz band channels: | ||
232 | * 1Legacy, 1HT, 2Legacy, 2HT, 10Legacy, 10HT, 11Legacy, 11HT */ | ||
233 | #define EEPROM_LB_OFDM_20_BAND ((0xE2)\ | ||
234 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 64 bytes */ | ||
235 | /* 2.4 GHz band HT40 channels: (1,+1) (2,+1) (6,+1) (7,+1) (9,+1) */ | ||
236 | #define EEPROM_LB_OFDM_HT40_BAND ((0x122)\ | ||
237 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 40 bytes */ | ||
238 | /* 5.2GHz band channels: 36Legacy, 36HT, 64Legacy, 64HT, 100Legacy, 100HT */ | ||
239 | #define EEPROM_HB_OFDM_20_BAND ((0x14A)\ | ||
240 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 48 bytes */ | ||
241 | /* 5.2 GHz band HT40 channels: (36,+1) (60,+1) (100,+1) */ | ||
242 | #define EEPROM_HB_OFDM_HT40_BAND ((0x17A)\ | ||
243 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 24 bytes */ | ||
244 | /* 2.4 GHz band, channnel 13: Legacy, HT */ | ||
245 | #define EEPROM_LB_OFDM_20_CHANNEL_13 ((0x192)\ | ||
246 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 16 bytes */ | ||
247 | /* 5.2 GHz band, channnel 140: Legacy, HT */ | ||
248 | #define EEPROM_HB_OFDM_20_CHANNEL_140 ((0x1A2)\ | ||
249 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 16 bytes */ | ||
250 | /* 5.2 GHz band, HT40 channnels (132,+1) (44,+1) */ | ||
251 | #define EEPROM_HB_OFDM_HT40_BAND_1 ((0x1B2)\ | ||
252 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 16 bytes */ | ||
253 | |||
254 | |||
178 | /* 5050 Specific */ | 255 | /* 5050 Specific */ |
179 | #define EEPROM_5050_TX_POWER_VERSION (4) | 256 | #define EEPROM_5050_TX_POWER_VERSION (4) |
180 | #define EEPROM_5050_EEPROM_VERSION (0x21E) | 257 | #define EEPROM_5050_EEPROM_VERSION (0x21E) |
@@ -389,6 +466,7 @@ struct iwl_eeprom_ops { | |||
389 | void (*release_semaphore) (struct iwl_priv *priv); | 466 | void (*release_semaphore) (struct iwl_priv *priv); |
390 | u16 (*calib_version) (struct iwl_priv *priv); | 467 | u16 (*calib_version) (struct iwl_priv *priv); |
391 | const u8* (*query_addr) (const struct iwl_priv *priv, size_t offset); | 468 | const u8* (*query_addr) (const struct iwl_priv *priv, size_t offset); |
469 | void (*update_enhanced_txpower) (struct iwl_priv *priv); | ||
392 | }; | 470 | }; |
393 | 471 | ||
394 | 472 | ||
@@ -403,7 +481,7 @@ int iwlcore_eeprom_verify_signature(struct iwl_priv *priv); | |||
403 | int iwlcore_eeprom_acquire_semaphore(struct iwl_priv *priv); | 481 | int iwlcore_eeprom_acquire_semaphore(struct iwl_priv *priv); |
404 | void iwlcore_eeprom_release_semaphore(struct iwl_priv *priv); | 482 | void iwlcore_eeprom_release_semaphore(struct iwl_priv *priv); |
405 | const u8 *iwlcore_eeprom_query_addr(const struct iwl_priv *priv, size_t offset); | 483 | const u8 *iwlcore_eeprom_query_addr(const struct iwl_priv *priv, size_t offset); |
406 | 484 | void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv); | |
407 | int iwl_init_channel_map(struct iwl_priv *priv); | 485 | int iwl_init_channel_map(struct iwl_priv *priv); |
408 | void iwl_free_channel_map(struct iwl_priv *priv); | 486 | void iwl_free_channel_map(struct iwl_priv *priv); |
409 | const struct iwl_channel_info *iwl_get_channel_info( | 487 | const struct iwl_channel_info *iwl_get_channel_info( |