iwl-6000.c 18 KB

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