aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c264
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.h53
5 files changed, 1 insertions, 331 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 5100c1065bdd..94521d4417a2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -316,7 +316,6 @@ struct iwl_cfg iwl100_bgn_cfg = {
316 .ht_params = &iwl1000_ht_params, 316 .ht_params = &iwl1000_ht_params,
317 .led_mode = IWL_LED_RF_STATE, 317 .led_mode = IWL_LED_RF_STATE,
318 .rx_with_siso_diversity = true, 318 .rx_with_siso_diversity = true,
319 .use_new_eeprom_reading = true,
320}; 319};
321 320
322struct iwl_cfg iwl100_bg_cfg = { 321struct iwl_cfg iwl100_bg_cfg = {
@@ -331,7 +330,6 @@ struct iwl_cfg iwl100_bg_cfg = {
331 .base_params = &iwl1000_base_params, 330 .base_params = &iwl1000_base_params,
332 .led_mode = IWL_LED_RF_STATE, 331 .led_mode = IWL_LED_RF_STATE,
333 .rx_with_siso_diversity = true, 332 .rx_with_siso_diversity = true,
334 .use_new_eeprom_reading = true,
335}; 333};
336 334
337MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); 335MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index db70a6bfaa55..8a789241704f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -568,7 +568,6 @@ struct iwl_cfg iwl6005_2agn_cfg = {
568 .need_dc_calib = true, 568 .need_dc_calib = true,
569 .need_temp_offset_calib = true, 569 .need_temp_offset_calib = true,
570 .led_mode = IWL_LED_RF_STATE, 570 .led_mode = IWL_LED_RF_STATE,
571 .use_new_eeprom_reading = true,
572}; 571};
573 572
574struct iwl_cfg iwl6005_2abg_cfg = { 573struct iwl_cfg iwl6005_2abg_cfg = {
@@ -584,7 +583,6 @@ struct iwl_cfg iwl6005_2abg_cfg = {
584 .need_dc_calib = true, 583 .need_dc_calib = true,
585 .need_temp_offset_calib = true, 584 .need_temp_offset_calib = true,
586 .led_mode = IWL_LED_RF_STATE, 585 .led_mode = IWL_LED_RF_STATE,
587 .use_new_eeprom_reading = true,
588}; 586};
589 587
590struct iwl_cfg iwl6005_2bg_cfg = { 588struct iwl_cfg iwl6005_2bg_cfg = {
@@ -600,7 +598,6 @@ struct iwl_cfg iwl6005_2bg_cfg = {
600 .need_dc_calib = true, 598 .need_dc_calib = true,
601 .need_temp_offset_calib = true, 599 .need_temp_offset_calib = true,
602 .led_mode = IWL_LED_RF_STATE, 600 .led_mode = IWL_LED_RF_STATE,
603 .use_new_eeprom_reading = true,
604}; 601};
605 602
606struct iwl_cfg iwl6030_2agn_cfg = { 603struct iwl_cfg iwl6030_2agn_cfg = {
@@ -621,7 +618,6 @@ struct iwl_cfg iwl6030_2agn_cfg = {
621 .adv_pm = true, 618 .adv_pm = true,
622 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 619 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
623 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 620 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
624 .use_new_eeprom_reading = true,
625}; 621};
626 622
627struct iwl_cfg iwl6030_2abg_cfg = { 623struct iwl_cfg iwl6030_2abg_cfg = {
@@ -641,7 +637,6 @@ struct iwl_cfg iwl6030_2abg_cfg = {
641 .adv_pm = true, 637 .adv_pm = true,
642 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 638 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
643 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 639 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
644 .use_new_eeprom_reading = true,
645}; 640};
646 641
647struct iwl_cfg iwl6030_2bgn_cfg = { 642struct iwl_cfg iwl6030_2bgn_cfg = {
@@ -662,7 +657,6 @@ struct iwl_cfg iwl6030_2bgn_cfg = {
662 .adv_pm = true, 657 .adv_pm = true,
663 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 658 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
664 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 659 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
665 .use_new_eeprom_reading = true,
666}; 660};
667 661
668struct iwl_cfg iwl6030_2bg_cfg = { 662struct iwl_cfg iwl6030_2bg_cfg = {
@@ -682,7 +676,6 @@ struct iwl_cfg iwl6030_2bg_cfg = {
682 .adv_pm = true, 676 .adv_pm = true,
683 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 677 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
684 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 678 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
685 .use_new_eeprom_reading = true,
686}; 679};
687 680
688struct iwl_cfg iwl1030_bgn_cfg = { 681struct iwl_cfg iwl1030_bgn_cfg = {
@@ -703,7 +696,6 @@ struct iwl_cfg iwl1030_bgn_cfg = {
703 .adv_pm = true, 696 .adv_pm = true,
704 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 697 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
705 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 698 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
706 .use_new_eeprom_reading = true,
707}; 699};
708 700
709struct iwl_cfg iwl1030_bg_cfg = { 701struct iwl_cfg iwl1030_bg_cfg = {
@@ -723,7 +715,6 @@ struct iwl_cfg iwl1030_bg_cfg = {
723 .adv_pm = true, 715 .adv_pm = true,
724 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 716 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
725 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 717 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
726 .use_new_eeprom_reading = true,
727}; 718};
728 719
729/* 720/*
@@ -806,7 +797,6 @@ struct iwl_cfg iwl6150_bgn_cfg = {
806 .ht_params = &iwl6000_ht_params, 797 .ht_params = &iwl6000_ht_params,
807 .need_dc_calib = true, 798 .need_dc_calib = true,
808 .led_mode = IWL_LED_RF_STATE, 799 .led_mode = IWL_LED_RF_STATE,
809 .use_new_eeprom_reading = true,
810}; 800};
811 801
812struct iwl_cfg iwl6050_2abg_cfg = { 802struct iwl_cfg iwl6050_2abg_cfg = {
@@ -856,7 +846,6 @@ struct iwl_cfg iwl130_bgn_cfg = {
856 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 846 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
857 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 847 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
858 .rx_with_siso_diversity = true, 848 .rx_with_siso_diversity = true,
859 .use_new_eeprom_reading = true,
860}; 849};
861 850
862struct iwl_cfg iwl130_bg_cfg = { 851struct iwl_cfg iwl130_bg_cfg = {
@@ -876,7 +865,6 @@ struct iwl_cfg iwl130_bg_cfg = {
876 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 865 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
877 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 866 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
878 .rx_with_siso_diversity = true, 867 .rx_with_siso_diversity = true,
879 .use_new_eeprom_reading = true,
880}; 868};
881 869
882MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); 870MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
index cf9194baadac..3ea006d73988 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
@@ -75,109 +75,6 @@
75#include "iwl-agn.h" 75#include "iwl-agn.h"
76#include "iwl-io.h" 76#include "iwl-io.h"
77 77
78/************************** EEPROM BANDS ****************************
79 *
80 * The iwl_eeprom_band definitions below provide the mapping from the
81 * EEPROM contents to the specific channel number supported for each
82 * band.
83 *
84 * For example, iwl_priv->eeprom.band_3_channels[4] from the band_3
85 * definition below maps to physical channel 42 in the 5.2GHz spectrum.
86 * The specific geography and calibration information for that channel
87 * is contained in the eeprom map itself.
88 *
89 * During init, we copy the eeprom information and channel map
90 * information into priv->channel_info_24/52 and priv->channel_map_24/52
91 *
92 * channel_map_24/52 provides the index in the channel_info array for a
93 * given channel. We have to have two separate maps as there is channel
94 * overlap with the 2.4GHz and 5.2GHz spectrum as seen in band_1 and
95 * band_2
96 *
97 * A value of 0xff stored in the channel_map indicates that the channel
98 * is not supported by the hardware at all.
99 *
100 * A value of 0xfe in the channel_map indicates that the channel is not
101 * valid for Tx with the current hardware. This means that
102 * while the system can tune and receive on a given channel, it may not
103 * be able to associate or transmit any frames on that
104 * channel. There is no corresponding channel information for that
105 * entry.
106 *
107 *********************************************************************/
108
109/**
110 * struct iwl_txpwr_section: eeprom section information
111 * @offset: indirect address into eeprom image
112 * @count: number of "struct iwl_eeprom_enhanced_txpwr" in this section
113 * @band: band type for the section
114 * @is_common - true: common section, false: channel section
115 * @is_cck - true: cck section, false: not cck section
116 * @is_ht_40 - true: all channel in the section are HT40 channel,
117 * false: legacy or HT 20 MHz
118 * ignore if it is common section
119 * @iwl_eeprom_section_channel: channel array in the section,
120 * ignore if common section
121 */
122struct iwl_txpwr_section {
123 u32 offset;
124 u8 count;
125 enum ieee80211_band band;
126 bool is_common;
127 bool is_cck;
128 bool is_ht40;
129 u8 iwl_eeprom_section_channel[EEPROM_MAX_TXPOWER_SECTION_ELEMENTS];
130};
131
132/**
133 * section 1 - 3 are regulatory tx power apply to all channels based on
134 * modulation: CCK, OFDM
135 * Band: 2.4GHz, 5.2GHz
136 * section 4 - 10 are regulatory tx power apply to specified channels
137 * For example:
138 * 1L - Channel 1 Legacy
139 * 1HT - Channel 1 HT
140 * (1,+1) - Channel 1 HT40 "_above_"
141 *
142 * Section 1: all CCK channels
143 * Section 2: all 2.4 GHz OFDM (Legacy, HT and HT40) channels
144 * Section 3: all 5.2 GHz OFDM (Legacy, HT and HT40) channels
145 * Section 4: 2.4 GHz 20MHz channels: 1L, 1HT, 2L, 2HT, 10L, 10HT, 11L, 11HT
146 * Section 5: 2.4 GHz 40MHz channels: (1,+1) (2,+1) (6,+1) (7,+1) (9,+1)
147 * Section 6: 5.2 GHz 20MHz channels: 36L, 64L, 100L, 36HT, 64HT, 100HT
148 * Section 7: 5.2 GHz 40MHz channels: (36,+1) (60,+1) (100,+1)
149 * Section 8: 2.4 GHz channel: 13L, 13HT
150 * Section 9: 2.4 GHz channel: 140L, 140HT
151 * Section 10: 2.4 GHz 40MHz channels: (132,+1) (44,+1)
152 *
153 */
154static const struct iwl_txpwr_section enhinfo[] = {
155 { EEPROM_LB_CCK_20_COMMON, 1, IEEE80211_BAND_2GHZ, true, true, false },
156 { EEPROM_LB_OFDM_COMMON, 3, IEEE80211_BAND_2GHZ, true, false, false },
157 { EEPROM_HB_OFDM_COMMON, 3, IEEE80211_BAND_5GHZ, true, false, false },
158 { EEPROM_LB_OFDM_20_BAND, 8, IEEE80211_BAND_2GHZ,
159 false, false, false,
160 {1, 1, 2, 2, 10, 10, 11, 11 } },
161 { EEPROM_LB_OFDM_HT40_BAND, 5, IEEE80211_BAND_2GHZ,
162 false, false, true,
163 { 1, 2, 6, 7, 9 } },
164 { EEPROM_HB_OFDM_20_BAND, 6, IEEE80211_BAND_5GHZ,
165 false, false, false,
166 { 36, 64, 100, 36, 64, 100 } },
167 { EEPROM_HB_OFDM_HT40_BAND, 3, IEEE80211_BAND_5GHZ,
168 false, false, true,
169 { 36, 60, 100 } },
170 { EEPROM_LB_OFDM_20_CHANNEL_13, 2, IEEE80211_BAND_2GHZ,
171 false, false, false,
172 { 13, 13 } },
173 { EEPROM_HB_OFDM_20_CHANNEL_140, 2, IEEE80211_BAND_5GHZ,
174 false, false, false,
175 { 140, 140 } },
176 { EEPROM_HB_OFDM_HT40_BAND_1, 2, IEEE80211_BAND_5GHZ,
177 false, false, true,
178 { 132, 44 } },
179};
180
181/****************************************************************************** 78/******************************************************************************
182 * 79 *
183 * EEPROM related functions 80 * EEPROM related functions
@@ -344,157 +241,6 @@ static s8 iwl_get_max_txpower_avg(struct iwl_priv *priv,
344 return (max_txpower_avg & 0x01) + (max_txpower_avg >> 1); 241 return (max_txpower_avg & 0x01) + (max_txpower_avg >> 1);
345} 242}
346 243
347/**
348 * iwl_update_common_txpower: update channel tx power
349 * update tx power per band based on EEPROM enhanced tx power info.
350 */
351static s8 iwl_update_common_txpower(struct iwl_priv *priv,
352 struct iwl_eeprom_enhanced_txpwr *enhanced_txpower,
353 int section, int element, s8 *max_txpower_in_half_dbm)
354{
355 struct iwl_channel_info *ch_info;
356 int ch;
357 bool is_ht40 = false;
358 s8 max_txpower_avg; /* (dBm) */
359
360 /* it is common section, contain all type (Legacy, HT and HT40)
361 * based on the element in the section to determine
362 * is it HT 40 or not
363 */
364 if (element == EEPROM_TXPOWER_COMMON_HT40_INDEX)
365 is_ht40 = true;
366 max_txpower_avg =
367 iwl_get_max_txpower_avg(priv, enhanced_txpower,
368 element, max_txpower_in_half_dbm);
369
370 ch_info = priv->channel_info;
371
372 for (ch = 0; ch < priv->channel_count; ch++) {
373 /* find matching band and update tx power if needed */
374 if ((ch_info->band == enhinfo[section].band) &&
375 (ch_info->max_power_avg < max_txpower_avg) &&
376 (!is_ht40)) {
377 /* Update regulatory-based run-time data */
378 ch_info->max_power_avg = ch_info->curr_txpow =
379 max_txpower_avg;
380 ch_info->scan_power = max_txpower_avg;
381 }
382 if ((ch_info->band == enhinfo[section].band) && is_ht40 &&
383 (ch_info->ht40_max_power_avg < max_txpower_avg)) {
384 /* Update regulatory-based run-time data */
385 ch_info->ht40_max_power_avg = max_txpower_avg;
386 }
387 ch_info++;
388 }
389 return max_txpower_avg;
390}
391
392/**
393 * iwl_update_channel_txpower: update channel tx power
394 * update channel tx power based on EEPROM enhanced tx power info.
395 */
396static s8 iwl_update_channel_txpower(struct iwl_priv *priv,
397 struct iwl_eeprom_enhanced_txpwr *enhanced_txpower,
398 int section, int element, s8 *max_txpower_in_half_dbm)
399{
400 struct iwl_channel_info *ch_info;
401 int ch;
402 u8 channel;
403 s8 max_txpower_avg; /* (dBm) */
404
405 channel = enhinfo[section].iwl_eeprom_section_channel[element];
406 max_txpower_avg =
407 iwl_get_max_txpower_avg(priv, enhanced_txpower,
408 element, max_txpower_in_half_dbm);
409
410 ch_info = priv->channel_info;
411 for (ch = 0; ch < priv->channel_count; ch++) {
412 /* find matching channel and update tx power if needed */
413 if (ch_info->channel == channel) {
414 if ((ch_info->max_power_avg < max_txpower_avg) &&
415 (!enhinfo[section].is_ht40)) {
416 /* Update regulatory-based run-time data */
417 ch_info->max_power_avg = max_txpower_avg;
418 ch_info->curr_txpow = max_txpower_avg;
419 ch_info->scan_power = max_txpower_avg;
420 }
421 if ((enhinfo[section].is_ht40) &&
422 (ch_info->ht40_max_power_avg < max_txpower_avg)) {
423 /* Update regulatory-based run-time data */
424 ch_info->ht40_max_power_avg = max_txpower_avg;
425 }
426 break;
427 }
428 ch_info++;
429 }
430 return max_txpower_avg;
431}
432
433/**
434 * iwlcore_eeprom_enhanced_txpower: process enhanced tx power info
435 */
436static void iwlcore_eeprom_enhanced_txpower_old(struct iwl_priv *priv)
437{
438 int eeprom_section_count = 0;
439 int section, element;
440 struct iwl_eeprom_enhanced_txpwr *enhanced_txpower;
441 u32 offset;
442 s8 max_txpower_avg; /* (dBm) */
443 s8 max_txpower_in_half_dbm; /* (half-dBm) */
444
445 /* Loop through all the sections
446 * adjust bands and channel's max tx power
447 * Set the tx_power_user_lmt to the highest power
448 * supported by any channels and chains
449 */
450 for (section = 0; section < ARRAY_SIZE(enhinfo); section++) {
451 eeprom_section_count = enhinfo[section].count;
452 offset = enhinfo[section].offset;
453 enhanced_txpower = (struct iwl_eeprom_enhanced_txpwr *)
454 iwl_eeprom_query_addr(priv, offset);
455
456 /*
457 * check for valid entry -
458 * different version of EEPROM might contain different set
459 * of enhanced tx power table
460 * always check for valid entry before process
461 * the information
462 */
463 if (!(enhanced_txpower->flags || enhanced_txpower->channel) ||
464 enhanced_txpower->delta_20_in_40)
465 continue;
466
467 for (element = 0; element < eeprom_section_count; element++) {
468 if (enhinfo[section].is_common)
469 max_txpower_avg =
470 iwl_update_common_txpower(priv,
471 enhanced_txpower, section,
472 element,
473 &max_txpower_in_half_dbm);
474 else
475 max_txpower_avg =
476 iwl_update_channel_txpower(priv,
477 enhanced_txpower, section,
478 element,
479 &max_txpower_in_half_dbm);
480
481 /* Update the tx_power_user_lmt to the highest power
482 * supported by any channel */
483 if (max_txpower_avg > priv->tx_power_user_lmt)
484 priv->tx_power_user_lmt = max_txpower_avg;
485
486 /*
487 * Update the tx_power_lmt_in_half_dbm to
488 * the highest power supported by any channel
489 */
490 if (max_txpower_in_half_dbm >
491 priv->tx_power_lmt_in_half_dbm)
492 priv->tx_power_lmt_in_half_dbm =
493 max_txpower_in_half_dbm;
494 }
495 }
496}
497
498static void 244static void
499iwlcore_eeprom_enh_txp_read_element(struct iwl_priv *priv, 245iwlcore_eeprom_enh_txp_read_element(struct iwl_priv *priv,
500 struct iwl_eeprom_enhanced_txpwr *txp, 246 struct iwl_eeprom_enhanced_txpwr *txp,
@@ -533,7 +279,7 @@ iwlcore_eeprom_enh_txp_read_element(struct iwl_priv *priv,
533#define EEPROM_TXP_ENTRY_LEN sizeof(struct iwl_eeprom_enhanced_txpwr) 279#define EEPROM_TXP_ENTRY_LEN sizeof(struct iwl_eeprom_enhanced_txpwr)
534#define EEPROM_TXP_SZ_OFFS (0x00 | INDIRECT_ADDRESS | INDIRECT_TXP_LIMIT_SIZE) 280#define EEPROM_TXP_SZ_OFFS (0x00 | INDIRECT_ADDRESS | INDIRECT_TXP_LIMIT_SIZE)
535 281
536static void iwlcore_eeprom_enhanced_txpower_new(struct iwl_priv *priv) 282void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv)
537{ 283{
538 struct iwl_eeprom_enhanced_txpwr *txp_array, *txp; 284 struct iwl_eeprom_enhanced_txpwr *txp_array, *txp;
539 int idx, entries; 285 int idx, entries;
@@ -569,11 +315,3 @@ static void iwlcore_eeprom_enhanced_txpower_new(struct iwl_priv *priv)
569 iwlcore_eeprom_enh_txp_read_element(priv, txp, max_txp_avg); 315 iwlcore_eeprom_enh_txp_read_element(priv, txp, max_txp_avg);
570 } 316 }
571} 317}
572
573void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv)
574{
575 if (priv->cfg->use_new_eeprom_reading)
576 iwlcore_eeprom_enhanced_txpower_new(priv);
577 else
578 iwlcore_eeprom_enhanced_txpower_old(priv);
579}
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index b877cbe12c3a..d0b86f5e28c2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -414,7 +414,6 @@ struct iwl_cfg {
414 enum iwl_led_mode led_mode; 414 enum iwl_led_mode led_mode;
415 const bool adv_pm; 415 const bool adv_pm;
416 const bool rx_with_siso_diversity; 416 const bool rx_with_siso_diversity;
417 const bool use_new_eeprom_reading; /* temporary, remove later */
418}; 417};
419 418
420/*************************** 419/***************************
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
index 8994b5b23593..9e6f31355eee 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
@@ -231,59 +231,6 @@ struct iwl_eeprom_enhanced_txpwr {
231#define EEPROM_6000_REG_BAND_24_HT40_CHANNELS ((0x80)\ 231#define EEPROM_6000_REG_BAND_24_HT40_CHANNELS ((0x80)\
232 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 14 bytes */ 232 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 14 bytes */
233 233
234/* 6000 and up regulatory tx power - indirect access */
235/* max. elements per section */
236#define EEPROM_MAX_TXPOWER_SECTION_ELEMENTS (8)
237#define EEPROM_TXPOWER_COMMON_HT40_INDEX (2)
238
239/**
240 * Partition the enhanced tx power portion of eeprom image into
241 * 10 sections based on band, modulation, frequency and channel
242 *
243 * Section 1: all CCK channels
244 * Section 2: all 2.4 GHz OFDM (Legacy, HT and HT40 ) channels
245 * Section 3: all 5.2 GHz OFDM (Legacy, HT and HT40) channels
246 * Section 4: 2.4 GHz 20MHz channels: 1, 2, 10, 11. Both Legacy and HT
247 * Section 5: 2.4 GHz 40MHz channels: 1, 2, 6, 7, 9, (_above_)
248 * Section 6: 5.2 GHz 20MHz channels: 36, 64, 100, both Legacy and HT
249 * Section 7: 5.2 GHz 40MHz channels: 36, 60, 100 (_above_)
250 * Section 8: 2.4 GHz channel 13, Both Legacy and HT
251 * Section 9: 2.4 GHz channel 140, Both Legacy and HT
252 * Section 10: 2.4 GHz 40MHz channels: 132, 44 (_above_)
253 */
254/* 2.4 GHz band: CCK */
255#define EEPROM_LB_CCK_20_COMMON ((0xA8)\
256 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 8 bytes */
257/* 2.4 GHz band: 20MHz-Legacy, 20MHz-HT, 40MHz-HT */
258#define EEPROM_LB_OFDM_COMMON ((0xB0)\
259 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 24 bytes */
260/* 5.2 GHz band: 20MHz-Legacy, 20MHz-HT, 40MHz-HT */
261#define EEPROM_HB_OFDM_COMMON ((0xC8)\
262 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 24 bytes */
263/* 2.4GHz band channels:
264 * 1Legacy, 1HT, 2Legacy, 2HT, 10Legacy, 10HT, 11Legacy, 11HT */
265#define EEPROM_LB_OFDM_20_BAND ((0xE0)\
266 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 64 bytes */
267/* 2.4 GHz band HT40 channels: (1,+1) (2,+1) (6,+1) (7,+1) (9,+1) */
268#define EEPROM_LB_OFDM_HT40_BAND ((0x120)\
269 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 40 bytes */
270/* 5.2GHz band channels: 36Legacy, 36HT, 64Legacy, 64HT, 100Legacy, 100HT */
271#define EEPROM_HB_OFDM_20_BAND ((0x148)\
272 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 48 bytes */
273/* 5.2 GHz band HT40 channels: (36,+1) (60,+1) (100,+1) */
274#define EEPROM_HB_OFDM_HT40_BAND ((0x178)\
275 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 24 bytes */
276/* 2.4 GHz band, channnel 13: Legacy, HT */
277#define EEPROM_LB_OFDM_20_CHANNEL_13 ((0x190)\
278 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 16 bytes */
279/* 5.2 GHz band, channnel 140: Legacy, HT */
280#define EEPROM_HB_OFDM_20_CHANNEL_140 ((0x1A0)\
281 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 16 bytes */
282/* 5.2 GHz band, HT40 channnels (132,+1) (44,+1) */
283#define EEPROM_HB_OFDM_HT40_BAND_1 ((0x1B0)\
284 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 16 bytes */
285
286
287/* 5050 Specific */ 234/* 5050 Specific */
288#define EEPROM_5050_TX_POWER_VERSION (4) 235#define EEPROM_5050_TX_POWER_VERSION (4)
289#define EEPROM_5050_EEPROM_VERSION (0x21E) 236#define EEPROM_5050_EEPROM_VERSION (0x21E)