Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
Wey-Yi Guy | 4e31826 | 2011-12-27 11:21:32 -0800 | [diff] [blame] | 3 | * Copyright(c) 2008 - 2012 Intel Corporation. All rights reserved. |
Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 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 | |
Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 27 | #include <linux/module.h> |
Evgeni Golov | 8fcbd4dc | 2011-06-12 05:34:31 -0700 | [diff] [blame] | 28 | #include <linux/stringify.h> |
Johannes Berg | e967669 | 2012-04-10 14:10:28 -0700 | [diff] [blame] | 29 | #include "iwl-config.h" |
Johannes Berg | cebcbd7 | 2011-09-15 11:46:46 -0700 | [diff] [blame] | 30 | #include "iwl-cfg.h" |
Johannes Berg | e967669 | 2012-04-10 14:10:28 -0700 | [diff] [blame] | 31 | #include "iwl-dev.h" /* still needed */ |
Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 32 | |
| 33 | /* Highest firmware API version supported */ |
Johannes Berg | ca9a460 | 2011-07-23 10:24:45 -0700 | [diff] [blame] | 34 | #define IWL1000_UCODE_API_MAX 6 |
| 35 | #define IWL100_UCODE_API_MAX 6 |
| 36 | |
| 37 | /* Oldest version we won't warn about */ |
| 38 | #define IWL1000_UCODE_API_OK 5 |
| 39 | #define IWL100_UCODE_API_OK 5 |
Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 40 | |
| 41 | /* Lowest firmware API version supported */ |
Jay Sternberg | 77dcb6a | 2009-03-06 13:52:55 -0800 | [diff] [blame] | 42 | #define IWL1000_UCODE_API_MIN 1 |
Jay Sternberg | 1de19ec | 2010-09-14 15:21:20 -0700 | [diff] [blame] | 43 | #define IWL100_UCODE_API_MIN 5 |
Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 44 | |
Johannes Berg | 586aed9 | 2012-04-03 20:41:07 +0200 | [diff] [blame^] | 45 | /* EEPROM version */ |
| 46 | #define EEPROM_1000_TX_POWER_VERSION (4) |
| 47 | #define EEPROM_1000_EEPROM_VERSION (0x15C) |
| 48 | |
Jay Sternberg | 77dcb6a | 2009-03-06 13:52:55 -0800 | [diff] [blame] | 49 | #define IWL1000_FW_PRE "iwlwifi-1000-" |
Evgeni Golov | 8fcbd4dc | 2011-06-12 05:34:31 -0700 | [diff] [blame] | 50 | #define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode" |
Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 51 | |
Jay Sternberg | 1de19ec | 2010-09-14 15:21:20 -0700 | [diff] [blame] | 52 | #define IWL100_FW_PRE "iwlwifi-100-" |
Evgeni Golov | 8fcbd4dc | 2011-06-12 05:34:31 -0700 | [diff] [blame] | 53 | #define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode" |
Jay Sternberg | 1de19ec | 2010-09-14 15:21:20 -0700 | [diff] [blame] | 54 | |
Wey-Yi Guy | 672639d | 2009-07-24 11:13:01 -0700 | [diff] [blame] | 55 | |
Johannes Berg | 6794f3e | 2012-03-06 13:30:56 -0800 | [diff] [blame] | 56 | static const struct iwl_base_params iwl1000_base_params = { |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 57 | .num_of_queues = IWLAGN_NUM_QUEUES, |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 58 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
Ben Cahill | fadb358 | 2009-10-23 13:42:21 -0700 | [diff] [blame] | 59 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
Wey-Yi Guy | 415e499 | 2009-08-13 13:30:54 -0700 | [diff] [blame] | 60 | .max_ll_items = OTP_MAX_LL_ITEMS_1000, |
| 61 | .shadow_ram_support = false, |
Wey-Yi Guy | f2d0d0e | 2009-09-11 10:38:14 -0700 | [diff] [blame] | 62 | .led_compensation = 51, |
Wey-Yi Guy | 480e840 | 2009-10-23 13:42:28 -0700 | [diff] [blame] | 63 | .support_ct_kill_exit = true, |
Trieu 'Andrew' Nguyen | 6c3872e | 2010-02-08 13:53:05 -0800 | [diff] [blame] | 64 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, |
Ben Cahill | d4fe5ac | 2010-02-05 11:33:46 -0800 | [diff] [blame] | 65 | .chain_noise_scale = 1000, |
Johannes Berg | 7c5ba4a | 2012-04-09 17:46:54 -0700 | [diff] [blame] | 66 | .wd_timeout = IWL_WATCHHDOG_DISABLED, |
Wey-Yi Guy | 678b385 | 2010-03-26 12:54:37 -0700 | [diff] [blame] | 67 | .max_event_log_size = 128, |
Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 68 | }; |
Johannes Berg | 6794f3e | 2012-03-06 13:30:56 -0800 | [diff] [blame] | 69 | |
| 70 | static const struct iwl_ht_params iwl1000_ht_params = { |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 71 | .ht_greenfield_support = true, |
| 72 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
Wey-Yi Guy | 946572b2 | 2011-07-23 10:24:41 -0700 | [diff] [blame] | 73 | .smps_mode = IEEE80211_SMPS_DYNAMIC, |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 74 | }; |
| 75 | |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 76 | #define IWL_DEVICE_1000 \ |
| 77 | .fw_name_pre = IWL1000_FW_PRE, \ |
| 78 | .ucode_api_max = IWL1000_UCODE_API_MAX, \ |
Johannes Berg | ca9a460 | 2011-07-23 10:24:45 -0700 | [diff] [blame] | 79 | .ucode_api_ok = IWL1000_UCODE_API_OK, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 80 | .ucode_api_min = IWL1000_UCODE_API_MIN, \ |
Johannes Berg | 2d771cb | 2012-04-09 17:47:00 -0700 | [diff] [blame] | 81 | .device_family = IWL_DEVICE_FAMILY_1000, \ |
Emmanuel Grumbach | dae66d0 | 2012-02-07 12:56:26 +0200 | [diff] [blame] | 82 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
| 83 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 84 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \ |
| 85 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 86 | .base_params = &iwl1000_base_params, \ |
| 87 | .led_mode = IWL_LED_BLINK |
| 88 | |
Johannes Berg | 706c4ff | 2012-03-05 11:24:33 -0800 | [diff] [blame] | 89 | const struct iwl_cfg iwl1000_bgn_cfg = { |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 90 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN", |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 91 | IWL_DEVICE_1000, |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 92 | .ht_params = &iwl1000_ht_params, |
| 93 | }; |
Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 94 | |
Johannes Berg | 706c4ff | 2012-03-05 11:24:33 -0800 | [diff] [blame] | 95 | const struct iwl_cfg iwl1000_bg_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 96 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BG", |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 97 | IWL_DEVICE_1000, |
Wey-Yi Guy | 4bd0914f | 2009-09-17 10:43:52 -0700 | [diff] [blame] | 98 | }; |
| 99 | |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 100 | #define IWL_DEVICE_100 \ |
| 101 | .fw_name_pre = IWL100_FW_PRE, \ |
| 102 | .ucode_api_max = IWL100_UCODE_API_MAX, \ |
Johannes Berg | ca9a460 | 2011-07-23 10:24:45 -0700 | [diff] [blame] | 103 | .ucode_api_ok = IWL100_UCODE_API_OK, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 104 | .ucode_api_min = IWL100_UCODE_API_MIN, \ |
Johannes Berg | 2d771cb | 2012-04-09 17:47:00 -0700 | [diff] [blame] | 105 | .device_family = IWL_DEVICE_FAMILY_100, \ |
Emmanuel Grumbach | dae66d0 | 2012-02-07 12:56:26 +0200 | [diff] [blame] | 106 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
| 107 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 108 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \ |
| 109 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 110 | .base_params = &iwl1000_base_params, \ |
| 111 | .led_mode = IWL_LED_RF_STATE, \ |
| 112 | .rx_with_siso_diversity = true |
| 113 | |
Johannes Berg | 706c4ff | 2012-03-05 11:24:33 -0800 | [diff] [blame] | 114 | const struct iwl_cfg iwl100_bgn_cfg = { |
Wey-Yi Guy | 638514f | 2010-11-17 12:13:55 -0800 | [diff] [blame] | 115 | .name = "Intel(R) Centrino(R) Wireless-N 100 BGN", |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 116 | IWL_DEVICE_100, |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 117 | .ht_params = &iwl1000_ht_params, |
Jay Sternberg | 1de19ec | 2010-09-14 15:21:20 -0700 | [diff] [blame] | 118 | }; |
| 119 | |
Johannes Berg | 706c4ff | 2012-03-05 11:24:33 -0800 | [diff] [blame] | 120 | const struct iwl_cfg iwl100_bg_cfg = { |
Wey-Yi Guy | 638514f | 2010-11-17 12:13:55 -0800 | [diff] [blame] | 121 | .name = "Intel(R) Centrino(R) Wireless-N 100 BG", |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 122 | IWL_DEVICE_100, |
Jay Sternberg | 1de19ec | 2010-09-14 15:21:20 -0700 | [diff] [blame] | 123 | }; |
| 124 | |
Huaxu Wan | 9554b34 | 2009-09-25 14:24:28 -0700 | [diff] [blame] | 125 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); |
Jay Sternberg | 1de19ec | 2010-09-14 15:21:20 -0700 | [diff] [blame] | 126 | MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX)); |