iwl-6000.c 17 KB

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