iwl-6000.c 18 KB

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