diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-01-24 07:52:01 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-30 15:41:24 -0500 |
commit | 99cd471423991fe9ba011e8948cdea95f5432338 (patch) | |
tree | 8857873d926ac4c506a34b4afd2b1cd21d3bd731 /drivers | |
parent | de8d7a53807c8d2bb04b59ff3a0daa225e81a775 (diff) |
iwlwifi: add 7000 series device configuration
Add configuration and detection code for the new
7000 series, with 7260 and 3160 devices.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/Makefile | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-config.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-fh.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-prph.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/7000.c | 111 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/cfg.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/drv.c | 6 |
7 files changed, 125 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/Makefile b/drivers/net/wireless/iwlwifi/Makefile index 170ec330d2a9..98cb8e826834 100644 --- a/drivers/net/wireless/iwlwifi/Makefile +++ b/drivers/net/wireless/iwlwifi/Makefile | |||
@@ -7,6 +7,7 @@ iwlwifi-objs += iwl-notif-wait.o | |||
7 | iwlwifi-objs += iwl-eeprom-read.o iwl-eeprom-parse.o | 7 | iwlwifi-objs += iwl-eeprom-read.o iwl-eeprom-parse.o |
8 | iwlwifi-objs += pcie/drv.o pcie/rx.o pcie/tx.o pcie/trans.o | 8 | iwlwifi-objs += pcie/drv.o pcie/rx.o pcie/tx.o pcie/trans.o |
9 | iwlwifi-objs += pcie/1000.o pcie/2000.o pcie/5000.o pcie/6000.o | 9 | iwlwifi-objs += pcie/1000.o pcie/2000.o pcie/5000.o pcie/6000.o |
10 | iwlwifi-objs += pcie/7000.o | ||
10 | 11 | ||
11 | iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o | 12 | iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o |
12 | iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TESTMODE) += iwl-test.o | 13 | iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TESTMODE) += iwl-test.o |
diff --git a/drivers/net/wireless/iwlwifi/iwl-config.h b/drivers/net/wireless/iwlwifi/iwl-config.h index 61a7a3533c87..743b48343358 100644 --- a/drivers/net/wireless/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/iwlwifi/iwl-config.h | |||
@@ -83,6 +83,7 @@ enum iwl_device_family { | |||
83 | IWL_DEVICE_FAMILY_6030, | 83 | IWL_DEVICE_FAMILY_6030, |
84 | IWL_DEVICE_FAMILY_6050, | 84 | IWL_DEVICE_FAMILY_6050, |
85 | IWL_DEVICE_FAMILY_6150, | 85 | IWL_DEVICE_FAMILY_6150, |
86 | IWL_DEVICE_FAMILY_7000, | ||
86 | }; | 87 | }; |
87 | 88 | ||
88 | /* | 89 | /* |
diff --git a/drivers/net/wireless/iwlwifi/iwl-fh.h b/drivers/net/wireless/iwlwifi/iwl-fh.h index 39c79ec45821..f5592fb3b1ed 100644 --- a/drivers/net/wireless/iwlwifi/iwl-fh.h +++ b/drivers/net/wireless/iwlwifi/iwl-fh.h | |||
@@ -414,6 +414,7 @@ static inline unsigned int FH_MEM_CBBC_QUEUE(unsigned int chnl) | |||
414 | * uCode/driver must write "1" in order to clear this flag | 414 | * uCode/driver must write "1" in order to clear this flag |
415 | */ | 415 | */ |
416 | #define FH_TSSR_TX_ERROR_REG (FH_TSSR_LOWER_BOUND + 0x018) | 416 | #define FH_TSSR_TX_ERROR_REG (FH_TSSR_LOWER_BOUND + 0x018) |
417 | #define FH_TSSR_TX_MSG_CONFIG_REG (FH_TSSR_LOWER_BOUND + 0x008) | ||
417 | 418 | ||
418 | #define FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(_chnl) ((1 << (_chnl)) << 16) | 419 | #define FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(_chnl) ((1 << (_chnl)) << 16) |
419 | 420 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h index f46a3f2c2c93..f76e9cad7757 100644 --- a/drivers/net/wireless/iwlwifi/iwl-prph.h +++ b/drivers/net/wireless/iwlwifi/iwl-prph.h | |||
@@ -97,6 +97,9 @@ | |||
97 | 97 | ||
98 | #define APMG_PCIDEV_STT_VAL_L1_ACT_DIS (0x00000800) | 98 | #define APMG_PCIDEV_STT_VAL_L1_ACT_DIS (0x00000800) |
99 | 99 | ||
100 | /* Device system time */ | ||
101 | #define DEVICE_SYSTEM_TIME_REG 0xA0206C | ||
102 | |||
100 | /** | 103 | /** |
101 | * Tx Scheduler | 104 | * Tx Scheduler |
102 | * | 105 | * |
diff --git a/drivers/net/wireless/iwlwifi/pcie/7000.c b/drivers/net/wireless/iwlwifi/pcie/7000.c new file mode 100644 index 000000000000..6e35b2b72332 --- /dev/null +++ b/drivers/net/wireless/iwlwifi/pcie/7000.c | |||
@@ -0,0 +1,111 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Copyright(c) 2008 - 2013 Intel Corporation. All rights reserved. | ||
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 | |||
27 | #include <linux/module.h> | ||
28 | #include <linux/stringify.h> | ||
29 | #include "iwl-config.h" | ||
30 | #include "iwl-agn-hw.h" | ||
31 | #include "cfg.h" | ||
32 | |||
33 | /* Highest firmware API version supported */ | ||
34 | #define IWL7260_UCODE_API_MAX 6 | ||
35 | #define IWL3160_UCODE_API_MAX 6 | ||
36 | |||
37 | /* Oldest version we won't warn about */ | ||
38 | #define IWL7260_UCODE_API_OK 6 | ||
39 | #define IWL3160_UCODE_API_OK 6 | ||
40 | |||
41 | /* Lowest firmware API version supported */ | ||
42 | #define IWL7260_UCODE_API_MIN 6 | ||
43 | #define IWL3160_UCODE_API_MIN 6 | ||
44 | |||
45 | /* NVM versions */ | ||
46 | #define IWL7260_NVM_VERSION 0x0a1d | ||
47 | #define IWL7260_TX_POWER_VERSION 0xffff /* meaningless */ | ||
48 | #define IWL3160_NVM_VERSION 0x709 | ||
49 | #define IWL3160_TX_POWER_VERSION 0xffff /* meaningless */ | ||
50 | |||
51 | #define IWL7260_FW_PRE "iwlwifi-7260-" | ||
52 | #define IWL7260_MODULE_FIRMWARE(api) IWL7260_FW_PRE __stringify(api) ".ucode" | ||
53 | |||
54 | #define IWL3160_FW_PRE "iwlwifi-3160-" | ||
55 | #define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE __stringify(api) ".ucode" | ||
56 | |||
57 | static const struct iwl_base_params iwl7000_base_params = { | ||
58 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | ||
59 | .num_of_queues = IWLAGN_NUM_QUEUES, | ||
60 | .pll_cfg_val = 0, | ||
61 | .shadow_ram_support = true, | ||
62 | .led_compensation = 57, | ||
63 | .adv_thermal_throttle = true, | ||
64 | .support_ct_kill_exit = true, | ||
65 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
66 | .chain_noise_scale = 1000, | ||
67 | .wd_timeout = IWL_LONG_WD_TIMEOUT, | ||
68 | .max_event_log_size = 512, | ||
69 | .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ | ||
70 | }; | ||
71 | |||
72 | static const struct iwl_ht_params iwl7000_ht_params = { | ||
73 | .ht_greenfield_support = true, | ||
74 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
75 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | ||
76 | }; | ||
77 | |||
78 | #define IWL_DEVICE_7000 \ | ||
79 | .ucode_api_max = IWL7260_UCODE_API_MAX, \ | ||
80 | .ucode_api_ok = IWL7260_UCODE_API_OK, \ | ||
81 | .ucode_api_min = IWL7260_UCODE_API_MIN, \ | ||
82 | .device_family = IWL_DEVICE_FAMILY_7000, \ | ||
83 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | ||
84 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | ||
85 | .base_params = &iwl7000_base_params, \ | ||
86 | /* TODO: .bt_params? */ \ | ||
87 | .need_temp_offset_calib = true, \ | ||
88 | .led_mode = IWL_LED_RF_STATE, \ | ||
89 | .adv_pm = true \ | ||
90 | |||
91 | |||
92 | const struct iwl_cfg iwl7260_2ac_cfg = { | ||
93 | .name = "Intel(R) Dual Band Wireless AC7260", | ||
94 | .fw_name_pre = IWL7260_FW_PRE, | ||
95 | IWL_DEVICE_7000, | ||
96 | .ht_params = &iwl7000_ht_params, | ||
97 | .nvm_ver = IWL7260_NVM_VERSION, | ||
98 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, | ||
99 | }; | ||
100 | |||
101 | const struct iwl_cfg iwl3160_ac_cfg = { | ||
102 | .name = "Intel(R) Dual Band Wireless AC3160", | ||
103 | .fw_name_pre = IWL3160_FW_PRE, | ||
104 | IWL_DEVICE_7000, | ||
105 | .ht_params = &iwl7000_ht_params, | ||
106 | .nvm_ver = IWL3160_NVM_VERSION, | ||
107 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, | ||
108 | }; | ||
109 | |||
110 | MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK)); | ||
111 | MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK)); | ||
diff --git a/drivers/net/wireless/iwlwifi/pcie/cfg.h b/drivers/net/wireless/iwlwifi/pcie/cfg.h index 30610634c310..c6f8e83c3551 100644 --- a/drivers/net/wireless/iwlwifi/pcie/cfg.h +++ b/drivers/net/wireless/iwlwifi/pcie/cfg.h | |||
@@ -109,5 +109,7 @@ extern const struct iwl_cfg iwl6035_2agn_cfg; | |||
109 | extern const struct iwl_cfg iwl105_bgn_cfg; | 109 | extern const struct iwl_cfg iwl105_bgn_cfg; |
110 | extern const struct iwl_cfg iwl105_bgn_d_cfg; | 110 | extern const struct iwl_cfg iwl105_bgn_d_cfg; |
111 | extern const struct iwl_cfg iwl135_bgn_cfg; | 111 | extern const struct iwl_cfg iwl135_bgn_cfg; |
112 | extern const struct iwl_cfg iwl7260_2ac_cfg; | ||
113 | extern const struct iwl_cfg iwl3160_ac_cfg; | ||
112 | 114 | ||
113 | #endif /* __iwl_pci_h__ */ | 115 | #endif /* __iwl_pci_h__ */ |
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c index 5651d3114625..7bc0fb9128dd 100644 --- a/drivers/net/wireless/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/iwlwifi/pcie/drv.c | |||
@@ -255,6 +255,12 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { | |||
255 | {IWL_PCI_DEVICE(0x0893, 0x0262, iwl135_bgn_cfg)}, | 255 | {IWL_PCI_DEVICE(0x0893, 0x0262, iwl135_bgn_cfg)}, |
256 | {IWL_PCI_DEVICE(0x0892, 0x0462, iwl135_bgn_cfg)}, | 256 | {IWL_PCI_DEVICE(0x0892, 0x0462, iwl135_bgn_cfg)}, |
257 | 257 | ||
258 | /* 7000 Series */ | ||
259 | {IWL_PCI_DEVICE(0x08B1, 0x4070, iwl7260_2ac_cfg)}, | ||
260 | {IWL_PCI_DEVICE(0x08B1, 0xC070, iwl7260_2ac_cfg)}, | ||
261 | {IWL_PCI_DEVICE(0x08B3, 0x0070, iwl3160_ac_cfg)}, | ||
262 | {IWL_PCI_DEVICE(0x08B3, 0x8070, iwl3160_ac_cfg)}, | ||
263 | |||
258 | {0} | 264 | {0} |
259 | }; | 265 | }; |
260 | MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids); | 266 | MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids); |