Merge tag 'wireless-drivers-next-for-davem-2016-05-13' of git://git.kernel.org/pub...
[deliverable/linux.git] / drivers / net / wireless / intel / iwlwifi / iwl-1000.c
CommitLineData
c5d05698
JS
1/******************************************************************************
2 *
51368bf7 3 * Copyright(c) 2008 - 2014 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:
d01c5366 22 * Intel Linux Wireless <linuxwifi@intel.com>
c5d05698
JS
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"
c5d05698
JS
32
33/* Highest firmware API version supported */
78cbcf2b
MV
34#define IWL1000_UCODE_API_MAX 5
35#define IWL100_UCODE_API_MAX 5
ca9a4605 36
c5d05698 37/* Lowest firmware API version supported */
77dcb6a9 38#define IWL1000_UCODE_API_MIN 1
1de19ecc 39#define IWL100_UCODE_API_MIN 5
c5d05698 40
586aed96
JB
41/* EEPROM version */
42#define EEPROM_1000_TX_POWER_VERSION (4)
43#define EEPROM_1000_EEPROM_VERSION (0x15C)
44
77dcb6a9 45#define IWL1000_FW_PRE "iwlwifi-1000-"
8fcbd4dc 46#define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode"
c5d05698 47
1de19ecc 48#define IWL100_FW_PRE "iwlwifi-100-"
8fcbd4dc 49#define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode"
1de19ecc 50
672639de 51
6794f3ee 52static const struct iwl_base_params iwl1000_base_params = {
19e6cda0 53 .num_of_queues = IWLAGN_NUM_QUEUES,
7cb1b088 54 .eeprom_size = OTP_LOW_IMAGE_SIZE,
77d76931 55 .pll_cfg = true,
415e4993
WYG
56 .max_ll_items = OTP_MAX_LL_ITEMS_1000,
57 .shadow_ram_support = false,
f2d0d0e2 58 .led_compensation = 51,
6de4902e 59 .wd_timeout = IWL_WATCHDOG_DISABLED,
678b385d 60 .max_event_log_size = 128,
e03bbb62 61 .scd_chain_ext_wa = true,
c5d05698 62};
6794f3ee
JB
63
64static const struct iwl_ht_params iwl1000_ht_params = {
7cb1b088
WYG
65 .ht_greenfield_support = true,
66 .use_rts_for_aggregation = true, /* use rts/cts protection */
57fbcce3 67 .ht40_bands = BIT(NL80211_BAND_2GHZ),
7cb1b088
WYG
68};
69
26a7ca9a
JB
70static const struct iwl_eeprom_params iwl1000_eeprom_params = {
71 .regulatory_bands = {
72 EEPROM_REG_BAND_1_CHANNELS,
73 EEPROM_REG_BAND_2_CHANNELS,
74 EEPROM_REG_BAND_3_CHANNELS,
75 EEPROM_REG_BAND_4_CHANNELS,
76 EEPROM_REG_BAND_5_CHANNELS,
77 EEPROM_REG_BAND_24_HT40_CHANNELS,
78 EEPROM_REGULATORY_BAND_NO_HT40,
79 }
80};
81
65af8dea
WYG
82#define IWL_DEVICE_1000 \
83 .fw_name_pre = IWL1000_FW_PRE, \
84 .ucode_api_max = IWL1000_UCODE_API_MAX, \
85 .ucode_api_min = IWL1000_UCODE_API_MIN, \
2d771cb6 86 .device_family = IWL_DEVICE_FAMILY_1000, \
dae66d0d
EG
87 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
88 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
b7998c8b
EL
89 .nvm_ver = EEPROM_1000_EEPROM_VERSION, \
90 .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
65af8dea 91 .base_params = &iwl1000_base_params, \
26a7ca9a 92 .eeprom_params = &iwl1000_eeprom_params, \
540623ca
EG
93 .led_mode = IWL_LED_BLINK, \
94 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
65af8dea 95
706c4ff6 96const struct iwl_cfg iwl1000_bgn_cfg = {
7cb1b088 97 .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
65af8dea 98 IWL_DEVICE_1000,
7cb1b088
WYG
99 .ht_params = &iwl1000_ht_params,
100};
c5d05698 101
706c4ff6 102const struct iwl_cfg iwl1000_bg_cfg = {
c11362c0 103 .name = "Intel(R) Centrino(R) Wireless-N 1000 BG",
65af8dea 104 IWL_DEVICE_1000,
4bd0914f
WYG
105};
106
65af8dea
WYG
107#define IWL_DEVICE_100 \
108 .fw_name_pre = IWL100_FW_PRE, \
109 .ucode_api_max = IWL100_UCODE_API_MAX, \
110 .ucode_api_min = IWL100_UCODE_API_MIN, \
2d771cb6 111 .device_family = IWL_DEVICE_FAMILY_100, \
dae66d0d
EG
112 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
113 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
b7998c8b
EL
114 .nvm_ver = EEPROM_1000_EEPROM_VERSION, \
115 .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
65af8dea 116 .base_params = &iwl1000_base_params, \
26a7ca9a 117 .eeprom_params = &iwl1000_eeprom_params, \
65af8dea 118 .led_mode = IWL_LED_RF_STATE, \
540623ca
EG
119 .rx_with_siso_diversity = true, \
120 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
65af8dea 121
706c4ff6 122const struct iwl_cfg iwl100_bgn_cfg = {
638514ff 123 .name = "Intel(R) Centrino(R) Wireless-N 100 BGN",
65af8dea 124 IWL_DEVICE_100,
7cb1b088 125 .ht_params = &iwl1000_ht_params,
1de19ecc
JS
126};
127
706c4ff6 128const struct iwl_cfg iwl100_bg_cfg = {
638514ff 129 .name = "Intel(R) Centrino(R) Wireless-N 100 BG",
65af8dea 130 IWL_DEVICE_100,
1de19ecc
JS
131};
132
9d9b21d1
EG
133MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
134MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX));
This page took 0.654248 seconds and 5 git commands to generate.