iwl-6000.c 19 KB

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