aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/pcie
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-01-24 07:52:01 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-30 15:41:24 -0500
commit99cd471423991fe9ba011e8948cdea95f5432338 (patch)
tree8857873d926ac4c506a34b4afd2b1cd21d3bd731 /drivers/net/wireless/iwlwifi/pcie
parentde8d7a53807c8d2bb04b59ff3a0daa225e81a775 (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/net/wireless/iwlwifi/pcie')
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/7000.c111
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/cfg.h2
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/drv.c6
3 files changed, 119 insertions, 0 deletions
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
57static 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
72static 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
92const 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
101const 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
110MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
111MODULE_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;
109extern const struct iwl_cfg iwl105_bgn_cfg; 109extern const struct iwl_cfg iwl105_bgn_cfg;
110extern const struct iwl_cfg iwl105_bgn_d_cfg; 110extern const struct iwl_cfg iwl105_bgn_d_cfg;
111extern const struct iwl_cfg iwl135_bgn_cfg; 111extern const struct iwl_cfg iwl135_bgn_cfg;
112extern const struct iwl_cfg iwl7260_2ac_cfg;
113extern 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};
260MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids); 266MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids);