Commit | Line | Data |
---|---|---|
c5d05698 JS |
1 | /****************************************************************************** |
2 | * | |
4e318262 | 3 | * Copyright(c) 2008 - 2012 Intel Corporation. All rights reserved. |
c5d05698 JS |
4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | |
6 | * under the terms of version 2 of the GNU General Public License as | |
7 | * published by the Free Software Foundation. | |
8 | * | |
9 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
12 | * more details. | |
13 | * | |
14 | * You should have received a copy of the GNU General Public License along with | |
15 | * this program; if not, write to the Free Software Foundation, Inc., | |
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA | |
17 | * | |
18 | * The full GNU General Public License is included in this distribution in the | |
19 | * file called LICENSE. | |
20 | * | |
21 | * Contact Information: | |
22 | * Intel Linux Wireless <ilw@linux.intel.com> | |
23 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | |
24 | * | |
25 | *****************************************************************************/ | |
26 | ||
c5d05698 | 27 | #include <linux/module.h> |
8fcbd4dc | 28 | #include <linux/stringify.h> |
e9676695 | 29 | #include "iwl-config.h" |
0db19cde JB |
30 | #include "iwl-csr.h" |
31 | #include "iwl-agn-hw.h" | |
6468a01a | 32 | #include "cfg.h" |
c5d05698 JS |
33 | |
34 | /* Highest firmware API version supported */ | |
78cbcf2b MV |
35 | #define IWL1000_UCODE_API_MAX 5 |
36 | #define IWL100_UCODE_API_MAX 5 | |
ca9a4605 JB |
37 | |
38 | /* Oldest version we won't warn about */ | |
39 | #define IWL1000_UCODE_API_OK 5 | |
40 | #define IWL100_UCODE_API_OK 5 | |
c5d05698 JS |
41 | |
42 | /* Lowest firmware API version supported */ | |
77dcb6a9 | 43 | #define IWL1000_UCODE_API_MIN 1 |
1de19ecc | 44 | #define IWL100_UCODE_API_MIN 5 |
c5d05698 | 45 | |
586aed96 JB |
46 | /* EEPROM version */ |
47 | #define EEPROM_1000_TX_POWER_VERSION (4) | |
48 | #define EEPROM_1000_EEPROM_VERSION (0x15C) | |
49 | ||
77dcb6a9 | 50 | #define IWL1000_FW_PRE "iwlwifi-1000-" |
8fcbd4dc | 51 | #define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode" |
c5d05698 | 52 | |
1de19ecc | 53 | #define IWL100_FW_PRE "iwlwifi-100-" |
8fcbd4dc | 54 | #define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode" |
1de19ecc | 55 | |
672639de | 56 | |
6794f3ee | 57 | static const struct iwl_base_params iwl1000_base_params = { |
19e6cda0 | 58 | .num_of_queues = IWLAGN_NUM_QUEUES, |
7cb1b088 | 59 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
fadb3582 | 60 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
415e4993 WYG |
61 | .max_ll_items = OTP_MAX_LL_ITEMS_1000, |
62 | .shadow_ram_support = false, | |
f2d0d0e2 | 63 | .led_compensation = 51, |
480e8407 | 64 | .support_ct_kill_exit = true, |
6c3872e1 | 65 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, |
d4fe5ac9 | 66 | .chain_noise_scale = 1000, |
6de4902e | 67 | .wd_timeout = IWL_WATCHDOG_DISABLED, |
678b385d | 68 | .max_event_log_size = 128, |
c5d05698 | 69 | }; |
6794f3ee JB |
70 | |
71 | static const struct iwl_ht_params iwl1000_ht_params = { | |
7cb1b088 WYG |
72 | .ht_greenfield_support = true, |
73 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | |
d370493f | 74 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ), |
7cb1b088 WYG |
75 | }; |
76 | ||
26a7ca9a JB |
77 | static const struct iwl_eeprom_params iwl1000_eeprom_params = { |
78 | .regulatory_bands = { | |
79 | EEPROM_REG_BAND_1_CHANNELS, | |
80 | EEPROM_REG_BAND_2_CHANNELS, | |
81 | EEPROM_REG_BAND_3_CHANNELS, | |
82 | EEPROM_REG_BAND_4_CHANNELS, | |
83 | EEPROM_REG_BAND_5_CHANNELS, | |
84 | EEPROM_REG_BAND_24_HT40_CHANNELS, | |
85 | EEPROM_REGULATORY_BAND_NO_HT40, | |
86 | } | |
87 | }; | |
88 | ||
65af8dea WYG |
89 | #define IWL_DEVICE_1000 \ |
90 | .fw_name_pre = IWL1000_FW_PRE, \ | |
91 | .ucode_api_max = IWL1000_UCODE_API_MAX, \ | |
ca9a4605 | 92 | .ucode_api_ok = IWL1000_UCODE_API_OK, \ |
65af8dea | 93 | .ucode_api_min = IWL1000_UCODE_API_MIN, \ |
2d771cb6 | 94 | .device_family = IWL_DEVICE_FAMILY_1000, \ |
dae66d0d EG |
95 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
96 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | |
65af8dea WYG |
97 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \ |
98 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ | |
65af8dea | 99 | .base_params = &iwl1000_base_params, \ |
26a7ca9a | 100 | .eeprom_params = &iwl1000_eeprom_params, \ |
65af8dea WYG |
101 | .led_mode = IWL_LED_BLINK |
102 | ||
706c4ff6 | 103 | const struct iwl_cfg iwl1000_bgn_cfg = { |
7cb1b088 | 104 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN", |
65af8dea | 105 | IWL_DEVICE_1000, |
7cb1b088 WYG |
106 | .ht_params = &iwl1000_ht_params, |
107 | }; | |
c5d05698 | 108 | |
706c4ff6 | 109 | const struct iwl_cfg iwl1000_bg_cfg = { |
c11362c0 | 110 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BG", |
65af8dea | 111 | IWL_DEVICE_1000, |
4bd0914f WYG |
112 | }; |
113 | ||
65af8dea WYG |
114 | #define IWL_DEVICE_100 \ |
115 | .fw_name_pre = IWL100_FW_PRE, \ | |
116 | .ucode_api_max = IWL100_UCODE_API_MAX, \ | |
ca9a4605 | 117 | .ucode_api_ok = IWL100_UCODE_API_OK, \ |
65af8dea | 118 | .ucode_api_min = IWL100_UCODE_API_MIN, \ |
2d771cb6 | 119 | .device_family = IWL_DEVICE_FAMILY_100, \ |
dae66d0d EG |
120 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
121 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | |
65af8dea WYG |
122 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \ |
123 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ | |
65af8dea | 124 | .base_params = &iwl1000_base_params, \ |
26a7ca9a | 125 | .eeprom_params = &iwl1000_eeprom_params, \ |
65af8dea WYG |
126 | .led_mode = IWL_LED_RF_STATE, \ |
127 | .rx_with_siso_diversity = true | |
128 | ||
706c4ff6 | 129 | const struct iwl_cfg iwl100_bgn_cfg = { |
638514ff | 130 | .name = "Intel(R) Centrino(R) Wireless-N 100 BGN", |
65af8dea | 131 | IWL_DEVICE_100, |
7cb1b088 | 132 | .ht_params = &iwl1000_ht_params, |
1de19ecc JS |
133 | }; |
134 | ||
706c4ff6 | 135 | const struct iwl_cfg iwl100_bg_cfg = { |
638514ff | 136 | .name = "Intel(R) Centrino(R) Wireless-N 100 BG", |
65af8dea | 137 | IWL_DEVICE_100, |
1de19ecc JS |
138 | }; |
139 | ||
78cbcf2b MV |
140 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_OK)); |
141 | MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_OK)); |