diff options
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
-rw-r--r-- | drivers/net/wireless/iwlegacy/3945.c | 39 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.h | 3 |
4 files changed, 42 insertions, 29 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c index 6c1ae5fab899..66a5dc072eb2 100644 --- a/drivers/net/wireless/iwlegacy/3945.c +++ b/drivers/net/wireless/iwlegacy/3945.c | |||
@@ -2646,18 +2646,9 @@ static struct il_lib_ops il3945_lib = { | |||
2646 | .config = il3945_nic_config, | 2646 | .config = il3945_nic_config, |
2647 | }, | 2647 | }, |
2648 | .eeprom_ops = { | 2648 | .eeprom_ops = { |
2649 | .regulatory_bands = { | 2649 | .acquire_semaphore = il3945_eeprom_acquire_semaphore, |
2650 | EEPROM_REGULATORY_BAND_1_CHANNELS, | 2650 | .release_semaphore = il3945_eeprom_release_semaphore, |
2651 | EEPROM_REGULATORY_BAND_2_CHANNELS, | 2651 | }, |
2652 | EEPROM_REGULATORY_BAND_3_CHANNELS, | ||
2653 | EEPROM_REGULATORY_BAND_4_CHANNELS, | ||
2654 | EEPROM_REGULATORY_BAND_5_CHANNELS, | ||
2655 | EEPROM_REGULATORY_BAND_NO_HT40, | ||
2656 | EEPROM_REGULATORY_BAND_NO_HT40, | ||
2657 | }, | ||
2658 | .acquire_semaphore = il3945_eeprom_acquire_semaphore, | ||
2659 | .release_semaphore = il3945_eeprom_release_semaphore, | ||
2660 | }, | ||
2661 | .send_tx_power = il3945_send_tx_power, | 2652 | .send_tx_power = il3945_send_tx_power, |
2662 | .is_valid_rtc_data_addr = il3945_hw_valid_rtc_data_addr, | 2653 | .is_valid_rtc_data_addr = il3945_hw_valid_rtc_data_addr, |
2663 | 2654 | ||
@@ -2707,7 +2698,17 @@ static struct il_cfg il3945_bg_cfg = { | |||
2707 | .set_l0s = false, | 2698 | .set_l0s = false, |
2708 | .use_bsm = true, | 2699 | .use_bsm = true, |
2709 | .led_compensation = 64, | 2700 | .led_compensation = 64, |
2710 | .wd_timeout = IL_DEF_WD_TIMEOUT | 2701 | .wd_timeout = IL_DEF_WD_TIMEOUT, |
2702 | |||
2703 | .regulatory_bands = { | ||
2704 | EEPROM_REGULATORY_BAND_1_CHANNELS, | ||
2705 | EEPROM_REGULATORY_BAND_2_CHANNELS, | ||
2706 | EEPROM_REGULATORY_BAND_3_CHANNELS, | ||
2707 | EEPROM_REGULATORY_BAND_4_CHANNELS, | ||
2708 | EEPROM_REGULATORY_BAND_5_CHANNELS, | ||
2709 | EEPROM_REGULATORY_BAND_NO_HT40, | ||
2710 | EEPROM_REGULATORY_BAND_NO_HT40, | ||
2711 | }, | ||
2711 | }; | 2712 | }; |
2712 | 2713 | ||
2713 | static struct il_cfg il3945_abg_cfg = { | 2714 | static struct il_cfg il3945_abg_cfg = { |
@@ -2726,7 +2727,17 @@ static struct il_cfg il3945_abg_cfg = { | |||
2726 | .set_l0s = false, | 2727 | .set_l0s = false, |
2727 | .use_bsm = true, | 2728 | .use_bsm = true, |
2728 | .led_compensation = 64, | 2729 | .led_compensation = 64, |
2729 | .wd_timeout = IL_DEF_WD_TIMEOUT | 2730 | .wd_timeout = IL_DEF_WD_TIMEOUT, |
2731 | |||
2732 | .regulatory_bands = { | ||
2733 | EEPROM_REGULATORY_BAND_1_CHANNELS, | ||
2734 | EEPROM_REGULATORY_BAND_2_CHANNELS, | ||
2735 | EEPROM_REGULATORY_BAND_3_CHANNELS, | ||
2736 | EEPROM_REGULATORY_BAND_4_CHANNELS, | ||
2737 | EEPROM_REGULATORY_BAND_5_CHANNELS, | ||
2738 | EEPROM_REGULATORY_BAND_NO_HT40, | ||
2739 | EEPROM_REGULATORY_BAND_NO_HT40, | ||
2740 | }, | ||
2730 | }; | 2741 | }; |
2731 | 2742 | ||
2732 | DEFINE_PCI_DEVICE_TABLE(il3945_hw_card_ids) = { | 2743 | DEFINE_PCI_DEVICE_TABLE(il3945_hw_card_ids) = { |
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c index 79e4e7971338..aea84bf4e935 100644 --- a/drivers/net/wireless/iwlegacy/4965.c +++ b/drivers/net/wireless/iwlegacy/4965.c | |||
@@ -2217,14 +2217,6 @@ static struct il_lib_ops il4965_lib = { | |||
2217 | .config = il4965_nic_config, | 2217 | .config = il4965_nic_config, |
2218 | }, | 2218 | }, |
2219 | .eeprom_ops = { | 2219 | .eeprom_ops = { |
2220 | .regulatory_bands = { | ||
2221 | EEPROM_REGULATORY_BAND_1_CHANNELS, | ||
2222 | EEPROM_REGULATORY_BAND_2_CHANNELS, | ||
2223 | EEPROM_REGULATORY_BAND_3_CHANNELS, | ||
2224 | EEPROM_REGULATORY_BAND_4_CHANNELS, | ||
2225 | EEPROM_REGULATORY_BAND_5_CHANNELS, | ||
2226 | EEPROM_4965_REGULATORY_BAND_24_HT40_CHANNELS, | ||
2227 | EEPROM_4965_REGULATORY_BAND_52_HT40_CHANNELS}, | ||
2228 | .acquire_semaphore = il4965_eeprom_acquire_semaphore, | 2220 | .acquire_semaphore = il4965_eeprom_acquire_semaphore, |
2229 | .release_semaphore = il4965_eeprom_release_semaphore, | 2221 | .release_semaphore = il4965_eeprom_release_semaphore, |
2230 | }, | 2222 | }, |
@@ -2288,6 +2280,17 @@ struct il_cfg il4965_cfg = { | |||
2288 | .ucode_tracing = true, | 2280 | .ucode_tracing = true, |
2289 | .sensitivity_calib_by_driver = true, | 2281 | .sensitivity_calib_by_driver = true, |
2290 | .chain_noise_calib_by_driver = true, | 2282 | .chain_noise_calib_by_driver = true, |
2283 | |||
2284 | .regulatory_bands = { | ||
2285 | EEPROM_REGULATORY_BAND_1_CHANNELS, | ||
2286 | EEPROM_REGULATORY_BAND_2_CHANNELS, | ||
2287 | EEPROM_REGULATORY_BAND_3_CHANNELS, | ||
2288 | EEPROM_REGULATORY_BAND_4_CHANNELS, | ||
2289 | EEPROM_REGULATORY_BAND_5_CHANNELS, | ||
2290 | EEPROM_4965_REGULATORY_BAND_24_HT40_CHANNELS, | ||
2291 | EEPROM_4965_REGULATORY_BAND_52_HT40_CHANNELS | ||
2292 | }, | ||
2293 | |||
2291 | }; | 2294 | }; |
2292 | 2295 | ||
2293 | /* Module firmware */ | 2296 | /* Module firmware */ |
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index 50308da8aee3..5a7ad52db1d9 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c | |||
@@ -798,8 +798,8 @@ il_init_band_reference(const struct il_priv *il, int eep_band, | |||
798 | const struct il_eeprom_channel **eeprom_ch_info, | 798 | const struct il_eeprom_channel **eeprom_ch_info, |
799 | const u8 **eeprom_ch_idx) | 799 | const u8 **eeprom_ch_idx) |
800 | { | 800 | { |
801 | u32 offset = | 801 | u32 offset = il->cfg->regulatory_bands[eep_band - 1]; |
802 | il->ops->lib->eeprom_ops.regulatory_bands[eep_band - 1]; | 802 | |
803 | switch (eep_band) { | 803 | switch (eep_band) { |
804 | case 1: /* 2.4GHz band */ | 804 | case 1: /* 2.4GHz band */ |
805 | *eeprom_ch_count = ARRAY_SIZE(il_eeprom_band_1); | 805 | *eeprom_ch_count = ARRAY_SIZE(il_eeprom_band_1); |
@@ -1000,10 +1000,8 @@ il_init_channel_map(struct il_priv *il) | |||
1000 | } | 1000 | } |
1001 | 1001 | ||
1002 | /* Check if we do have HT40 channels */ | 1002 | /* Check if we do have HT40 channels */ |
1003 | if (il->ops->lib->eeprom_ops.regulatory_bands[5] == | 1003 | if (il->cfg->regulatory_bands[5] == EEPROM_REGULATORY_BAND_NO_HT40 && |
1004 | EEPROM_REGULATORY_BAND_NO_HT40 && | 1004 | il->cfg->regulatory_bands[6] == EEPROM_REGULATORY_BAND_NO_HT40) |
1005 | il->ops->lib->eeprom_ops.regulatory_bands[6] == | ||
1006 | EEPROM_REGULATORY_BAND_NO_HT40) | ||
1007 | return 0; | 1005 | return 0; |
1008 | 1006 | ||
1009 | /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ | 1007 | /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ |
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h index fd2a4eea85e4..37bc40636c1e 100644 --- a/drivers/net/wireless/iwlegacy/common.h +++ b/drivers/net/wireless/iwlegacy/common.h | |||
@@ -426,7 +426,6 @@ struct il_eeprom_calib_info { | |||
426 | #define EEPROM_REGULATORY_BAND_NO_HT40 (0) | 426 | #define EEPROM_REGULATORY_BAND_NO_HT40 (0) |
427 | 427 | ||
428 | struct il_eeprom_ops { | 428 | struct il_eeprom_ops { |
429 | const u32 regulatory_bands[7]; | ||
430 | int (*acquire_semaphore) (struct il_priv *il); | 429 | int (*acquire_semaphore) (struct il_priv *il); |
431 | void (*release_semaphore) (struct il_priv *il); | 430 | void (*release_semaphore) (struct il_priv *il); |
432 | }; | 431 | }; |
@@ -1769,6 +1768,8 @@ struct il_cfg { | |||
1769 | const bool ucode_tracing; | 1768 | const bool ucode_tracing; |
1770 | const bool sensitivity_calib_by_driver; | 1769 | const bool sensitivity_calib_by_driver; |
1771 | const bool chain_noise_calib_by_driver; | 1770 | const bool chain_noise_calib_by_driver; |
1771 | |||
1772 | const u32 regulatory_bands[7]; | ||
1772 | }; | 1773 | }; |
1773 | 1774 | ||
1774 | /*************************** | 1775 | /*************************** |