iwl-6000.c 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  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 IWL6000G2A_FW_PRE "iwlwifi-6000g2a-"
  64. #define _IWL6000G2A_MODULE_FIRMWARE(api) IWL6000G2A_FW_PRE #api ".ucode"
  65. #define IWL6000G2A_MODULE_FIRMWARE(api) _IWL6000G2A_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. .manage_ibss_station = iwlagn_manage_ibss_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. .lib = &iwl6000_lib,
  292. .hcmd = &iwlagn_hcmd,
  293. .utils = &iwlagn_hcmd_utils,
  294. .led = &iwlagn_led_ops,
  295. };
  296. static struct iwl_lib_ops iwl6050_lib = {
  297. .set_hw_params = iwl6050_hw_set_hw_params,
  298. .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
  299. .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
  300. .txq_set_sched = iwlagn_txq_set_sched,
  301. .txq_agg_enable = iwlagn_txq_agg_enable,
  302. .txq_agg_disable = iwlagn_txq_agg_disable,
  303. .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
  304. .txq_free_tfd = iwl_hw_txq_free_tfd,
  305. .txq_init = iwl_hw_tx_queue_init,
  306. .rx_handler_setup = iwlagn_rx_handler_setup,
  307. .setup_deferred_work = iwlagn_setup_deferred_work,
  308. .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
  309. .load_ucode = iwlagn_load_ucode,
  310. .dump_nic_event_log = iwl_dump_nic_event_log,
  311. .dump_nic_error_log = iwl_dump_nic_error_log,
  312. .dump_csr = iwl_dump_csr,
  313. .dump_fh = iwl_dump_fh,
  314. .init_alive_start = iwlagn_init_alive_start,
  315. .alive_notify = iwlagn_alive_notify,
  316. .send_tx_power = iwlagn_send_tx_power,
  317. .update_chain_flags = iwl_update_chain_flags,
  318. .set_channel_switch = iwl6000_hw_channel_switch,
  319. .apm_ops = {
  320. .init = iwl_apm_init,
  321. .stop = iwl_apm_stop,
  322. .config = iwl6000_nic_config,
  323. .set_pwr_src = iwl_set_pwr_src,
  324. },
  325. .eeprom_ops = {
  326. .regulatory_bands = {
  327. EEPROM_REG_BAND_1_CHANNELS,
  328. EEPROM_REG_BAND_2_CHANNELS,
  329. EEPROM_REG_BAND_3_CHANNELS,
  330. EEPROM_REG_BAND_4_CHANNELS,
  331. EEPROM_REG_BAND_5_CHANNELS,
  332. EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
  333. EEPROM_REG_BAND_52_HT40_CHANNELS
  334. },
  335. .verify_signature = iwlcore_eeprom_verify_signature,
  336. .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
  337. .release_semaphore = iwlcore_eeprom_release_semaphore,
  338. .calib_version = iwlagn_eeprom_calib_version,
  339. .query_addr = iwlagn_eeprom_query_addr,
  340. .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
  341. },
  342. .post_associate = iwl_post_associate,
  343. .isr = iwl_isr_ict,
  344. .config_ap = iwl_config_ap,
  345. .temp_ops = {
  346. .temperature = iwlagn_temperature,
  347. .set_ct_kill = iwl6000_set_ct_threshold,
  348. .set_calib_version = iwl6050_set_calib_version,
  349. },
  350. .manage_ibss_station = iwlagn_manage_ibss_station,
  351. .debugfs_ops = {
  352. .rx_stats_read = iwl_ucode_rx_stats_read,
  353. .tx_stats_read = iwl_ucode_tx_stats_read,
  354. .general_stats_read = iwl_ucode_general_stats_read,
  355. },
  356. .recover_from_tx_stall = iwl_bg_monitor_recover,
  357. .check_plcp_health = iwl_good_plcp_health,
  358. .check_ack_health = iwl_good_ack_health,
  359. };
  360. static const struct iwl_ops iwl6050_ops = {
  361. .lib = &iwl6050_lib,
  362. .hcmd = &iwlagn_hcmd,
  363. .utils = &iwlagn_hcmd_utils,
  364. .led = &iwlagn_led_ops,
  365. };
  366. struct iwl_cfg iwl6000g2a_2agn_cfg = {
  367. .name = "6000 Series 2x2 AGN Gen2a",
  368. .fw_name_pre = IWL6000G2A_FW_PRE,
  369. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  370. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  371. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  372. .ops = &iwl6000_ops,
  373. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  374. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  375. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  376. .num_of_queues = IWLAGN_NUM_QUEUES,
  377. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  378. .mod_params = &iwlagn_mod_params,
  379. .valid_tx_ant = ANT_AB,
  380. .valid_rx_ant = ANT_AB,
  381. .pll_cfg_val = 0,
  382. .set_l0s = true,
  383. .use_bsm = false,
  384. .pa_type = IWL_PA_SYSTEM,
  385. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  386. .shadow_ram_support = true,
  387. .ht_greenfield_support = true,
  388. .led_compensation = 51,
  389. .use_rts_for_ht = true, /* use rts/cts protection */
  390. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  391. .supports_idle = true,
  392. .adv_thermal_throttle = true,
  393. .support_ct_kill_exit = true,
  394. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  395. .chain_noise_scale = 1000,
  396. .monitor_recover_period = IWL_MONITORING_PERIOD,
  397. .max_event_log_size = 512,
  398. .ucode_tracing = true,
  399. .sensitivity_calib_by_driver = true,
  400. .chain_noise_calib_by_driver = true,
  401. };
  402. /*
  403. * "i": Internal configuration, use internal Power Amplifier
  404. */
  405. struct iwl_cfg iwl6000i_2agn_cfg = {
  406. .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
  407. .fw_name_pre = IWL6000_FW_PRE,
  408. .ucode_api_max = IWL6000_UCODE_API_MAX,
  409. .ucode_api_min = IWL6000_UCODE_API_MIN,
  410. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  411. .ops = &iwl6000_ops,
  412. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  413. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  414. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  415. .num_of_queues = IWLAGN_NUM_QUEUES,
  416. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  417. .mod_params = &iwlagn_mod_params,
  418. .valid_tx_ant = ANT_BC,
  419. .valid_rx_ant = ANT_BC,
  420. .pll_cfg_val = 0,
  421. .set_l0s = true,
  422. .use_bsm = false,
  423. .pa_type = IWL_PA_INTERNAL,
  424. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  425. .shadow_ram_support = true,
  426. .ht_greenfield_support = true,
  427. .led_compensation = 51,
  428. .use_rts_for_ht = true, /* use rts/cts protection */
  429. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  430. .supports_idle = true,
  431. .adv_thermal_throttle = true,
  432. .support_ct_kill_exit = true,
  433. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  434. .chain_noise_scale = 1000,
  435. .monitor_recover_period = IWL_MONITORING_PERIOD,
  436. .max_event_log_size = 1024,
  437. .ucode_tracing = true,
  438. .sensitivity_calib_by_driver = true,
  439. .chain_noise_calib_by_driver = true,
  440. };
  441. struct iwl_cfg iwl6000i_2abg_cfg = {
  442. .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
  443. .fw_name_pre = IWL6000_FW_PRE,
  444. .ucode_api_max = IWL6000_UCODE_API_MAX,
  445. .ucode_api_min = IWL6000_UCODE_API_MIN,
  446. .sku = IWL_SKU_A|IWL_SKU_G,
  447. .ops = &iwl6000_ops,
  448. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  449. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  450. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  451. .num_of_queues = IWLAGN_NUM_QUEUES,
  452. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  453. .mod_params = &iwlagn_mod_params,
  454. .valid_tx_ant = ANT_BC,
  455. .valid_rx_ant = ANT_BC,
  456. .pll_cfg_val = 0,
  457. .set_l0s = true,
  458. .use_bsm = false,
  459. .pa_type = IWL_PA_INTERNAL,
  460. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  461. .shadow_ram_support = true,
  462. .led_compensation = 51,
  463. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  464. .supports_idle = true,
  465. .adv_thermal_throttle = true,
  466. .support_ct_kill_exit = true,
  467. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  468. .chain_noise_scale = 1000,
  469. .monitor_recover_period = IWL_MONITORING_PERIOD,
  470. .max_event_log_size = 1024,
  471. .ucode_tracing = true,
  472. .sensitivity_calib_by_driver = true,
  473. .chain_noise_calib_by_driver = true,
  474. };
  475. struct iwl_cfg iwl6000i_2bg_cfg = {
  476. .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
  477. .fw_name_pre = IWL6000_FW_PRE,
  478. .ucode_api_max = IWL6000_UCODE_API_MAX,
  479. .ucode_api_min = IWL6000_UCODE_API_MIN,
  480. .sku = IWL_SKU_G,
  481. .ops = &iwl6000_ops,
  482. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  483. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  484. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  485. .num_of_queues = IWLAGN_NUM_QUEUES,
  486. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  487. .mod_params = &iwlagn_mod_params,
  488. .valid_tx_ant = ANT_BC,
  489. .valid_rx_ant = ANT_BC,
  490. .pll_cfg_val = 0,
  491. .set_l0s = true,
  492. .use_bsm = false,
  493. .pa_type = IWL_PA_INTERNAL,
  494. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  495. .shadow_ram_support = true,
  496. .led_compensation = 51,
  497. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  498. .supports_idle = true,
  499. .adv_thermal_throttle = true,
  500. .support_ct_kill_exit = true,
  501. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  502. .chain_noise_scale = 1000,
  503. .monitor_recover_period = IWL_MONITORING_PERIOD,
  504. .max_event_log_size = 1024,
  505. .ucode_tracing = true,
  506. .sensitivity_calib_by_driver = true,
  507. .chain_noise_calib_by_driver = true,
  508. };
  509. struct iwl_cfg iwl6050_2agn_cfg = {
  510. .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
  511. .fw_name_pre = IWL6050_FW_PRE,
  512. .ucode_api_max = IWL6050_UCODE_API_MAX,
  513. .ucode_api_min = IWL6050_UCODE_API_MIN,
  514. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  515. .ops = &iwl6050_ops,
  516. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  517. .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
  518. .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
  519. .num_of_queues = IWLAGN_NUM_QUEUES,
  520. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  521. .mod_params = &iwlagn_mod_params,
  522. .valid_tx_ant = ANT_AB,
  523. .valid_rx_ant = ANT_AB,
  524. .pll_cfg_val = 0,
  525. .set_l0s = true,
  526. .use_bsm = false,
  527. .pa_type = IWL_PA_SYSTEM,
  528. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  529. .shadow_ram_support = true,
  530. .ht_greenfield_support = true,
  531. .led_compensation = 51,
  532. .use_rts_for_ht = true, /* use rts/cts protection */
  533. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  534. .supports_idle = true,
  535. .adv_thermal_throttle = true,
  536. .support_ct_kill_exit = true,
  537. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  538. .chain_noise_scale = 1500,
  539. .monitor_recover_period = IWL_MONITORING_PERIOD,
  540. .max_event_log_size = 1024,
  541. .ucode_tracing = true,
  542. .sensitivity_calib_by_driver = true,
  543. .chain_noise_calib_by_driver = true,
  544. };
  545. struct iwl_cfg iwl6050_2abg_cfg = {
  546. .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
  547. .fw_name_pre = IWL6050_FW_PRE,
  548. .ucode_api_max = IWL6050_UCODE_API_MAX,
  549. .ucode_api_min = IWL6050_UCODE_API_MIN,
  550. .sku = IWL_SKU_A|IWL_SKU_G,
  551. .ops = &iwl6050_ops,
  552. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  553. .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
  554. .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
  555. .num_of_queues = IWLAGN_NUM_QUEUES,
  556. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  557. .mod_params = &iwlagn_mod_params,
  558. .valid_tx_ant = ANT_AB,
  559. .valid_rx_ant = ANT_AB,
  560. .pll_cfg_val = 0,
  561. .set_l0s = true,
  562. .use_bsm = false,
  563. .pa_type = IWL_PA_SYSTEM,
  564. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  565. .shadow_ram_support = true,
  566. .led_compensation = 51,
  567. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  568. .supports_idle = true,
  569. .adv_thermal_throttle = true,
  570. .support_ct_kill_exit = true,
  571. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  572. .chain_noise_scale = 1500,
  573. .monitor_recover_period = IWL_MONITORING_PERIOD,
  574. .max_event_log_size = 1024,
  575. .ucode_tracing = true,
  576. .sensitivity_calib_by_driver = true,
  577. .chain_noise_calib_by_driver = true,
  578. };
  579. struct iwl_cfg iwl6000_3agn_cfg = {
  580. .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
  581. .fw_name_pre = IWL6000_FW_PRE,
  582. .ucode_api_max = IWL6000_UCODE_API_MAX,
  583. .ucode_api_min = IWL6000_UCODE_API_MIN,
  584. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  585. .ops = &iwl6000_ops,
  586. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  587. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  588. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  589. .num_of_queues = IWLAGN_NUM_QUEUES,
  590. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  591. .mod_params = &iwlagn_mod_params,
  592. .valid_tx_ant = ANT_ABC,
  593. .valid_rx_ant = ANT_ABC,
  594. .pll_cfg_val = 0,
  595. .set_l0s = true,
  596. .use_bsm = false,
  597. .pa_type = IWL_PA_SYSTEM,
  598. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  599. .shadow_ram_support = true,
  600. .ht_greenfield_support = true,
  601. .led_compensation = 51,
  602. .use_rts_for_ht = true, /* use rts/cts protection */
  603. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  604. .supports_idle = true,
  605. .adv_thermal_throttle = true,
  606. .support_ct_kill_exit = true,
  607. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  608. .chain_noise_scale = 1000,
  609. .monitor_recover_period = IWL_MONITORING_PERIOD,
  610. .max_event_log_size = 1024,
  611. .ucode_tracing = true,
  612. .sensitivity_calib_by_driver = true,
  613. .chain_noise_calib_by_driver = true,
  614. };
  615. MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
  616. MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
  617. MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));