1000.c 4.6 KB
Newer Older
1 2
/******************************************************************************
 *
W
Wey-Yi Guy 已提交
3
 * Copyright(c) 2008 - 2012 Intel Corporation. All rights reserved.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
 *
 * The full GNU General Public License is included in this distribution in the
 * file called LICENSE.
 *
 * Contact Information:
 *  Intel Linux Wireless <ilw@linux.intel.com>
 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
 *
 *****************************************************************************/

#include <linux/module.h>
28
#include <linux/stringify.h>
29
#include "iwl-config.h"
30 31
#include "iwl-csr.h"
#include "iwl-agn-hw.h"
32
#include "cfg.h"
33 34

/* Highest firmware API version supported */
35 36
#define IWL1000_UCODE_API_MAX 5
#define IWL100_UCODE_API_MAX 5
37 38 39 40

/* Oldest version we won't warn about */
#define IWL1000_UCODE_API_OK 5
#define IWL100_UCODE_API_OK 5
41 42

/* Lowest firmware API version supported */
43
#define IWL1000_UCODE_API_MIN 1
J
Jay Sternberg 已提交
44
#define IWL100_UCODE_API_MIN 5
45

46 47 48 49
/* EEPROM version */
#define EEPROM_1000_TX_POWER_VERSION	(4)
#define EEPROM_1000_EEPROM_VERSION	(0x15C)

50
#define IWL1000_FW_PRE "iwlwifi-1000-"
51
#define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode"
52

J
Jay Sternberg 已提交
53
#define IWL100_FW_PRE "iwlwifi-100-"
54
#define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode"
J
Jay Sternberg 已提交
55

56

57
static const struct iwl_base_params iwl1000_base_params = {
58
	.num_of_queues = IWLAGN_NUM_QUEUES,
59
	.eeprom_size = OTP_LOW_IMAGE_SIZE,
60
	.pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
61 62
	.max_ll_items = OTP_MAX_LL_ITEMS_1000,
	.shadow_ram_support = false,
63
	.led_compensation = 51,
64
	.support_ct_kill_exit = true,
65
	.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
66
	.chain_noise_scale = 1000,
67
	.wd_timeout = IWL_WATCHDOG_DISABLED,
W
Wey-Yi Guy 已提交
68
	.max_event_log_size = 128,
69
};
70 71

static const struct iwl_ht_params iwl1000_ht_params = {
72 73
	.ht_greenfield_support = true,
	.use_rts_for_aggregation = true, /* use rts/cts protection */
74
	.ht40_bands = BIT(IEEE80211_BAND_2GHZ),
75 76
};

77 78 79 80 81 82 83 84 85 86 87 88
static const struct iwl_eeprom_params iwl1000_eeprom_params = {
	.regulatory_bands = {
		EEPROM_REG_BAND_1_CHANNELS,
		EEPROM_REG_BAND_2_CHANNELS,
		EEPROM_REG_BAND_3_CHANNELS,
		EEPROM_REG_BAND_4_CHANNELS,
		EEPROM_REG_BAND_5_CHANNELS,
		EEPROM_REG_BAND_24_HT40_CHANNELS,
		EEPROM_REGULATORY_BAND_NO_HT40,
	}
};

89 90 91
#define IWL_DEVICE_1000						\
	.fw_name_pre = IWL1000_FW_PRE,				\
	.ucode_api_max = IWL1000_UCODE_API_MAX,			\
92
	.ucode_api_ok = IWL1000_UCODE_API_OK,			\
93
	.ucode_api_min = IWL1000_UCODE_API_MIN,			\
94
	.device_family = IWL_DEVICE_FAMILY_1000,		\
95 96
	.max_inst_size = IWLAGN_RTC_INST_SIZE,			\
	.max_data_size = IWLAGN_RTC_DATA_SIZE,			\
97 98 99
	.eeprom_ver = EEPROM_1000_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION,	\
	.base_params = &iwl1000_base_params,			\
100
	.eeprom_params = &iwl1000_eeprom_params,		\
101 102
	.led_mode = IWL_LED_BLINK

J
Johannes Berg 已提交
103
const struct iwl_cfg iwl1000_bgn_cfg = {
104
	.name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
105
	IWL_DEVICE_1000,
106 107
	.ht_params = &iwl1000_ht_params,
};
108

J
Johannes Berg 已提交
109
const struct iwl_cfg iwl1000_bg_cfg = {
110
	.name = "Intel(R) Centrino(R) Wireless-N 1000 BG",
111
	IWL_DEVICE_1000,
112 113
};

114 115 116
#define IWL_DEVICE_100						\
	.fw_name_pre = IWL100_FW_PRE,				\
	.ucode_api_max = IWL100_UCODE_API_MAX,			\
117
	.ucode_api_ok = IWL100_UCODE_API_OK,			\
118
	.ucode_api_min = IWL100_UCODE_API_MIN,			\
119
	.device_family = IWL_DEVICE_FAMILY_100,			\
120 121
	.max_inst_size = IWLAGN_RTC_INST_SIZE,			\
	.max_data_size = IWLAGN_RTC_DATA_SIZE,			\
122 123 124
	.eeprom_ver = EEPROM_1000_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION,	\
	.base_params = &iwl1000_base_params,			\
125
	.eeprom_params = &iwl1000_eeprom_params,		\
126 127 128
	.led_mode = IWL_LED_RF_STATE,				\
	.rx_with_siso_diversity = true

J
Johannes Berg 已提交
129
const struct iwl_cfg iwl100_bgn_cfg = {
130
	.name = "Intel(R) Centrino(R) Wireless-N 100 BGN",
131
	IWL_DEVICE_100,
132
	.ht_params = &iwl1000_ht_params,
J
Jay Sternberg 已提交
133 134
};

J
Johannes Berg 已提交
135
const struct iwl_cfg iwl100_bg_cfg = {
136
	.name = "Intel(R) Centrino(R) Wireless-N 100 BG",
137
	IWL_DEVICE_100,
J
Jay Sternberg 已提交
138 139
};

140 141
MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_OK));
MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_OK));