iwl-6000.c 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2008 - 2010 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. #include <linux/kernel.h>
  27. #include <linux/module.h>
  28. #include <linux/init.h>
  29. #include <linux/pci.h>
  30. #include <linux/dma-mapping.h>
  31. #include <linux/delay.h>
  32. #include <linux/skbuff.h>
  33. #include <linux/netdevice.h>
  34. #include <linux/wireless.h>
  35. #include <net/mac80211.h>
  36. #include <linux/etherdevice.h>
  37. #include <asm/unaligned.h>
  38. #include "iwl-eeprom.h"
  39. #include "iwl-dev.h"
  40. #include "iwl-core.h"
  41. #include "iwl-io.h"
  42. #include "iwl-sta.h"
  43. #include "iwl-agn.h"
  44. #include "iwl-helpers.h"
  45. #include "iwl-agn-hw.h"
  46. #include "iwl-6000-hw.h"
  47. #include "iwl-agn-led.h"
  48. #include "iwl-agn-debugfs.h"
  49. /* Highest firmware API version supported */
  50. #define IWL6000_UCODE_API_MAX 4
  51. #define IWL6050_UCODE_API_MAX 4
  52. #define IWL6000G2_UCODE_API_MAX 4
  53. /* Lowest firmware API version supported */
  54. #define IWL6000_UCODE_API_MIN 4
  55. #define IWL6050_UCODE_API_MIN 4
  56. #define IWL6000G2_UCODE_API_MIN 4
  57. #define IWL6000_FW_PRE "iwlwifi-6000-"
  58. #define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode"
  59. #define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api)
  60. #define IWL6050_FW_PRE "iwlwifi-6050-"
  61. #define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
  62. #define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api)
  63. #define IWL6000G2_FW_PRE "iwlwifi-6005-"
  64. #define _IWL6000G2_MODULE_FIRMWARE(api) IWL6000G2_FW_PRE #api ".ucode"
  65. #define IWL6000G2_MODULE_FIRMWARE(api) _IWL6000G2_MODULE_FIRMWARE(api)
  66. static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
  67. {
  68. /* want Celsius */
  69. priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
  70. priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
  71. }
  72. /* Indicate calibration version to uCode. */
  73. static void iwl6050_set_calib_version(struct iwl_priv *priv)
  74. {
  75. if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
  76. iwl_set_bit(priv, CSR_GP_DRIVER_REG,
  77. CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
  78. }
  79. /* NIC configuration for 6000 series */
  80. static void iwl6000_nic_config(struct iwl_priv *priv)
  81. {
  82. u16 radio_cfg;
  83. radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
  84. /* write radio config values to register */
  85. if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
  86. iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
  87. EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
  88. EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
  89. EEPROM_RF_CFG_DASH_MSK(radio_cfg));
  90. /* set CSR_HW_CONFIG_REG for uCode use */
  91. iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
  92. CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
  93. CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
  94. /* no locking required for register write */
  95. if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
  96. /* 2x2 IPA phy type */
  97. iwl_write32(priv, CSR_GP_DRIVER_REG,
  98. CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
  99. }
  100. /* else do nothing, uCode configured */
  101. if (priv->cfg->ops->lib->temp_ops.set_calib_version)
  102. priv->cfg->ops->lib->temp_ops.set_calib_version(priv);
  103. }
  104. static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
  105. .min_nrg_cck = 97,
  106. .max_nrg_cck = 0, /* not used, set to 0 */
  107. .auto_corr_min_ofdm = 80,
  108. .auto_corr_min_ofdm_mrc = 128,
  109. .auto_corr_min_ofdm_x1 = 105,
  110. .auto_corr_min_ofdm_mrc_x1 = 192,
  111. .auto_corr_max_ofdm = 145,
  112. .auto_corr_max_ofdm_mrc = 232,
  113. .auto_corr_max_ofdm_x1 = 110,
  114. .auto_corr_max_ofdm_mrc_x1 = 232,
  115. .auto_corr_min_cck = 125,
  116. .auto_corr_max_cck = 175,
  117. .auto_corr_min_cck_mrc = 160,
  118. .auto_corr_max_cck_mrc = 310,
  119. .nrg_th_cck = 97,
  120. .nrg_th_ofdm = 100,
  121. .barker_corr_th_min = 190,
  122. .barker_corr_th_min_mrc = 390,
  123. .nrg_th_cca = 62,
  124. };
  125. static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
  126. {
  127. if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
  128. priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
  129. priv->cfg->num_of_queues =
  130. priv->cfg->mod_params->num_of_queues;
  131. priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
  132. priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
  133. priv->hw_params.scd_bc_tbls_size =
  134. priv->cfg->num_of_queues *
  135. sizeof(struct iwlagn_scd_bc_tbl);
  136. priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
  137. priv->hw_params.max_stations = IWL5000_STATION_COUNT;
  138. priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
  139. priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
  140. priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
  141. priv->hw_params.max_bsm_size = 0;
  142. priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
  143. BIT(IEEE80211_BAND_5GHZ);
  144. priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
  145. priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
  146. priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
  147. priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
  148. priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
  149. if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
  150. priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
  151. /* Set initial sensitivity parameters */
  152. /* Set initial calibration set */
  153. priv->hw_params.sens = &iwl6000_sensitivity;
  154. priv->hw_params.calib_init_cfg =
  155. BIT(IWL_CALIB_XTAL) |
  156. BIT(IWL_CALIB_LO) |
  157. BIT(IWL_CALIB_TX_IQ) |
  158. BIT(IWL_CALIB_BASE_BAND);
  159. return 0;
  160. }
  161. static int iwl6050_hw_set_hw_params(struct iwl_priv *priv)
  162. {
  163. if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
  164. priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
  165. priv->cfg->num_of_queues =
  166. priv->cfg->mod_params->num_of_queues;
  167. priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
  168. priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
  169. priv->hw_params.scd_bc_tbls_size =
  170. priv->cfg->num_of_queues *
  171. sizeof(struct iwlagn_scd_bc_tbl);
  172. priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
  173. priv->hw_params.max_stations = IWL5000_STATION_COUNT;
  174. priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
  175. priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
  176. priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
  177. priv->hw_params.max_bsm_size = 0;
  178. priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
  179. BIT(IEEE80211_BAND_5GHZ);
  180. priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
  181. priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
  182. priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
  183. priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
  184. priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
  185. if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
  186. priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
  187. /* Set initial sensitivity parameters */
  188. /* Set initial calibration set */
  189. priv->hw_params.sens = &iwl6000_sensitivity;
  190. priv->hw_params.calib_init_cfg =
  191. BIT(IWL_CALIB_XTAL) |
  192. BIT(IWL_CALIB_DC) |
  193. BIT(IWL_CALIB_LO) |
  194. BIT(IWL_CALIB_TX_IQ) |
  195. BIT(IWL_CALIB_BASE_BAND);
  196. return 0;
  197. }
  198. static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
  199. {
  200. struct iwl6000_channel_switch_cmd cmd;
  201. const struct iwl_channel_info *ch_info;
  202. struct iwl_host_cmd hcmd = {
  203. .id = REPLY_CHANNEL_SWITCH,
  204. .len = sizeof(cmd),
  205. .flags = CMD_SIZE_HUGE,
  206. .data = &cmd,
  207. };
  208. IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
  209. priv->active_rxon.channel, channel);
  210. cmd.band = priv->band == IEEE80211_BAND_2GHZ;
  211. cmd.channel = cpu_to_le16(channel);
  212. cmd.rxon_flags = priv->staging_rxon.flags;
  213. cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
  214. cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
  215. ch_info = iwl_get_channel_info(priv, priv->band, channel);
  216. if (ch_info)
  217. cmd.expect_beacon = is_channel_radar(ch_info);
  218. else {
  219. IWL_ERR(priv, "invalid channel switch from %u to %u\n",
  220. priv->active_rxon.channel, channel);
  221. return -EFAULT;
  222. }
  223. priv->switch_rxon.channel = cpu_to_le16(channel);
  224. priv->switch_rxon.switch_in_progress = true;
  225. return iwl_send_cmd_sync(priv, &hcmd);
  226. }
  227. static struct iwl_lib_ops iwl6000_lib = {
  228. .set_hw_params = iwl6000_hw_set_hw_params,
  229. .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
  230. .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
  231. .txq_set_sched = iwlagn_txq_set_sched,
  232. .txq_agg_enable = iwlagn_txq_agg_enable,
  233. .txq_agg_disable = iwlagn_txq_agg_disable,
  234. .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
  235. .txq_free_tfd = iwl_hw_txq_free_tfd,
  236. .txq_init = iwl_hw_tx_queue_init,
  237. .rx_handler_setup = iwlagn_rx_handler_setup,
  238. .setup_deferred_work = iwlagn_setup_deferred_work,
  239. .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
  240. .load_ucode = iwlagn_load_ucode,
  241. .dump_nic_event_log = iwl_dump_nic_event_log,
  242. .dump_nic_error_log = iwl_dump_nic_error_log,
  243. .dump_csr = iwl_dump_csr,
  244. .dump_fh = iwl_dump_fh,
  245. .init_alive_start = iwlagn_init_alive_start,
  246. .alive_notify = iwlagn_alive_notify,
  247. .send_tx_power = iwlagn_send_tx_power,
  248. .update_chain_flags = iwl_update_chain_flags,
  249. .set_channel_switch = iwl6000_hw_channel_switch,
  250. .apm_ops = {
  251. .init = iwl_apm_init,
  252. .stop = iwl_apm_stop,
  253. .config = iwl6000_nic_config,
  254. .set_pwr_src = iwl_set_pwr_src,
  255. },
  256. .eeprom_ops = {
  257. .regulatory_bands = {
  258. EEPROM_REG_BAND_1_CHANNELS,
  259. EEPROM_REG_BAND_2_CHANNELS,
  260. EEPROM_REG_BAND_3_CHANNELS,
  261. EEPROM_REG_BAND_4_CHANNELS,
  262. EEPROM_REG_BAND_5_CHANNELS,
  263. EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
  264. EEPROM_REG_BAND_52_HT40_CHANNELS
  265. },
  266. .verify_signature = iwlcore_eeprom_verify_signature,
  267. .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
  268. .release_semaphore = iwlcore_eeprom_release_semaphore,
  269. .calib_version = iwlagn_eeprom_calib_version,
  270. .query_addr = iwlagn_eeprom_query_addr,
  271. .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
  272. },
  273. .post_associate = iwl_post_associate,
  274. .isr = iwl_isr_ict,
  275. .config_ap = iwl_config_ap,
  276. .temp_ops = {
  277. .temperature = iwlagn_temperature,
  278. .set_ct_kill = iwl6000_set_ct_threshold,
  279. },
  280. .add_bcast_station = iwl_add_bcast_station,
  281. .debugfs_ops = {
  282. .rx_stats_read = iwl_ucode_rx_stats_read,
  283. .tx_stats_read = iwl_ucode_tx_stats_read,
  284. .general_stats_read = iwl_ucode_general_stats_read,
  285. },
  286. .recover_from_tx_stall = iwl_bg_monitor_recover,
  287. .check_plcp_health = iwl_good_plcp_health,
  288. .check_ack_health = iwl_good_ack_health,
  289. };
  290. static const struct iwl_ops iwl6000_ops = {
  291. .ucode = &iwlagn_ucode,
  292. .lib = &iwl6000_lib,
  293. .hcmd = &iwlagn_hcmd,
  294. .utils = &iwlagn_hcmd_utils,
  295. .led = &iwlagn_led_ops,
  296. };
  297. static struct iwl_lib_ops iwl6050_lib = {
  298. .set_hw_params = iwl6050_hw_set_hw_params,
  299. .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
  300. .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
  301. .txq_set_sched = iwlagn_txq_set_sched,
  302. .txq_agg_enable = iwlagn_txq_agg_enable,
  303. .txq_agg_disable = iwlagn_txq_agg_disable,
  304. .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
  305. .txq_free_tfd = iwl_hw_txq_free_tfd,
  306. .txq_init = iwl_hw_tx_queue_init,
  307. .rx_handler_setup = iwlagn_rx_handler_setup,
  308. .setup_deferred_work = iwlagn_setup_deferred_work,
  309. .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
  310. .load_ucode = iwlagn_load_ucode,
  311. .dump_nic_event_log = iwl_dump_nic_event_log,
  312. .dump_nic_error_log = iwl_dump_nic_error_log,
  313. .dump_csr = iwl_dump_csr,
  314. .dump_fh = iwl_dump_fh,
  315. .init_alive_start = iwlagn_init_alive_start,
  316. .alive_notify = iwlagn_alive_notify,
  317. .send_tx_power = iwlagn_send_tx_power,
  318. .update_chain_flags = iwl_update_chain_flags,
  319. .set_channel_switch = iwl6000_hw_channel_switch,
  320. .apm_ops = {
  321. .init = iwl_apm_init,
  322. .stop = iwl_apm_stop,
  323. .config = iwl6000_nic_config,
  324. .set_pwr_src = iwl_set_pwr_src,
  325. },
  326. .eeprom_ops = {
  327. .regulatory_bands = {
  328. EEPROM_REG_BAND_1_CHANNELS,
  329. EEPROM_REG_BAND_2_CHANNELS,
  330. EEPROM_REG_BAND_3_CHANNELS,
  331. EEPROM_REG_BAND_4_CHANNELS,
  332. EEPROM_REG_BAND_5_CHANNELS,
  333. EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
  334. EEPROM_REG_BAND_52_HT40_CHANNELS
  335. },
  336. .verify_signature = iwlcore_eeprom_verify_signature,
  337. .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
  338. .release_semaphore = iwlcore_eeprom_release_semaphore,
  339. .calib_version = iwlagn_eeprom_calib_version,
  340. .query_addr = iwlagn_eeprom_query_addr,
  341. .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
  342. },
  343. .post_associate = iwl_post_associate,
  344. .isr = iwl_isr_ict,
  345. .config_ap = iwl_config_ap,
  346. .temp_ops = {
  347. .temperature = iwlagn_temperature,
  348. .set_ct_kill = iwl6000_set_ct_threshold,
  349. .set_calib_version = iwl6050_set_calib_version,
  350. },
  351. .add_bcast_station = iwl_add_bcast_station,
  352. .debugfs_ops = {
  353. .rx_stats_read = iwl_ucode_rx_stats_read,
  354. .tx_stats_read = iwl_ucode_tx_stats_read,
  355. .general_stats_read = iwl_ucode_general_stats_read,
  356. },
  357. .recover_from_tx_stall = iwl_bg_monitor_recover,
  358. .check_plcp_health = iwl_good_plcp_health,
  359. .check_ack_health = iwl_good_ack_health,
  360. };
  361. static const struct iwl_ops iwl6050_ops = {
  362. .ucode = &iwlagn_ucode,
  363. .lib = &iwl6050_lib,
  364. .hcmd = &iwlagn_hcmd,
  365. .utils = &iwlagn_hcmd_utils,
  366. .led = &iwlagn_led_ops,
  367. };
  368. /*
  369. * "i": Internal configuration, use internal Power Amplifier
  370. */
  371. struct iwl_cfg iwl6000g2_2agn_cfg = {
  372. .name = "6000 Series 2x2 AGN Gen2",
  373. .fw_name_pre = IWL6000G2_FW_PRE,
  374. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  375. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  376. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  377. .ops = &iwl6000_ops,
  378. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  379. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  380. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  381. .num_of_queues = IWLAGN_NUM_QUEUES,
  382. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  383. .mod_params = &iwlagn_mod_params,
  384. .valid_tx_ant = ANT_AB,
  385. .valid_rx_ant = ANT_AB,
  386. .pll_cfg_val = 0,
  387. .set_l0s = true,
  388. .use_bsm = false,
  389. .pa_type = IWL_PA_SYSTEM,
  390. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  391. .shadow_ram_support = true,
  392. .ht_greenfield_support = true,
  393. .led_compensation = 51,
  394. .use_rts_for_ht = true, /* use rts/cts protection */
  395. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  396. .supports_idle = true,
  397. .adv_thermal_throttle = true,
  398. .support_ct_kill_exit = true,
  399. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  400. .chain_noise_scale = 1000,
  401. .monitor_recover_period = IWL_MONITORING_PERIOD,
  402. .max_event_log_size = 1024,
  403. };
  404. struct iwl_cfg iwl6000i_2agn_cfg = {
  405. .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
  406. .fw_name_pre = IWL6000_FW_PRE,
  407. .ucode_api_max = IWL6000_UCODE_API_MAX,
  408. .ucode_api_min = IWL6000_UCODE_API_MIN,
  409. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  410. .ops = &iwl6000_ops,
  411. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  412. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  413. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  414. .num_of_queues = IWLAGN_NUM_QUEUES,
  415. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  416. .mod_params = &iwlagn_mod_params,
  417. .valid_tx_ant = ANT_BC,
  418. .valid_rx_ant = ANT_BC,
  419. .pll_cfg_val = 0,
  420. .set_l0s = true,
  421. .use_bsm = false,
  422. .pa_type = IWL_PA_INTERNAL,
  423. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  424. .shadow_ram_support = true,
  425. .ht_greenfield_support = true,
  426. .led_compensation = 51,
  427. .use_rts_for_ht = true, /* use rts/cts protection */
  428. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  429. .supports_idle = true,
  430. .adv_thermal_throttle = true,
  431. .support_ct_kill_exit = true,
  432. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  433. .chain_noise_scale = 1000,
  434. .monitor_recover_period = IWL_MONITORING_PERIOD,
  435. .max_event_log_size = 1024,
  436. };
  437. struct iwl_cfg iwl6000i_2abg_cfg = {
  438. .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
  439. .fw_name_pre = IWL6000_FW_PRE,
  440. .ucode_api_max = IWL6000_UCODE_API_MAX,
  441. .ucode_api_min = IWL6000_UCODE_API_MIN,
  442. .sku = IWL_SKU_A|IWL_SKU_G,
  443. .ops = &iwl6000_ops,
  444. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  445. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  446. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  447. .num_of_queues = IWLAGN_NUM_QUEUES,
  448. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  449. .mod_params = &iwlagn_mod_params,
  450. .valid_tx_ant = ANT_BC,
  451. .valid_rx_ant = ANT_BC,
  452. .pll_cfg_val = 0,
  453. .set_l0s = true,
  454. .use_bsm = false,
  455. .pa_type = IWL_PA_INTERNAL,
  456. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  457. .shadow_ram_support = true,
  458. .led_compensation = 51,
  459. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  460. .supports_idle = true,
  461. .adv_thermal_throttle = true,
  462. .support_ct_kill_exit = true,
  463. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  464. .chain_noise_scale = 1000,
  465. .monitor_recover_period = IWL_MONITORING_PERIOD,
  466. .max_event_log_size = 1024,
  467. };
  468. struct iwl_cfg iwl6000i_2bg_cfg = {
  469. .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
  470. .fw_name_pre = IWL6000_FW_PRE,
  471. .ucode_api_max = IWL6000_UCODE_API_MAX,
  472. .ucode_api_min = IWL6000_UCODE_API_MIN,
  473. .sku = IWL_SKU_G,
  474. .ops = &iwl6000_ops,
  475. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  476. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  477. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  478. .num_of_queues = IWLAGN_NUM_QUEUES,
  479. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  480. .mod_params = &iwlagn_mod_params,
  481. .valid_tx_ant = ANT_BC,
  482. .valid_rx_ant = ANT_BC,
  483. .pll_cfg_val = 0,
  484. .set_l0s = true,
  485. .use_bsm = false,
  486. .pa_type = IWL_PA_INTERNAL,
  487. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  488. .shadow_ram_support = true,
  489. .led_compensation = 51,
  490. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  491. .supports_idle = true,
  492. .adv_thermal_throttle = true,
  493. .support_ct_kill_exit = true,
  494. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  495. .chain_noise_scale = 1000,
  496. .monitor_recover_period = IWL_MONITORING_PERIOD,
  497. .max_event_log_size = 1024,
  498. };
  499. struct iwl_cfg iwl6050_2agn_cfg = {
  500. .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
  501. .fw_name_pre = IWL6050_FW_PRE,
  502. .ucode_api_max = IWL6050_UCODE_API_MAX,
  503. .ucode_api_min = IWL6050_UCODE_API_MIN,
  504. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  505. .ops = &iwl6050_ops,
  506. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  507. .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
  508. .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
  509. .num_of_queues = IWLAGN_NUM_QUEUES,
  510. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  511. .mod_params = &iwlagn_mod_params,
  512. .valid_tx_ant = ANT_AB,
  513. .valid_rx_ant = ANT_AB,
  514. .pll_cfg_val = 0,
  515. .set_l0s = true,
  516. .use_bsm = false,
  517. .pa_type = IWL_PA_SYSTEM,
  518. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  519. .shadow_ram_support = true,
  520. .ht_greenfield_support = true,
  521. .led_compensation = 51,
  522. .use_rts_for_ht = true, /* use rts/cts protection */
  523. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  524. .supports_idle = true,
  525. .adv_thermal_throttle = true,
  526. .support_ct_kill_exit = true,
  527. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  528. .chain_noise_scale = 1500,
  529. .monitor_recover_period = IWL_MONITORING_PERIOD,
  530. .max_event_log_size = 1024,
  531. };
  532. struct iwl_cfg iwl6050_2abg_cfg = {
  533. .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
  534. .fw_name_pre = IWL6050_FW_PRE,
  535. .ucode_api_max = IWL6050_UCODE_API_MAX,
  536. .ucode_api_min = IWL6050_UCODE_API_MIN,
  537. .sku = IWL_SKU_A|IWL_SKU_G,
  538. .ops = &iwl6050_ops,
  539. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  540. .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
  541. .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
  542. .num_of_queues = IWLAGN_NUM_QUEUES,
  543. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  544. .mod_params = &iwlagn_mod_params,
  545. .valid_tx_ant = ANT_AB,
  546. .valid_rx_ant = ANT_AB,
  547. .pll_cfg_val = 0,
  548. .set_l0s = true,
  549. .use_bsm = false,
  550. .pa_type = IWL_PA_SYSTEM,
  551. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  552. .shadow_ram_support = true,
  553. .led_compensation = 51,
  554. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  555. .supports_idle = true,
  556. .adv_thermal_throttle = true,
  557. .support_ct_kill_exit = true,
  558. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  559. .chain_noise_scale = 1500,
  560. .monitor_recover_period = IWL_MONITORING_PERIOD,
  561. .max_event_log_size = 1024,
  562. };
  563. struct iwl_cfg iwl6000_3agn_cfg = {
  564. .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
  565. .fw_name_pre = IWL6000_FW_PRE,
  566. .ucode_api_max = IWL6000_UCODE_API_MAX,
  567. .ucode_api_min = IWL6000_UCODE_API_MIN,
  568. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  569. .ops = &iwl6000_ops,
  570. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  571. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  572. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  573. .num_of_queues = IWLAGN_NUM_QUEUES,
  574. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  575. .mod_params = &iwlagn_mod_params,
  576. .valid_tx_ant = ANT_ABC,
  577. .valid_rx_ant = ANT_ABC,
  578. .pll_cfg_val = 0,
  579. .set_l0s = true,
  580. .use_bsm = false,
  581. .pa_type = IWL_PA_SYSTEM,
  582. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  583. .shadow_ram_support = true,
  584. .ht_greenfield_support = true,
  585. .led_compensation = 51,
  586. .use_rts_for_ht = true, /* use rts/cts protection */
  587. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  588. .supports_idle = true,
  589. .adv_thermal_throttle = true,
  590. .support_ct_kill_exit = true,
  591. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  592. .chain_noise_scale = 1000,
  593. .monitor_recover_period = IWL_MONITORING_PERIOD,
  594. .max_event_log_size = 1024,
  595. };
  596. MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
  597. MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
  598. MODULE_FIRMWARE(IWL6000G2_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));