Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
Reinette Chatre | 1f44780 | 2010-01-15 13:43:41 -0800 | [diff] [blame] | 3 | * Copyright(c) 2007 - 2010 Intel Corporation. All rights reserved. |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [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 Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
| 23 | * |
| 24 | *****************************************************************************/ |
| 25 | |
| 26 | #include <linux/kernel.h> |
| 27 | #include <linux/module.h> |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 28 | #include <linux/init.h> |
| 29 | #include <linux/pci.h> |
| 30 | #include <linux/dma-mapping.h> |
| 31 | #include <linux/delay.h> |
Alexey Dobriyan | d43c36d | 2009-10-07 17:09:06 +0400 | [diff] [blame] | 32 | #include <linux/sched.h> |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 33 | #include <linux/skbuff.h> |
| 34 | #include <linux/netdevice.h> |
| 35 | #include <linux/wireless.h> |
| 36 | #include <net/mac80211.h> |
| 37 | #include <linux/etherdevice.h> |
| 38 | #include <asm/unaligned.h> |
| 39 | |
| 40 | #include "iwl-eeprom.h" |
Tomas Winkler | 3e0d4cb | 2008-04-24 11:55:38 -0700 | [diff] [blame] | 41 | #include "iwl-dev.h" |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 42 | #include "iwl-core.h" |
| 43 | #include "iwl-io.h" |
Tomas Winkler | e26e47d | 2008-06-12 09:46:56 +0800 | [diff] [blame] | 44 | #include "iwl-sta.h" |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 45 | #include "iwl-helpers.h" |
Johannes Berg | a117512 | 2010-01-21 06:21:10 -0800 | [diff] [blame] | 46 | #include "iwl-agn.h" |
Johannes Berg | e932a60 | 2009-10-02 13:44:03 -0700 | [diff] [blame] | 47 | #include "iwl-agn-led.h" |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 48 | #include "iwl-agn-hw.h" |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 49 | #include "iwl-5000-hw.h" |
Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 50 | #include "iwl-6000-hw.h" |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 51 | |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 52 | /* Highest firmware API version supported */ |
Jay Sternberg | c9d2fbf | 2009-05-19 14:56:36 -0700 | [diff] [blame] | 53 | #define IWL5000_UCODE_API_MAX 2 |
Jay Sternberg | 39e6d22 | 2009-02-27 16:21:19 -0800 | [diff] [blame] | 54 | #define IWL5150_UCODE_API_MAX 2 |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 55 | |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 56 | /* Lowest firmware API version supported */ |
| 57 | #define IWL5000_UCODE_API_MIN 1 |
| 58 | #define IWL5150_UCODE_API_MIN 1 |
| 59 | |
| 60 | #define IWL5000_FW_PRE "iwlwifi-5000-" |
| 61 | #define _IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE #api ".ucode" |
| 62 | #define IWL5000_MODULE_FIRMWARE(api) _IWL5000_MODULE_FIRMWARE(api) |
| 63 | |
| 64 | #define IWL5150_FW_PRE "iwlwifi-5150-" |
| 65 | #define _IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE #api ".ucode" |
| 66 | #define IWL5150_MODULE_FIRMWARE(api) _IWL5150_MODULE_FIRMWARE(api) |
Jay Sternberg | 4e062f9 | 2008-10-14 12:32:41 -0700 | [diff] [blame] | 67 | |
Wey-Yi Guy | 9371d4e | 2009-09-11 10:38:10 -0700 | [diff] [blame] | 68 | /* NIC configuration for 5000 series */ |
Wey-Yi Guy | 672639d | 2009-07-24 11:13:01 -0700 | [diff] [blame] | 69 | void iwl5000_nic_config(struct iwl_priv *priv) |
Tomas Winkler | e86fe9f | 2008-04-24 11:55:36 -0700 | [diff] [blame] | 70 | { |
| 71 | unsigned long flags; |
| 72 | u16 radio_cfg; |
Tomas Winkler | e86fe9f | 2008-04-24 11:55:36 -0700 | [diff] [blame] | 73 | |
| 74 | spin_lock_irqsave(&priv->lock, flags); |
| 75 | |
Tomas Winkler | e86fe9f | 2008-04-24 11:55:36 -0700 | [diff] [blame] | 76 | radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG); |
| 77 | |
| 78 | /* write radio config values to register */ |
Wey-Yi Guy | 9371d4e | 2009-09-11 10:38:10 -0700 | [diff] [blame] | 79 | if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) < EEPROM_RF_CONFIG_TYPE_MAX) |
Tomas Winkler | e86fe9f | 2008-04-24 11:55:36 -0700 | [diff] [blame] | 80 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, |
| 81 | EEPROM_RF_CFG_TYPE_MSK(radio_cfg) | |
| 82 | EEPROM_RF_CFG_STEP_MSK(radio_cfg) | |
| 83 | EEPROM_RF_CFG_DASH_MSK(radio_cfg)); |
| 84 | |
| 85 | /* set CSR_HW_CONFIG_REG for uCode use */ |
| 86 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, |
| 87 | CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI | |
| 88 | CSR_HW_IF_CONFIG_REG_BIT_MAC_SI); |
| 89 | |
Tomas Winkler | 4c43e0d | 2008-08-04 16:00:39 +0800 | [diff] [blame] | 90 | /* W/A : NIC is stuck in a reset state after Early PCIe power off |
| 91 | * (PCIe power is lost before PERST# is asserted), |
| 92 | * causing ME FW to lose ownership and not being able to obtain it back. |
| 93 | */ |
Tomas Winkler | 2d3db67 | 2008-08-04 16:00:47 +0800 | [diff] [blame] | 94 | iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG, |
Tomas Winkler | 4c43e0d | 2008-08-04 16:00:39 +0800 | [diff] [blame] | 95 | APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS, |
| 96 | ~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS); |
| 97 | |
Wey-Yi Guy | 02c06e4 | 2009-07-17 09:30:14 -0700 | [diff] [blame] | 98 | |
Tomas Winkler | e86fe9f | 2008-04-24 11:55:36 -0700 | [diff] [blame] | 99 | spin_unlock_irqrestore(&priv->lock, flags); |
| 100 | } |
| 101 | |
| 102 | |
Tomas Winkler | 25ae398 | 2008-04-24 11:55:27 -0700 | [diff] [blame] | 103 | /* |
| 104 | * EEPROM |
| 105 | */ |
| 106 | static u32 eeprom_indirect_address(const struct iwl_priv *priv, u32 address) |
| 107 | { |
| 108 | u16 offset = 0; |
| 109 | |
| 110 | if ((address & INDIRECT_ADDRESS) == 0) |
| 111 | return address; |
| 112 | |
| 113 | switch (address & INDIRECT_TYPE_MSK) { |
| 114 | case INDIRECT_HOST: |
| 115 | offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_HOST); |
| 116 | break; |
| 117 | case INDIRECT_GENERAL: |
| 118 | offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_GENERAL); |
| 119 | break; |
| 120 | case INDIRECT_REGULATORY: |
| 121 | offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_REGULATORY); |
| 122 | break; |
| 123 | case INDIRECT_CALIBRATION: |
| 124 | offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_CALIBRATION); |
| 125 | break; |
| 126 | case INDIRECT_PROCESS_ADJST: |
| 127 | offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_PROCESS_ADJST); |
| 128 | break; |
| 129 | case INDIRECT_OTHERS: |
| 130 | offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_OTHERS); |
| 131 | break; |
| 132 | default: |
Winkler, Tomas | 15b1687 | 2008-12-19 10:37:33 +0800 | [diff] [blame] | 133 | IWL_ERR(priv, "illegal indirect type: 0x%X\n", |
Tomas Winkler | 25ae398 | 2008-04-24 11:55:27 -0700 | [diff] [blame] | 134 | address & INDIRECT_TYPE_MSK); |
| 135 | break; |
| 136 | } |
| 137 | |
| 138 | /* translate the offset from words to byte */ |
| 139 | return (address & ADDRESS_MSK) + (offset << 1); |
| 140 | } |
| 141 | |
Wey-Yi Guy | 672639d | 2009-07-24 11:13:01 -0700 | [diff] [blame] | 142 | u16 iwl5000_eeprom_calib_version(struct iwl_priv *priv) |
Tomas Winkler | f1f6941 | 2008-04-24 11:55:35 -0700 | [diff] [blame] | 143 | { |
Tomas Winkler | f1f6941 | 2008-04-24 11:55:35 -0700 | [diff] [blame] | 144 | struct iwl_eeprom_calib_hdr { |
| 145 | u8 version; |
| 146 | u8 pa_type; |
| 147 | u16 voltage; |
| 148 | } *hdr; |
| 149 | |
Tomas Winkler | f1f6941 | 2008-04-24 11:55:35 -0700 | [diff] [blame] | 150 | hdr = (struct iwl_eeprom_calib_hdr *)iwl_eeprom_query_addr(priv, |
| 151 | EEPROM_5000_CALIB_ALL); |
Tomas Winkler | 0ef2ca6 | 2008-10-23 23:48:51 -0700 | [diff] [blame] | 152 | return hdr->version; |
Tomas Winkler | f1f6941 | 2008-04-24 11:55:35 -0700 | [diff] [blame] | 153 | |
| 154 | } |
| 155 | |
Emmanuel Grumbach | 33fd503 | 2008-04-24 11:55:30 -0700 | [diff] [blame] | 156 | static struct iwl_sensitivity_ranges iwl5000_sensitivity = { |
| 157 | .min_nrg_cck = 95, |
Wey-Yi Guy | fe6efb4 | 2009-06-12 13:22:54 -0700 | [diff] [blame] | 158 | .max_nrg_cck = 0, /* not used, set to 0 */ |
Emmanuel Grumbach | 33fd503 | 2008-04-24 11:55:30 -0700 | [diff] [blame] | 159 | .auto_corr_min_ofdm = 90, |
| 160 | .auto_corr_min_ofdm_mrc = 170, |
| 161 | .auto_corr_min_ofdm_x1 = 120, |
| 162 | .auto_corr_min_ofdm_mrc_x1 = 240, |
| 163 | |
| 164 | .auto_corr_max_ofdm = 120, |
| 165 | .auto_corr_max_ofdm_mrc = 210, |
Wey-Yi Guy | 9bead76 | 2010-01-20 12:22:53 -0800 | [diff] [blame] | 166 | .auto_corr_max_ofdm_x1 = 120, |
| 167 | .auto_corr_max_ofdm_mrc_x1 = 240, |
Emmanuel Grumbach | 33fd503 | 2008-04-24 11:55:30 -0700 | [diff] [blame] | 168 | |
| 169 | .auto_corr_min_cck = 125, |
| 170 | .auto_corr_max_cck = 200, |
| 171 | .auto_corr_min_cck_mrc = 170, |
| 172 | .auto_corr_max_cck_mrc = 400, |
| 173 | .nrg_th_cck = 95, |
| 174 | .nrg_th_ofdm = 95, |
Wey-Yi Guy | 55036d6 | 2009-10-09 13:20:24 -0700 | [diff] [blame] | 175 | |
| 176 | .barker_corr_th_min = 190, |
| 177 | .barker_corr_th_min_mrc = 390, |
| 178 | .nrg_th_cca = 62, |
Emmanuel Grumbach | 33fd503 | 2008-04-24 11:55:30 -0700 | [diff] [blame] | 179 | }; |
| 180 | |
Wey-Yi Guy | 9d67187 | 2009-06-12 13:22:53 -0700 | [diff] [blame] | 181 | static struct iwl_sensitivity_ranges iwl5150_sensitivity = { |
| 182 | .min_nrg_cck = 95, |
| 183 | .max_nrg_cck = 0, /* not used, set to 0 */ |
| 184 | .auto_corr_min_ofdm = 90, |
| 185 | .auto_corr_min_ofdm_mrc = 170, |
| 186 | .auto_corr_min_ofdm_x1 = 105, |
| 187 | .auto_corr_min_ofdm_mrc_x1 = 220, |
| 188 | |
| 189 | .auto_corr_max_ofdm = 120, |
| 190 | .auto_corr_max_ofdm_mrc = 210, |
| 191 | /* max = min for performance bug in 5150 DSP */ |
| 192 | .auto_corr_max_ofdm_x1 = 105, |
| 193 | .auto_corr_max_ofdm_mrc_x1 = 220, |
| 194 | |
| 195 | .auto_corr_min_cck = 125, |
| 196 | .auto_corr_max_cck = 200, |
| 197 | .auto_corr_min_cck_mrc = 170, |
| 198 | .auto_corr_max_cck_mrc = 400, |
| 199 | .nrg_th_cck = 95, |
| 200 | .nrg_th_ofdm = 95, |
Wey-Yi Guy | 55036d6 | 2009-10-09 13:20:24 -0700 | [diff] [blame] | 201 | |
| 202 | .barker_corr_th_min = 190, |
| 203 | .barker_corr_th_min_mrc = 390, |
| 204 | .nrg_th_cca = 62, |
Wey-Yi Guy | 9d67187 | 2009-06-12 13:22:53 -0700 | [diff] [blame] | 205 | }; |
| 206 | |
Wey-Yi Guy | 672639d | 2009-07-24 11:13:01 -0700 | [diff] [blame] | 207 | const u8 *iwl5000_eeprom_query_addr(const struct iwl_priv *priv, |
Tomas Winkler | 25ae398 | 2008-04-24 11:55:27 -0700 | [diff] [blame] | 208 | size_t offset) |
| 209 | { |
| 210 | u32 address = eeprom_indirect_address(priv, offset); |
| 211 | BUG_ON(address >= priv->cfg->eeprom_size); |
| 212 | return &priv->eeprom[address]; |
| 213 | } |
| 214 | |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 215 | static void iwl5150_set_ct_threshold(struct iwl_priv *priv) |
Tomas Winkler | 339afc8 | 2008-12-01 16:32:20 -0800 | [diff] [blame] | 216 | { |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 217 | const s32 volt2temp_coef = IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF; |
Wey-Yi Guy | 672639d | 2009-07-24 11:13:01 -0700 | [diff] [blame] | 218 | s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) - |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 219 | iwl_temp_calib_to_offset(priv); |
| 220 | |
| 221 | priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef; |
| 222 | } |
| 223 | |
| 224 | static void iwl5000_set_ct_threshold(struct iwl_priv *priv) |
| 225 | { |
| 226 | /* want Celsius */ |
Wey-Yi Guy | 672639d | 2009-07-24 11:13:01 -0700 | [diff] [blame] | 227 | priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY; |
Tomas Winkler | 339afc8 | 2008-12-01 16:32:20 -0800 | [diff] [blame] | 228 | } |
| 229 | |
Wey-Yi Guy | 672639d | 2009-07-24 11:13:01 -0700 | [diff] [blame] | 230 | int iwl5000_hw_set_hw_params(struct iwl_priv *priv) |
Tomas Winkler | fdd3e8a | 2008-04-24 11:55:28 -0700 | [diff] [blame] | 231 | { |
Wey-Yi Guy | 88804e2 | 2009-10-09 13:20:28 -0700 | [diff] [blame] | 232 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 233 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) |
Wey-Yi Guy | 88804e2 | 2009-10-09 13:20:28 -0700 | [diff] [blame] | 234 | priv->cfg->num_of_queues = |
| 235 | priv->cfg->mod_params->num_of_queues; |
Tomas Winkler | 25ae398 | 2008-04-24 11:55:27 -0700 | [diff] [blame] | 236 | |
Wey-Yi Guy | 88804e2 | 2009-10-09 13:20:28 -0700 | [diff] [blame] | 237 | priv->hw_params.max_txq_num = priv->cfg->num_of_queues; |
Zhu Yi | f3f911d | 2008-12-02 12:14:04 -0800 | [diff] [blame] | 238 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; |
Tomas Winkler | 4ddbb7d | 2008-11-07 09:58:40 -0800 | [diff] [blame] | 239 | priv->hw_params.scd_bc_tbls_size = |
Wey-Yi Guy | 88804e2 | 2009-10-09 13:20:28 -0700 | [diff] [blame] | 240 | priv->cfg->num_of_queues * |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 241 | sizeof(struct iwlagn_scd_bc_tbl); |
Samuel Ortiz | a8e74e2 | 2009-01-23 13:45:14 -0800 | [diff] [blame] | 242 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
Tomas Winkler | fdd3e8a | 2008-04-24 11:55:28 -0700 | [diff] [blame] | 243 | priv->hw_params.max_stations = IWL5000_STATION_COUNT; |
| 244 | priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID; |
Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 245 | |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 246 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; |
| 247 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; |
Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 248 | |
Ron Rindjunsky | da154e3 | 2008-06-30 17:23:20 +0800 | [diff] [blame] | 249 | priv->hw_params.max_bsm_size = 0; |
Wey-Yi Guy | 7aafef1 | 2009-08-07 15:41:38 -0700 | [diff] [blame] | 250 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | |
Tomas Winkler | fdd3e8a | 2008-04-24 11:55:28 -0700 | [diff] [blame] | 251 | BIT(IEEE80211_BAND_5GHZ); |
Winkler, Tomas | 141c43a | 2009-01-08 10:19:53 -0800 | [diff] [blame] | 252 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; |
| 253 | |
Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 254 | priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); |
| 255 | priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant); |
| 256 | priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; |
| 257 | priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant; |
Emmanuel Grumbach | c031bf8 | 2008-04-24 11:55:29 -0700 | [diff] [blame] | 258 | |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 259 | if (priv->cfg->ops->lib->temp_ops.set_ct_kill) |
| 260 | priv->cfg->ops->lib->temp_ops.set_ct_kill(priv); |
Emmanuel Grumbach | c031bf8 | 2008-04-24 11:55:29 -0700 | [diff] [blame] | 261 | |
Wey-Yi Guy | 9d67187 | 2009-06-12 13:22:53 -0700 | [diff] [blame] | 262 | /* Set initial sensitivity parameters */ |
Tomas Winkler | be5d56e | 2008-10-08 09:37:27 +0800 | [diff] [blame] | 263 | /* Set initial calibration set */ |
| 264 | switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) { |
Tomas Winkler | be5d56e | 2008-10-08 09:37:27 +0800 | [diff] [blame] | 265 | case CSR_HW_REV_TYPE_5150: |
Wey-Yi Guy | 9d67187 | 2009-06-12 13:22:53 -0700 | [diff] [blame] | 266 | priv->hw_params.sens = &iwl5150_sensitivity; |
Tomas Winkler | 819500c | 2008-12-01 16:32:19 -0800 | [diff] [blame] | 267 | priv->hw_params.calib_init_cfg = |
Winkler, Tomas | 7470d7f | 2008-12-01 16:32:22 -0800 | [diff] [blame] | 268 | BIT(IWL_CALIB_DC) | |
| 269 | BIT(IWL_CALIB_LO) | |
| 270 | BIT(IWL_CALIB_TX_IQ) | |
| 271 | BIT(IWL_CALIB_BASE_BAND); |
Tomas Winkler | 819500c | 2008-12-01 16:32:19 -0800 | [diff] [blame] | 272 | |
Tomas Winkler | be5d56e | 2008-10-08 09:37:27 +0800 | [diff] [blame] | 273 | break; |
Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 274 | default: |
Wey-Yi Guy | 9d67187 | 2009-06-12 13:22:53 -0700 | [diff] [blame] | 275 | priv->hw_params.sens = &iwl5000_sensitivity; |
Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 276 | priv->hw_params.calib_init_cfg = |
| 277 | BIT(IWL_CALIB_XTAL) | |
| 278 | BIT(IWL_CALIB_LO) | |
| 279 | BIT(IWL_CALIB_TX_IQ) | |
| 280 | BIT(IWL_CALIB_TX_IQ_PERD) | |
| 281 | BIT(IWL_CALIB_BASE_BAND); |
| 282 | break; |
Tomas Winkler | be5d56e | 2008-10-08 09:37:27 +0800 | [diff] [blame] | 283 | } |
| 284 | |
Tomas Winkler | fdd3e8a | 2008-04-24 11:55:28 -0700 | [diff] [blame] | 285 | return 0; |
| 286 | } |
Ron Rindjunsky | d4100dd | 2008-04-24 11:55:33 -0700 | [diff] [blame] | 287 | |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 288 | static inline u32 iwl5000_get_scd_ssn(struct iwl5000_tx_resp *tx_resp) |
| 289 | { |
Tomas Winkler | 3ac7f14 | 2008-07-21 02:40:14 +0300 | [diff] [blame] | 290 | return le32_to_cpup((__le32 *)&tx_resp->status + |
Tomas Winkler | 25a6572 | 2008-06-12 09:47:07 +0800 | [diff] [blame] | 291 | tx_resp->frame_count) & MAX_SN; |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 292 | } |
| 293 | |
| 294 | static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv, |
| 295 | struct iwl_ht_agg *agg, |
| 296 | struct iwl5000_tx_resp *tx_resp, |
Tomas Winkler | 25a6572 | 2008-06-12 09:47:07 +0800 | [diff] [blame] | 297 | int txq_id, u16 start_idx) |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 298 | { |
| 299 | u16 status; |
| 300 | struct agg_tx_status *frame_status = &tx_resp->status; |
| 301 | struct ieee80211_tx_info *info = NULL; |
| 302 | struct ieee80211_hdr *hdr = NULL; |
Tomas Winkler | e7d326a | 2008-06-12 09:47:11 +0800 | [diff] [blame] | 303 | u32 rate_n_flags = le32_to_cpu(tx_resp->rate_n_flags); |
Tomas Winkler | 25a6572 | 2008-06-12 09:47:07 +0800 | [diff] [blame] | 304 | int i, sh, idx; |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 305 | u16 seq; |
| 306 | |
| 307 | if (agg->wait_for_ba) |
Tomas Winkler | e162344 | 2009-01-27 14:27:56 -0800 | [diff] [blame] | 308 | IWL_DEBUG_TX_REPLY(priv, "got tx response w/o block-ack\n"); |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 309 | |
| 310 | agg->frame_count = tx_resp->frame_count; |
| 311 | agg->start_idx = start_idx; |
Tomas Winkler | e7d326a | 2008-06-12 09:47:11 +0800 | [diff] [blame] | 312 | agg->rate_n_flags = rate_n_flags; |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 313 | agg->bitmap = 0; |
| 314 | |
| 315 | /* # frames attempted by Tx command */ |
| 316 | if (agg->frame_count == 1) { |
| 317 | /* Only one frame was attempted; no block-ack will arrive */ |
| 318 | status = le16_to_cpu(frame_status[0].status); |
Tomas Winkler | 25a6572 | 2008-06-12 09:47:07 +0800 | [diff] [blame] | 319 | idx = start_idx; |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 320 | |
| 321 | /* FIXME: code repetition */ |
Tomas Winkler | e162344 | 2009-01-27 14:27:56 -0800 | [diff] [blame] | 322 | IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, StartIdx=%d idx=%d\n", |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 323 | agg->frame_count, agg->start_idx, idx); |
| 324 | |
| 325 | info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]); |
Johannes Berg | e6a9854 | 2008-10-21 12:40:02 +0200 | [diff] [blame] | 326 | info->status.rates[0].count = tx_resp->failure_frame + 1; |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 327 | info->flags &= ~IEEE80211_TX_CTL_AMPDU; |
Johannes Berg | c397bf1 | 2009-11-13 11:56:35 -0800 | [diff] [blame] | 328 | info->flags |= iwl_tx_status_to_mac80211(status); |
Tomas Winkler | e7d326a | 2008-06-12 09:47:11 +0800 | [diff] [blame] | 329 | iwl_hwrate_to_tx_control(priv, rate_n_flags, info); |
| 330 | |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 331 | /* FIXME: code repetition end */ |
| 332 | |
Tomas Winkler | e162344 | 2009-01-27 14:27:56 -0800 | [diff] [blame] | 333 | IWL_DEBUG_TX_REPLY(priv, "1 Frame 0x%x failure :%d\n", |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 334 | status & 0xff, tx_resp->failure_frame); |
Tomas Winkler | e162344 | 2009-01-27 14:27:56 -0800 | [diff] [blame] | 335 | IWL_DEBUG_TX_REPLY(priv, "Rate Info rate_n_flags=%x\n", rate_n_flags); |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 336 | |
| 337 | agg->wait_for_ba = 0; |
| 338 | } else { |
| 339 | /* Two or more frames were attempted; expect block-ack */ |
| 340 | u64 bitmap = 0; |
| 341 | int start = agg->start_idx; |
| 342 | |
| 343 | /* Construct bit-map of pending frames within Tx window */ |
| 344 | for (i = 0; i < agg->frame_count; i++) { |
| 345 | u16 sc; |
| 346 | status = le16_to_cpu(frame_status[i].status); |
| 347 | seq = le16_to_cpu(frame_status[i].sequence); |
| 348 | idx = SEQ_TO_INDEX(seq); |
| 349 | txq_id = SEQ_TO_QUEUE(seq); |
| 350 | |
| 351 | if (status & (AGG_TX_STATE_FEW_BYTES_MSK | |
| 352 | AGG_TX_STATE_ABORT_MSK)) |
| 353 | continue; |
| 354 | |
Tomas Winkler | e162344 | 2009-01-27 14:27:56 -0800 | [diff] [blame] | 355 | IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, txq_id=%d idx=%d\n", |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 356 | agg->frame_count, txq_id, idx); |
| 357 | |
| 358 | hdr = iwl_tx_queue_get_hdr(priv, txq_id, idx); |
Stanislaw Gruszka | 6c6a22e | 2009-09-23 10:51:34 +0200 | [diff] [blame] | 359 | if (!hdr) { |
| 360 | IWL_ERR(priv, |
| 361 | "BUG_ON idx doesn't point to valid skb" |
| 362 | " idx=%d, txq_id=%d\n", idx, txq_id); |
| 363 | return -1; |
| 364 | } |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 365 | |
| 366 | sc = le16_to_cpu(hdr->seq_ctrl); |
| 367 | if (idx != (SEQ_TO_SN(sc) & 0xff)) { |
Winkler, Tomas | 15b1687 | 2008-12-19 10:37:33 +0800 | [diff] [blame] | 368 | IWL_ERR(priv, |
| 369 | "BUG_ON idx doesn't match seq control" |
| 370 | " idx=%d, seq_idx=%d, seq=%d\n", |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 371 | idx, SEQ_TO_SN(sc), |
| 372 | hdr->seq_ctrl); |
| 373 | return -1; |
| 374 | } |
| 375 | |
Tomas Winkler | e162344 | 2009-01-27 14:27:56 -0800 | [diff] [blame] | 376 | IWL_DEBUG_TX_REPLY(priv, "AGG Frame i=%d idx %d seq=%d\n", |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 377 | i, idx, SEQ_TO_SN(sc)); |
| 378 | |
| 379 | sh = idx - start; |
| 380 | if (sh > 64) { |
| 381 | sh = (start - idx) + 0xff; |
| 382 | bitmap = bitmap << sh; |
| 383 | sh = 0; |
| 384 | start = idx; |
| 385 | } else if (sh < -64) |
| 386 | sh = 0xff - (start - idx); |
| 387 | else if (sh < 0) { |
| 388 | sh = start - idx; |
| 389 | start = idx; |
| 390 | bitmap = bitmap << sh; |
| 391 | sh = 0; |
| 392 | } |
Emmanuel Grumbach | 4aa41f1 | 2008-07-18 13:53:09 +0800 | [diff] [blame] | 393 | bitmap |= 1ULL << sh; |
Tomas Winkler | e162344 | 2009-01-27 14:27:56 -0800 | [diff] [blame] | 394 | IWL_DEBUG_TX_REPLY(priv, "start=%d bitmap=0x%llx\n", |
Emmanuel Grumbach | 4aa41f1 | 2008-07-18 13:53:09 +0800 | [diff] [blame] | 395 | start, (unsigned long long)bitmap); |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 396 | } |
| 397 | |
| 398 | agg->bitmap = bitmap; |
| 399 | agg->start_idx = start; |
Tomas Winkler | e162344 | 2009-01-27 14:27:56 -0800 | [diff] [blame] | 400 | IWL_DEBUG_TX_REPLY(priv, "Frames %d start_idx=%d bitmap=0x%llx\n", |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 401 | agg->frame_count, agg->start_idx, |
| 402 | (unsigned long long)agg->bitmap); |
| 403 | |
| 404 | if (bitmap) |
| 405 | agg->wait_for_ba = 1; |
| 406 | } |
| 407 | return 0; |
| 408 | } |
| 409 | |
| 410 | static void iwl5000_rx_reply_tx(struct iwl_priv *priv, |
| 411 | struct iwl_rx_mem_buffer *rxb) |
| 412 | { |
Zhu Yi | 2f30122 | 2009-10-09 17:19:45 +0800 | [diff] [blame] | 413 | struct iwl_rx_packet *pkt = rxb_addr(rxb); |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 414 | u16 sequence = le16_to_cpu(pkt->hdr.sequence); |
| 415 | int txq_id = SEQ_TO_QUEUE(sequence); |
| 416 | int index = SEQ_TO_INDEX(sequence); |
| 417 | struct iwl_tx_queue *txq = &priv->txq[txq_id]; |
| 418 | struct ieee80211_tx_info *info; |
| 419 | struct iwl5000_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; |
| 420 | u32 status = le16_to_cpu(tx_resp->status.status); |
Tomas Winkler | 3fd07a1 | 2008-10-23 23:48:49 -0700 | [diff] [blame] | 421 | int tid; |
| 422 | int sta_id; |
| 423 | int freed; |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 424 | |
| 425 | if ((index >= txq->q.n_bd) || (iwl_queue_used(&txq->q, index) == 0)) { |
Winkler, Tomas | 15b1687 | 2008-12-19 10:37:33 +0800 | [diff] [blame] | 426 | IWL_ERR(priv, "Read index for DMA queue txq_id (%d) index %d " |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 427 | "is out of range [0-%d] %d %d\n", txq_id, |
| 428 | index, txq->q.n_bd, txq->q.write_ptr, |
| 429 | txq->q.read_ptr); |
| 430 | return; |
| 431 | } |
| 432 | |
| 433 | info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb[0]); |
| 434 | memset(&info->status, 0, sizeof(info->status)); |
| 435 | |
Tomas Winkler | 3fd07a1 | 2008-10-23 23:48:49 -0700 | [diff] [blame] | 436 | tid = (tx_resp->ra_tid & IWL50_TX_RES_TID_MSK) >> IWL50_TX_RES_TID_POS; |
| 437 | sta_id = (tx_resp->ra_tid & IWL50_TX_RES_RA_MSK) >> IWL50_TX_RES_RA_POS; |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 438 | |
| 439 | if (txq->sched_retry) { |
| 440 | const u32 scd_ssn = iwl5000_get_scd_ssn(tx_resp); |
| 441 | struct iwl_ht_agg *agg = NULL; |
| 442 | |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 443 | agg = &priv->stations[sta_id].tid[tid].agg; |
| 444 | |
Tomas Winkler | 25a6572 | 2008-06-12 09:47:07 +0800 | [diff] [blame] | 445 | iwl5000_tx_status_reply_tx(priv, agg, tx_resp, txq_id, index); |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 446 | |
Ron Rindjunsky | 3235427 | 2008-07-01 10:44:51 +0300 | [diff] [blame] | 447 | /* check if BAR is needed */ |
| 448 | if ((tx_resp->frame_count == 1) && !iwl_is_tx_success(status)) |
| 449 | info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK; |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 450 | |
| 451 | if (txq->q.read_ptr != (scd_ssn & 0xff)) { |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 452 | index = iwl_queue_dec_wrap(scd_ssn & 0xff, txq->q.n_bd); |
Tomas Winkler | e162344 | 2009-01-27 14:27:56 -0800 | [diff] [blame] | 453 | IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim " |
Tomas Winkler | 3fd07a1 | 2008-10-23 23:48:49 -0700 | [diff] [blame] | 454 | "scd_ssn=%d idx=%d txq=%d swq=%d\n", |
| 455 | scd_ssn , index, txq_id, txq->swq_id); |
| 456 | |
Tomas Winkler | 17b8892 | 2008-05-29 16:35:12 +0800 | [diff] [blame] | 457 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); |
Wey-Yi Guy | a239a8b | 2010-02-19 15:47:32 -0800 | [diff] [blame] | 458 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 459 | |
Tomas Winkler | 3fd07a1 | 2008-10-23 23:48:49 -0700 | [diff] [blame] | 460 | if (priv->mac80211_registered && |
| 461 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && |
| 462 | (agg->state != IWL_EMPTYING_HW_QUEUE_DELBA)) { |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 463 | if (agg->state == IWL_AGG_OFF) |
Johannes Berg | e4e72fb | 2009-03-23 17:28:42 +0100 | [diff] [blame] | 464 | iwl_wake_queue(priv, txq_id); |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 465 | else |
Johannes Berg | e4e72fb | 2009-03-23 17:28:42 +0100 | [diff] [blame] | 466 | iwl_wake_queue(priv, txq->swq_id); |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 467 | } |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 468 | } |
| 469 | } else { |
Tomas Winkler | 3fd07a1 | 2008-10-23 23:48:49 -0700 | [diff] [blame] | 470 | BUG_ON(txq_id != txq->swq_id); |
| 471 | |
Johannes Berg | e6a9854 | 2008-10-21 12:40:02 +0200 | [diff] [blame] | 472 | info->status.rates[0].count = tx_resp->failure_frame + 1; |
Johannes Berg | c397bf1 | 2009-11-13 11:56:35 -0800 | [diff] [blame] | 473 | info->flags |= iwl_tx_status_to_mac80211(status); |
Tomas Winkler | e7d326a | 2008-06-12 09:47:11 +0800 | [diff] [blame] | 474 | iwl_hwrate_to_tx_control(priv, |
Ron Rindjunsky | 4f85f5b | 2008-06-09 22:54:35 +0300 | [diff] [blame] | 475 | le32_to_cpu(tx_resp->rate_n_flags), |
| 476 | info); |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 477 | |
Tomas Winkler | e162344 | 2009-01-27 14:27:56 -0800 | [diff] [blame] | 478 | IWL_DEBUG_TX_REPLY(priv, "TXQ %d status %s (0x%08x) rate_n_flags " |
Tomas Winkler | 3fd07a1 | 2008-10-23 23:48:49 -0700 | [diff] [blame] | 479 | "0x%x retries %d\n", |
| 480 | txq_id, |
| 481 | iwl_get_tx_fail_reason(status), status, |
| 482 | le32_to_cpu(tx_resp->rate_n_flags), |
| 483 | tx_resp->failure_frame); |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 484 | |
Tomas Winkler | 3fd07a1 | 2008-10-23 23:48:49 -0700 | [diff] [blame] | 485 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); |
Stanislaw Gruszka | a120e91 | 2010-02-19 15:47:33 -0800 | [diff] [blame] | 486 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
Tomas Winkler | 3fd07a1 | 2008-10-23 23:48:49 -0700 | [diff] [blame] | 487 | |
| 488 | if (priv->mac80211_registered && |
| 489 | (iwl_queue_space(&txq->q) > txq->q.low_mark)) |
Johannes Berg | e4e72fb | 2009-03-23 17:28:42 +0100 | [diff] [blame] | 490 | iwl_wake_queue(priv, txq_id); |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 491 | } |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 492 | |
Stanislaw Gruszka | a120e91 | 2010-02-19 15:47:33 -0800 | [diff] [blame] | 493 | iwl_txq_check_empty(priv, sta_id, tid, txq_id); |
Tomas Winkler | 3fd07a1 | 2008-10-23 23:48:49 -0700 | [diff] [blame] | 494 | |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 495 | if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) |
Winkler, Tomas | 15b1687 | 2008-12-19 10:37:33 +0800 | [diff] [blame] | 496 | IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 497 | } |
| 498 | |
Wey-Yi Guy | 672639d | 2009-07-24 11:13:01 -0700 | [diff] [blame] | 499 | void iwl5000_setup_deferred_work(struct iwl_priv *priv) |
Emmanuel Grumbach | 203566f | 2008-06-12 09:46:54 +0800 | [diff] [blame] | 500 | { |
| 501 | /* in 5000 the tx power calibration is done in uCode */ |
| 502 | priv->disable_tx_power_cal = 1; |
| 503 | } |
| 504 | |
Wey-Yi Guy | 672639d | 2009-07-24 11:13:01 -0700 | [diff] [blame] | 505 | void iwl5000_rx_handler_setup(struct iwl_priv *priv) |
Ron Rindjunsky | b600e4e | 2008-05-15 13:54:11 +0800 | [diff] [blame] | 506 | { |
Tomas Winkler | 7c616cb | 2008-05-29 16:35:05 +0800 | [diff] [blame] | 507 | /* init calibration handlers */ |
| 508 | priv->rx_handlers[CALIBRATION_RES_NOTIFICATION] = |
Wey-Yi Guy | 741a626 | 2010-03-16 12:37:24 -0700 | [diff] [blame^] | 509 | iwlagn_rx_calib_result; |
Tomas Winkler | 7c616cb | 2008-05-29 16:35:05 +0800 | [diff] [blame] | 510 | priv->rx_handlers[CALIBRATION_COMPLETE_NOTIFICATION] = |
Wey-Yi Guy | 741a626 | 2010-03-16 12:37:24 -0700 | [diff] [blame^] | 511 | iwlagn_rx_calib_complete; |
Ron Rindjunsky | e532fa0 | 2008-05-29 16:35:09 +0800 | [diff] [blame] | 512 | priv->rx_handlers[REPLY_TX] = iwl5000_rx_reply_tx; |
Ron Rindjunsky | b600e4e | 2008-05-15 13:54:11 +0800 | [diff] [blame] | 513 | } |
| 514 | |
Tomas Winkler | 7c616cb | 2008-05-29 16:35:05 +0800 | [diff] [blame] | 515 | |
Wey-Yi Guy | 672639d | 2009-07-24 11:13:01 -0700 | [diff] [blame] | 516 | int iwl5000_hw_valid_rtc_data_addr(u32 addr) |
Ron Rindjunsky | 87283cc | 2008-05-29 16:34:47 +0800 | [diff] [blame] | 517 | { |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 518 | return (addr >= IWLAGN_RTC_DATA_LOWER_BOUND) && |
| 519 | (addr < IWLAGN_RTC_DATA_UPPER_BOUND); |
Ron Rindjunsky | 87283cc | 2008-05-29 16:34:47 +0800 | [diff] [blame] | 520 | } |
| 521 | |
Wey-Yi Guy | 672639d | 2009-07-24 11:13:01 -0700 | [diff] [blame] | 522 | int iwl5000_send_tx_power(struct iwl_priv *priv) |
Tomas Winkler | 630fe9b | 2008-06-12 09:47:08 +0800 | [diff] [blame] | 523 | { |
| 524 | struct iwl5000_tx_power_dbm_cmd tx_power_cmd; |
Jay Sternberg | 76a2407 | 2009-01-29 11:09:14 -0800 | [diff] [blame] | 525 | u8 tx_ant_cfg_cmd; |
Tomas Winkler | 630fe9b | 2008-06-12 09:47:08 +0800 | [diff] [blame] | 526 | |
| 527 | /* half dBm need to multiply */ |
| 528 | tx_power_cmd.global_lmt = (s8)(2 * priv->tx_power_user_lmt); |
Wey-Yi Guy | ae16fc3 | 2009-11-13 11:56:30 -0800 | [diff] [blame] | 529 | |
| 530 | if (priv->tx_power_lmt_in_half_dbm && |
| 531 | priv->tx_power_lmt_in_half_dbm < tx_power_cmd.global_lmt) { |
| 532 | /* |
| 533 | * For the newer devices which using enhanced/extend tx power |
| 534 | * table in EEPROM, the format is in half dBm. driver need to |
| 535 | * convert to dBm format before report to mac80211. |
| 536 | * By doing so, there is a possibility of 1/2 dBm resolution |
| 537 | * lost. driver will perform "round-up" operation before |
| 538 | * reporting, but it will cause 1/2 dBm tx power over the |
| 539 | * regulatory limit. Perform the checking here, if the |
| 540 | * "tx_power_user_lmt" is higher than EEPROM value (in |
| 541 | * half-dBm format), lower the tx power based on EEPROM |
| 542 | */ |
| 543 | tx_power_cmd.global_lmt = priv->tx_power_lmt_in_half_dbm; |
| 544 | } |
Gregory Greenman | 853554a | 2008-06-30 17:23:01 +0800 | [diff] [blame] | 545 | tx_power_cmd.flags = IWL50_TX_POWER_NO_CLOSED; |
Tomas Winkler | 630fe9b | 2008-06-12 09:47:08 +0800 | [diff] [blame] | 546 | tx_power_cmd.srv_chan_lmt = IWL50_TX_POWER_AUTO; |
Jay Sternberg | 76a2407 | 2009-01-29 11:09:14 -0800 | [diff] [blame] | 547 | |
| 548 | if (IWL_UCODE_API(priv->ucode_ver) == 1) |
| 549 | tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD_V1; |
| 550 | else |
| 551 | tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD; |
| 552 | |
| 553 | return iwl_send_cmd_pdu_async(priv, tx_ant_cfg_cmd, |
Tomas Winkler | 630fe9b | 2008-06-12 09:47:08 +0800 | [diff] [blame] | 554 | sizeof(tx_power_cmd), &tx_power_cmd, |
| 555 | NULL); |
| 556 | } |
| 557 | |
Wey-Yi Guy | 672639d | 2009-07-24 11:13:01 -0700 | [diff] [blame] | 558 | void iwl5000_temperature(struct iwl_priv *priv) |
Emmanuel Grumbach | 8f91aec | 2008-06-30 17:23:07 +0800 | [diff] [blame] | 559 | { |
| 560 | /* store temperature from statistics (in Celsius) */ |
Zhu Yi | 5225640 | 2008-06-30 17:23:31 +0800 | [diff] [blame] | 561 | priv->temperature = le32_to_cpu(priv->statistics.general.temperature); |
Wey-Yi Guy | 39b73fb | 2009-07-24 11:13:02 -0700 | [diff] [blame] | 562 | iwl_tt_handler(priv); |
Emmanuel Grumbach | 8f91aec | 2008-06-30 17:23:07 +0800 | [diff] [blame] | 563 | } |
Ron Rindjunsky | fe7a90c | 2008-05-29 16:35:14 +0800 | [diff] [blame] | 564 | |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 565 | static void iwl5150_temperature(struct iwl_priv *priv) |
| 566 | { |
| 567 | u32 vt = 0; |
| 568 | s32 offset = iwl_temp_calib_to_offset(priv); |
| 569 | |
| 570 | vt = le32_to_cpu(priv->statistics.general.temperature); |
| 571 | vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset; |
| 572 | /* now vt hold the temperature in Kelvin */ |
| 573 | priv->temperature = KELVIN_TO_CELSIUS(vt); |
Wey-Yi Guy | 15993e0 | 2009-08-13 13:31:00 -0700 | [diff] [blame] | 574 | iwl_tt_handler(priv); |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 575 | } |
| 576 | |
Wey-Yi Guy | 4a56e96 | 2009-10-23 13:42:29 -0700 | [diff] [blame] | 577 | static int iwl5000_hw_channel_switch(struct iwl_priv *priv, u16 channel) |
| 578 | { |
| 579 | struct iwl5000_channel_switch_cmd cmd; |
| 580 | const struct iwl_channel_info *ch_info; |
| 581 | struct iwl_host_cmd hcmd = { |
| 582 | .id = REPLY_CHANNEL_SWITCH, |
| 583 | .len = sizeof(cmd), |
| 584 | .flags = CMD_SIZE_HUGE, |
| 585 | .data = &cmd, |
| 586 | }; |
| 587 | |
| 588 | IWL_DEBUG_11H(priv, "channel switch from %d to %d\n", |
| 589 | priv->active_rxon.channel, channel); |
| 590 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; |
| 591 | cmd.channel = cpu_to_le16(channel); |
Wey-Yi Guy | 0924e51 | 2009-11-06 14:52:54 -0800 | [diff] [blame] | 592 | cmd.rxon_flags = priv->staging_rxon.flags; |
| 593 | cmd.rxon_filter_flags = priv->staging_rxon.filter_flags; |
Wey-Yi Guy | 4a56e96 | 2009-10-23 13:42:29 -0700 | [diff] [blame] | 594 | cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time); |
| 595 | ch_info = iwl_get_channel_info(priv, priv->band, channel); |
| 596 | if (ch_info) |
| 597 | cmd.expect_beacon = is_channel_radar(ch_info); |
| 598 | else { |
| 599 | IWL_ERR(priv, "invalid channel switch from %u to %u\n", |
| 600 | priv->active_rxon.channel, channel); |
| 601 | return -EFAULT; |
| 602 | } |
Wey-Yi Guy | 0924e51 | 2009-11-06 14:52:54 -0800 | [diff] [blame] | 603 | priv->switch_rxon.channel = cpu_to_le16(channel); |
| 604 | priv->switch_rxon.switch_in_progress = true; |
Wey-Yi Guy | 4a56e96 | 2009-10-23 13:42:29 -0700 | [diff] [blame] | 605 | |
| 606 | return iwl_send_cmd_sync(priv, &hcmd); |
| 607 | } |
| 608 | |
Jay Sternberg | e8c00dc | 2009-01-29 11:09:15 -0800 | [diff] [blame] | 609 | struct iwl_lib_ops iwl5000_lib = { |
Tomas Winkler | fdd3e8a | 2008-04-24 11:55:28 -0700 | [diff] [blame] | 610 | .set_hw_params = iwl5000_hw_set_hw_params, |
Wey-Yi Guy | b305a08 | 2010-03-16 17:41:22 -0700 | [diff] [blame] | 611 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, |
| 612 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, |
| 613 | .txq_set_sched = iwlagn_txq_set_sched, |
| 614 | .txq_agg_enable = iwlagn_txq_agg_enable, |
| 615 | .txq_agg_disable = iwlagn_txq_agg_disable, |
Samuel Ortiz | 7aaa1d7 | 2009-01-19 15:30:26 -0800 | [diff] [blame] | 616 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, |
| 617 | .txq_free_tfd = iwl_hw_txq_free_tfd, |
Samuel Ortiz | a8e74e2 | 2009-01-23 13:45:14 -0800 | [diff] [blame] | 618 | .txq_init = iwl_hw_tx_queue_init, |
Ron Rindjunsky | b600e4e | 2008-05-15 13:54:11 +0800 | [diff] [blame] | 619 | .rx_handler_setup = iwl5000_rx_handler_setup, |
Emmanuel Grumbach | 203566f | 2008-06-12 09:46:54 +0800 | [diff] [blame] | 620 | .setup_deferred_work = iwl5000_setup_deferred_work, |
Ron Rindjunsky | 87283cc | 2008-05-29 16:34:47 +0800 | [diff] [blame] | 621 | .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr, |
Reinette Chatre | b7a7940 | 2009-09-25 14:24:23 -0700 | [diff] [blame] | 622 | .dump_nic_event_log = iwl_dump_nic_event_log, |
| 623 | .dump_nic_error_log = iwl_dump_nic_error_log, |
Wey-Yi Guy | 696bdee | 2009-12-10 14:37:25 -0800 | [diff] [blame] | 624 | .dump_csr = iwl_dump_csr, |
Wey-Yi Guy | 1b3eb82 | 2010-01-15 13:43:39 -0800 | [diff] [blame] | 625 | .dump_fh = iwl_dump_fh, |
Wey-Yi Guy | 81b8176 | 2010-03-16 10:23:30 -0700 | [diff] [blame] | 626 | .load_ucode = iwlagn_load_ucode, |
Wey-Yi Guy | 741a626 | 2010-03-16 12:37:24 -0700 | [diff] [blame^] | 627 | .init_alive_start = iwlagn_init_alive_start, |
| 628 | .alive_notify = iwlagn_alive_notify, |
Tomas Winkler | 630fe9b | 2008-06-12 09:47:08 +0800 | [diff] [blame] | 629 | .send_tx_power = iwl5000_send_tx_power, |
Emmanuel Grumbach | 5b9f8cd | 2008-10-29 14:05:46 -0700 | [diff] [blame] | 630 | .update_chain_flags = iwl_update_chain_flags, |
Wey-Yi Guy | 4a56e96 | 2009-10-23 13:42:29 -0700 | [diff] [blame] | 631 | .set_channel_switch = iwl5000_hw_channel_switch, |
Tomas Winkler | 30d5926 | 2008-04-24 11:55:25 -0700 | [diff] [blame] | 632 | .apm_ops = { |
Ben Cahill | fadb358 | 2009-10-23 13:42:21 -0700 | [diff] [blame] | 633 | .init = iwl_apm_init, |
Abhijeet Kolekar | d68b603 | 2009-10-02 13:44:04 -0700 | [diff] [blame] | 634 | .stop = iwl_apm_stop, |
Ron Rindjunsky | 5a83535 | 2008-05-05 10:22:29 +0800 | [diff] [blame] | 635 | .config = iwl5000_nic_config, |
Emmanuel Grumbach | 5b9f8cd | 2008-10-29 14:05:46 -0700 | [diff] [blame] | 636 | .set_pwr_src = iwl_set_pwr_src, |
Tomas Winkler | 30d5926 | 2008-04-24 11:55:25 -0700 | [diff] [blame] | 637 | }, |
Tomas Winkler | da8dec2 | 2008-04-24 11:55:24 -0700 | [diff] [blame] | 638 | .eeprom_ops = { |
Tomas Winkler | 25ae398 | 2008-04-24 11:55:27 -0700 | [diff] [blame] | 639 | .regulatory_bands = { |
| 640 | EEPROM_5000_REG_BAND_1_CHANNELS, |
| 641 | EEPROM_5000_REG_BAND_2_CHANNELS, |
| 642 | EEPROM_5000_REG_BAND_3_CHANNELS, |
| 643 | EEPROM_5000_REG_BAND_4_CHANNELS, |
| 644 | EEPROM_5000_REG_BAND_5_CHANNELS, |
Wey-Yi Guy | 7aafef1 | 2009-08-07 15:41:38 -0700 | [diff] [blame] | 645 | EEPROM_5000_REG_BAND_24_HT40_CHANNELS, |
| 646 | EEPROM_5000_REG_BAND_52_HT40_CHANNELS |
Tomas Winkler | 25ae398 | 2008-04-24 11:55:27 -0700 | [diff] [blame] | 647 | }, |
Tomas Winkler | da8dec2 | 2008-04-24 11:55:24 -0700 | [diff] [blame] | 648 | .verify_signature = iwlcore_eeprom_verify_signature, |
| 649 | .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, |
| 650 | .release_semaphore = iwlcore_eeprom_release_semaphore, |
Tomas Winkler | 0ef2ca6 | 2008-10-23 23:48:51 -0700 | [diff] [blame] | 651 | .calib_version = iwl5000_eeprom_calib_version, |
Tomas Winkler | 25ae398 | 2008-04-24 11:55:27 -0700 | [diff] [blame] | 652 | .query_addr = iwl5000_eeprom_query_addr, |
Tomas Winkler | da8dec2 | 2008-04-24 11:55:24 -0700 | [diff] [blame] | 653 | }, |
Abhijeet Kolekar | 5bbe233 | 2009-04-08 11:26:35 -0700 | [diff] [blame] | 654 | .post_associate = iwl_post_associate, |
Mohamed Abbas | ef850d7 | 2009-05-22 11:01:50 -0700 | [diff] [blame] | 655 | .isr = iwl_isr_ict, |
Abhijeet Kolekar | 60690a6 | 2009-04-08 11:26:49 -0700 | [diff] [blame] | 656 | .config_ap = iwl_config_ap, |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 657 | .temp_ops = { |
| 658 | .temperature = iwl5000_temperature, |
| 659 | .set_ct_kill = iwl5000_set_ct_threshold, |
| 660 | }, |
Reinette Chatre | 3459ab5 | 2010-01-22 14:22:49 -0800 | [diff] [blame] | 661 | .add_bcast_station = iwl_add_bcast_station, |
Wey-Yi Guy | b74e31a | 2010-03-01 17:23:50 -0800 | [diff] [blame] | 662 | .recover_from_tx_stall = iwl_bg_monitor_recover, |
Wey-Yi Guy | fa8f130 | 2010-03-05 14:22:46 -0800 | [diff] [blame] | 663 | .check_plcp_health = iwl_good_plcp_health, |
| 664 | .check_ack_health = iwl_good_ack_health, |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 665 | }; |
| 666 | |
| 667 | static struct iwl_lib_ops iwl5150_lib = { |
| 668 | .set_hw_params = iwl5000_hw_set_hw_params, |
Wey-Yi Guy | b305a08 | 2010-03-16 17:41:22 -0700 | [diff] [blame] | 669 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, |
| 670 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, |
| 671 | .txq_set_sched = iwlagn_txq_set_sched, |
| 672 | .txq_agg_enable = iwlagn_txq_agg_enable, |
| 673 | .txq_agg_disable = iwlagn_txq_agg_disable, |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 674 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, |
| 675 | .txq_free_tfd = iwl_hw_txq_free_tfd, |
| 676 | .txq_init = iwl_hw_tx_queue_init, |
| 677 | .rx_handler_setup = iwl5000_rx_handler_setup, |
| 678 | .setup_deferred_work = iwl5000_setup_deferred_work, |
| 679 | .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr, |
Reinette Chatre | b7a7940 | 2009-09-25 14:24:23 -0700 | [diff] [blame] | 680 | .dump_nic_event_log = iwl_dump_nic_event_log, |
| 681 | .dump_nic_error_log = iwl_dump_nic_error_log, |
Wey-Yi Guy | 696bdee | 2009-12-10 14:37:25 -0800 | [diff] [blame] | 682 | .dump_csr = iwl_dump_csr, |
Wey-Yi Guy | 81b8176 | 2010-03-16 10:23:30 -0700 | [diff] [blame] | 683 | .load_ucode = iwlagn_load_ucode, |
Wey-Yi Guy | 741a626 | 2010-03-16 12:37:24 -0700 | [diff] [blame^] | 684 | .init_alive_start = iwlagn_init_alive_start, |
| 685 | .alive_notify = iwlagn_alive_notify, |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 686 | .send_tx_power = iwl5000_send_tx_power, |
| 687 | .update_chain_flags = iwl_update_chain_flags, |
Wey-Yi Guy | 4a56e96 | 2009-10-23 13:42:29 -0700 | [diff] [blame] | 688 | .set_channel_switch = iwl5000_hw_channel_switch, |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 689 | .apm_ops = { |
Ben Cahill | fadb358 | 2009-10-23 13:42:21 -0700 | [diff] [blame] | 690 | .init = iwl_apm_init, |
Abhijeet Kolekar | d68b603 | 2009-10-02 13:44:04 -0700 | [diff] [blame] | 691 | .stop = iwl_apm_stop, |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 692 | .config = iwl5000_nic_config, |
| 693 | .set_pwr_src = iwl_set_pwr_src, |
| 694 | }, |
| 695 | .eeprom_ops = { |
| 696 | .regulatory_bands = { |
| 697 | EEPROM_5000_REG_BAND_1_CHANNELS, |
| 698 | EEPROM_5000_REG_BAND_2_CHANNELS, |
| 699 | EEPROM_5000_REG_BAND_3_CHANNELS, |
| 700 | EEPROM_5000_REG_BAND_4_CHANNELS, |
| 701 | EEPROM_5000_REG_BAND_5_CHANNELS, |
Wey-Yi Guy | 7aafef1 | 2009-08-07 15:41:38 -0700 | [diff] [blame] | 702 | EEPROM_5000_REG_BAND_24_HT40_CHANNELS, |
| 703 | EEPROM_5000_REG_BAND_52_HT40_CHANNELS |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 704 | }, |
| 705 | .verify_signature = iwlcore_eeprom_verify_signature, |
| 706 | .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, |
| 707 | .release_semaphore = iwlcore_eeprom_release_semaphore, |
| 708 | .calib_version = iwl5000_eeprom_calib_version, |
| 709 | .query_addr = iwl5000_eeprom_query_addr, |
| 710 | }, |
| 711 | .post_associate = iwl_post_associate, |
Mohamed Abbas | ef850d7 | 2009-05-22 11:01:50 -0700 | [diff] [blame] | 712 | .isr = iwl_isr_ict, |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 713 | .config_ap = iwl_config_ap, |
| 714 | .temp_ops = { |
| 715 | .temperature = iwl5150_temperature, |
| 716 | .set_ct_kill = iwl5150_set_ct_threshold, |
| 717 | }, |
Reinette Chatre | 3459ab5 | 2010-01-22 14:22:49 -0800 | [diff] [blame] | 718 | .add_bcast_station = iwl_add_bcast_station, |
Wey-Yi Guy | b74e31a | 2010-03-01 17:23:50 -0800 | [diff] [blame] | 719 | .recover_from_tx_stall = iwl_bg_monitor_recover, |
Wey-Yi Guy | fa8f130 | 2010-03-05 14:22:46 -0800 | [diff] [blame] | 720 | .check_plcp_health = iwl_good_plcp_health, |
| 721 | .check_ack_health = iwl_good_ack_health, |
Tomas Winkler | da8dec2 | 2008-04-24 11:55:24 -0700 | [diff] [blame] | 722 | }; |
| 723 | |
Emese Revfy | 45d5d80 | 2009-12-14 00:59:53 +0100 | [diff] [blame] | 724 | static const struct iwl_ops iwl5000_ops = { |
Wey-Yi Guy | 792bc3c | 2010-03-16 10:23:29 -0700 | [diff] [blame] | 725 | .ucode = &iwlagn_ucode, |
Tomas Winkler | da8dec2 | 2008-04-24 11:55:24 -0700 | [diff] [blame] | 726 | .lib = &iwl5000_lib, |
Wey-Yi Guy | 7dc77db | 2010-03-16 10:23:31 -0700 | [diff] [blame] | 727 | .hcmd = &iwlagn_hcmd, |
| 728 | .utils = &iwlagn_hcmd_utils, |
Johannes Berg | e932a60 | 2009-10-02 13:44:03 -0700 | [diff] [blame] | 729 | .led = &iwlagn_led_ops, |
Tomas Winkler | da8dec2 | 2008-04-24 11:55:24 -0700 | [diff] [blame] | 730 | }; |
| 731 | |
Emese Revfy | 45d5d80 | 2009-12-14 00:59:53 +0100 | [diff] [blame] | 732 | static const struct iwl_ops iwl5150_ops = { |
Wey-Yi Guy | 792bc3c | 2010-03-16 10:23:29 -0700 | [diff] [blame] | 733 | .ucode = &iwlagn_ucode, |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 734 | .lib = &iwl5150_lib, |
Wey-Yi Guy | 7dc77db | 2010-03-16 10:23:31 -0700 | [diff] [blame] | 735 | .hcmd = &iwlagn_hcmd, |
| 736 | .utils = &iwlagn_hcmd_utils, |
Johannes Berg | e932a60 | 2009-10-02 13:44:03 -0700 | [diff] [blame] | 737 | .led = &iwlagn_led_ops, |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 738 | }; |
| 739 | |
Jay Sternberg | cec2d3f | 2009-01-19 15:30:33 -0800 | [diff] [blame] | 740 | struct iwl_mod_params iwl50_mod_params = { |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 741 | .amsdu_size_8K = 1, |
Ester Kummer | 3a1081e | 2008-05-06 11:05:14 +0800 | [diff] [blame] | 742 | .restart_fw = 1, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 743 | /* the rest are 0 by default */ |
| 744 | }; |
| 745 | |
| 746 | |
| 747 | struct iwl_cfg iwl5300_agn_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 748 | .name = "Intel(R) Ultimate N WiFi Link 5300 AGN", |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 749 | .fw_name_pre = IWL5000_FW_PRE, |
| 750 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
| 751 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 752 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
Tomas Winkler | da8dec2 | 2008-04-24 11:55:24 -0700 | [diff] [blame] | 753 | .ops = &iwl5000_ops, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 754 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, |
Tomas Winkler | 0ef2ca6 | 2008-10-23 23:48:51 -0700 | [diff] [blame] | 755 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, |
| 756 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 757 | .num_of_queues = IWLAGN_NUM_QUEUES, |
| 758 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 759 | .mod_params = &iwl50_mod_params, |
Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 760 | .valid_tx_ant = ANT_ABC, |
| 761 | .valid_rx_ant = ANT_ABC, |
Ben Cahill | fadb358 | 2009-10-23 13:42:21 -0700 | [diff] [blame] | 762 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
| 763 | .set_l0s = true, |
| 764 | .use_bsm = false, |
Daniel C Halperin | b261793 | 2009-08-13 13:30:59 -0700 | [diff] [blame] | 765 | .ht_greenfield_support = true, |
Wey-Yi Guy | f2d0d0e | 2009-09-11 10:38:14 -0700 | [diff] [blame] | 766 | .led_compensation = 51, |
Wey-Yi Guy | 1152dcc | 2010-01-15 13:42:58 -0800 | [diff] [blame] | 767 | .use_rts_for_ht = true, /* use rts/cts protection */ |
Wey-Yi Guy | d8c07e7 | 2009-09-25 14:24:26 -0700 | [diff] [blame] | 768 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
Trieu 'Andrew' Nguyen | 3e4fb5f | 2010-01-22 14:22:46 -0800 | [diff] [blame] | 769 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, |
Ben Cahill | d4fe5ac | 2010-02-05 11:33:46 -0800 | [diff] [blame] | 770 | .chain_noise_scale = 1000, |
Wey-Yi Guy | b74e31a | 2010-03-01 17:23:50 -0800 | [diff] [blame] | 771 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 772 | }; |
| 773 | |
Wey-Yi Guy | ac59257 | 2009-11-20 12:05:03 -0800 | [diff] [blame] | 774 | struct iwl_cfg iwl5100_bgn_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 775 | .name = "Intel(R) WiFi Link 5100 BGN", |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 776 | .fw_name_pre = IWL5000_FW_PRE, |
| 777 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
| 778 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
Wey-Yi Guy | ac59257 | 2009-11-20 12:05:03 -0800 | [diff] [blame] | 779 | .sku = IWL_SKU_G|IWL_SKU_N, |
Esti Kummer | 4740863 | 2008-07-11 11:53:30 +0800 | [diff] [blame] | 780 | .ops = &iwl5000_ops, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 781 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, |
Tomas Winkler | 0ef2ca6 | 2008-10-23 23:48:51 -0700 | [diff] [blame] | 782 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, |
| 783 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 784 | .num_of_queues = IWLAGN_NUM_QUEUES, |
| 785 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
Esti Kummer | 4740863 | 2008-07-11 11:53:30 +0800 | [diff] [blame] | 786 | .mod_params = &iwl50_mod_params, |
Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 787 | .valid_tx_ant = ANT_B, |
| 788 | .valid_rx_ant = ANT_AB, |
Ben Cahill | fadb358 | 2009-10-23 13:42:21 -0700 | [diff] [blame] | 789 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
| 790 | .set_l0s = true, |
| 791 | .use_bsm = false, |
Daniel C Halperin | b261793 | 2009-08-13 13:30:59 -0700 | [diff] [blame] | 792 | .ht_greenfield_support = true, |
Wey-Yi Guy | f2d0d0e | 2009-09-11 10:38:14 -0700 | [diff] [blame] | 793 | .led_compensation = 51, |
Wey-Yi Guy | 1152dcc | 2010-01-15 13:42:58 -0800 | [diff] [blame] | 794 | .use_rts_for_ht = true, /* use rts/cts protection */ |
Wey-Yi Guy | d8c07e7 | 2009-09-25 14:24:26 -0700 | [diff] [blame] | 795 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
Trieu 'Andrew' Nguyen | 3e4fb5f | 2010-01-22 14:22:46 -0800 | [diff] [blame] | 796 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, |
Ben Cahill | d4fe5ac | 2010-02-05 11:33:46 -0800 | [diff] [blame] | 797 | .chain_noise_scale = 1000, |
Wey-Yi Guy | b74e31a | 2010-03-01 17:23:50 -0800 | [diff] [blame] | 798 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
Esti Kummer | 4740863 | 2008-07-11 11:53:30 +0800 | [diff] [blame] | 799 | }; |
| 800 | |
| 801 | struct iwl_cfg iwl5100_abg_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 802 | .name = "Intel(R) WiFi Link 5100 ABG", |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 803 | .fw_name_pre = IWL5000_FW_PRE, |
| 804 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
| 805 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
Esti Kummer | 4740863 | 2008-07-11 11:53:30 +0800 | [diff] [blame] | 806 | .sku = IWL_SKU_A|IWL_SKU_G, |
| 807 | .ops = &iwl5000_ops, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 808 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, |
Tomas Winkler | 0ef2ca6 | 2008-10-23 23:48:51 -0700 | [diff] [blame] | 809 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, |
| 810 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 811 | .num_of_queues = IWLAGN_NUM_QUEUES, |
| 812 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
Esti Kummer | 4740863 | 2008-07-11 11:53:30 +0800 | [diff] [blame] | 813 | .mod_params = &iwl50_mod_params, |
Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 814 | .valid_tx_ant = ANT_B, |
| 815 | .valid_rx_ant = ANT_AB, |
Ben Cahill | fadb358 | 2009-10-23 13:42:21 -0700 | [diff] [blame] | 816 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
| 817 | .set_l0s = true, |
| 818 | .use_bsm = false, |
Wey-Yi Guy | f2d0d0e | 2009-09-11 10:38:14 -0700 | [diff] [blame] | 819 | .led_compensation = 51, |
Wey-Yi Guy | d8c07e7 | 2009-09-25 14:24:26 -0700 | [diff] [blame] | 820 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
Trieu 'Andrew' Nguyen | 3e4fb5f | 2010-01-22 14:22:46 -0800 | [diff] [blame] | 821 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, |
Ben Cahill | d4fe5ac | 2010-02-05 11:33:46 -0800 | [diff] [blame] | 822 | .chain_noise_scale = 1000, |
Wey-Yi Guy | b74e31a | 2010-03-01 17:23:50 -0800 | [diff] [blame] | 823 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
Esti Kummer | 4740863 | 2008-07-11 11:53:30 +0800 | [diff] [blame] | 824 | }; |
| 825 | |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 826 | struct iwl_cfg iwl5100_agn_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 827 | .name = "Intel(R) WiFi Link 5100 AGN", |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 828 | .fw_name_pre = IWL5000_FW_PRE, |
| 829 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
| 830 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 831 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
Tomas Winkler | da8dec2 | 2008-04-24 11:55:24 -0700 | [diff] [blame] | 832 | .ops = &iwl5000_ops, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 833 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, |
Tomas Winkler | 0ef2ca6 | 2008-10-23 23:48:51 -0700 | [diff] [blame] | 834 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, |
| 835 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 836 | .num_of_queues = IWLAGN_NUM_QUEUES, |
| 837 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 838 | .mod_params = &iwl50_mod_params, |
Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 839 | .valid_tx_ant = ANT_B, |
| 840 | .valid_rx_ant = ANT_AB, |
Ben Cahill | fadb358 | 2009-10-23 13:42:21 -0700 | [diff] [blame] | 841 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
| 842 | .set_l0s = true, |
| 843 | .use_bsm = false, |
Daniel C Halperin | b261793 | 2009-08-13 13:30:59 -0700 | [diff] [blame] | 844 | .ht_greenfield_support = true, |
Wey-Yi Guy | f2d0d0e | 2009-09-11 10:38:14 -0700 | [diff] [blame] | 845 | .led_compensation = 51, |
Wey-Yi Guy | 1152dcc | 2010-01-15 13:42:58 -0800 | [diff] [blame] | 846 | .use_rts_for_ht = true, /* use rts/cts protection */ |
Wey-Yi Guy | d8c07e7 | 2009-09-25 14:24:26 -0700 | [diff] [blame] | 847 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
Trieu 'Andrew' Nguyen | 3e4fb5f | 2010-01-22 14:22:46 -0800 | [diff] [blame] | 848 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, |
Ben Cahill | d4fe5ac | 2010-02-05 11:33:46 -0800 | [diff] [blame] | 849 | .chain_noise_scale = 1000, |
Wey-Yi Guy | b74e31a | 2010-03-01 17:23:50 -0800 | [diff] [blame] | 850 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 851 | }; |
| 852 | |
| 853 | struct iwl_cfg iwl5350_agn_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 854 | .name = "Intel(R) WiMAX/WiFi Link 5350 AGN", |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 855 | .fw_name_pre = IWL5000_FW_PRE, |
| 856 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
| 857 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 858 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
Tomas Winkler | da8dec2 | 2008-04-24 11:55:24 -0700 | [diff] [blame] | 859 | .ops = &iwl5000_ops, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 860 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, |
Tomas Winkler | 0ef2ca6 | 2008-10-23 23:48:51 -0700 | [diff] [blame] | 861 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, |
| 862 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 863 | .num_of_queues = IWLAGN_NUM_QUEUES, |
| 864 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 865 | .mod_params = &iwl50_mod_params, |
Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 866 | .valid_tx_ant = ANT_ABC, |
| 867 | .valid_rx_ant = ANT_ABC, |
Ben Cahill | fadb358 | 2009-10-23 13:42:21 -0700 | [diff] [blame] | 868 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
| 869 | .set_l0s = true, |
| 870 | .use_bsm = false, |
Daniel C Halperin | b261793 | 2009-08-13 13:30:59 -0700 | [diff] [blame] | 871 | .ht_greenfield_support = true, |
Wey-Yi Guy | f2d0d0e | 2009-09-11 10:38:14 -0700 | [diff] [blame] | 872 | .led_compensation = 51, |
Wey-Yi Guy | 1152dcc | 2010-01-15 13:42:58 -0800 | [diff] [blame] | 873 | .use_rts_for_ht = true, /* use rts/cts protection */ |
Wey-Yi Guy | d8c07e7 | 2009-09-25 14:24:26 -0700 | [diff] [blame] | 874 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
Trieu 'Andrew' Nguyen | 3e4fb5f | 2010-01-22 14:22:46 -0800 | [diff] [blame] | 875 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, |
Ben Cahill | d4fe5ac | 2010-02-05 11:33:46 -0800 | [diff] [blame] | 876 | .chain_noise_scale = 1000, |
Wey-Yi Guy | b74e31a | 2010-03-01 17:23:50 -0800 | [diff] [blame] | 877 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 878 | }; |
| 879 | |
Tomas Winkler | 7100e92 | 2008-12-01 16:32:18 -0800 | [diff] [blame] | 880 | struct iwl_cfg iwl5150_agn_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 881 | .name = "Intel(R) WiMAX/WiFi Link 5150 AGN", |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 882 | .fw_name_pre = IWL5150_FW_PRE, |
| 883 | .ucode_api_max = IWL5150_UCODE_API_MAX, |
| 884 | .ucode_api_min = IWL5150_UCODE_API_MIN, |
Tomas Winkler | 7100e92 | 2008-12-01 16:32:18 -0800 | [diff] [blame] | 885 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
Wey-Yi Guy | 62161ae | 2009-05-21 13:44:23 -0700 | [diff] [blame] | 886 | .ops = &iwl5150_ops, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 887 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, |
Tomas Winkler | fd63edb | 2008-12-01 16:32:21 -0800 | [diff] [blame] | 888 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, |
| 889 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 890 | .num_of_queues = IWLAGN_NUM_QUEUES, |
| 891 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
Tomas Winkler | 7100e92 | 2008-12-01 16:32:18 -0800 | [diff] [blame] | 892 | .mod_params = &iwl50_mod_params, |
Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 893 | .valid_tx_ant = ANT_A, |
| 894 | .valid_rx_ant = ANT_AB, |
Ben Cahill | fadb358 | 2009-10-23 13:42:21 -0700 | [diff] [blame] | 895 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
| 896 | .set_l0s = true, |
| 897 | .use_bsm = false, |
Daniel C Halperin | b261793 | 2009-08-13 13:30:59 -0700 | [diff] [blame] | 898 | .ht_greenfield_support = true, |
Wey-Yi Guy | f2d0d0e | 2009-09-11 10:38:14 -0700 | [diff] [blame] | 899 | .led_compensation = 51, |
Wey-Yi Guy | 1152dcc | 2010-01-15 13:42:58 -0800 | [diff] [blame] | 900 | .use_rts_for_ht = true, /* use rts/cts protection */ |
Wey-Yi Guy | d8c07e7 | 2009-09-25 14:24:26 -0700 | [diff] [blame] | 901 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
Trieu 'Andrew' Nguyen | 3e4fb5f | 2010-01-22 14:22:46 -0800 | [diff] [blame] | 902 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, |
Ben Cahill | d4fe5ac | 2010-02-05 11:33:46 -0800 | [diff] [blame] | 903 | .chain_noise_scale = 1000, |
Wey-Yi Guy | b74e31a | 2010-03-01 17:23:50 -0800 | [diff] [blame] | 904 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
Tomas Winkler | 7100e92 | 2008-12-01 16:32:18 -0800 | [diff] [blame] | 905 | }; |
| 906 | |
Wey-Yi Guy | ac59257 | 2009-11-20 12:05:03 -0800 | [diff] [blame] | 907 | struct iwl_cfg iwl5150_abg_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 908 | .name = "Intel(R) WiMAX/WiFi Link 5150 ABG", |
Wey-Yi Guy | ac59257 | 2009-11-20 12:05:03 -0800 | [diff] [blame] | 909 | .fw_name_pre = IWL5150_FW_PRE, |
| 910 | .ucode_api_max = IWL5150_UCODE_API_MAX, |
| 911 | .ucode_api_min = IWL5150_UCODE_API_MIN, |
| 912 | .sku = IWL_SKU_A|IWL_SKU_G, |
| 913 | .ops = &iwl5150_ops, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 914 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, |
Wey-Yi Guy | ac59257 | 2009-11-20 12:05:03 -0800 | [diff] [blame] | 915 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, |
| 916 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 917 | .num_of_queues = IWLAGN_NUM_QUEUES, |
| 918 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
Wey-Yi Guy | ac59257 | 2009-11-20 12:05:03 -0800 | [diff] [blame] | 919 | .mod_params = &iwl50_mod_params, |
| 920 | .valid_tx_ant = ANT_A, |
| 921 | .valid_rx_ant = ANT_AB, |
| 922 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
| 923 | .set_l0s = true, |
| 924 | .use_bsm = false, |
| 925 | .led_compensation = 51, |
| 926 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
Trieu 'Andrew' Nguyen | 3e4fb5f | 2010-01-22 14:22:46 -0800 | [diff] [blame] | 927 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, |
Ben Cahill | d4fe5ac | 2010-02-05 11:33:46 -0800 | [diff] [blame] | 928 | .chain_noise_scale = 1000, |
Wey-Yi Guy | b74e31a | 2010-03-01 17:23:50 -0800 | [diff] [blame] | 929 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 930 | }; |
| 931 | |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 932 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); |
| 933 | MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX)); |
Tomas Winkler | c9f79ed | 2008-09-11 11:45:21 +0800 | [diff] [blame] | 934 | |
Wey-Yi Guy | 4e30cb6 | 2009-09-17 10:43:47 -0700 | [diff] [blame] | 935 | module_param_named(swcrypto50, iwl50_mod_params.sw_crypto, bool, S_IRUGO); |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 936 | MODULE_PARM_DESC(swcrypto50, |
| 937 | "using software crypto engine (default 0 [hardware])\n"); |
Wey-Yi Guy | 4e30cb6 | 2009-09-17 10:43:47 -0700 | [diff] [blame] | 938 | module_param_named(queues_num50, iwl50_mod_params.num_of_queues, int, S_IRUGO); |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 939 | MODULE_PARM_DESC(queues_num50, "number of hw queues in 50xx series"); |
Wey-Yi Guy | 4e30cb6 | 2009-09-17 10:43:47 -0700 | [diff] [blame] | 940 | module_param_named(11n_disable50, iwl50_mod_params.disable_11n, int, S_IRUGO); |
Ron Rindjunsky | 4977929 | 2008-06-30 17:23:21 +0800 | [diff] [blame] | 941 | MODULE_PARM_DESC(11n_disable50, "disable 50XX 11n functionality"); |
Wey-Yi Guy | 4e30cb6 | 2009-09-17 10:43:47 -0700 | [diff] [blame] | 942 | module_param_named(amsdu_size_8K50, iwl50_mod_params.amsdu_size_8K, |
| 943 | int, S_IRUGO); |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 944 | MODULE_PARM_DESC(amsdu_size_8K50, "enable 8K amsdu size in 50XX series"); |
Wey-Yi Guy | 4e30cb6 | 2009-09-17 10:43:47 -0700 | [diff] [blame] | 945 | module_param_named(fw_restart50, iwl50_mod_params.restart_fw, int, S_IRUGO); |
Ester Kummer | 3a1081e | 2008-05-06 11:05:14 +0800 | [diff] [blame] | 946 | MODULE_PARM_DESC(fw_restart50, "restart firmware in case of error"); |