iwl-6000.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2008 - 2011 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. /* Highest firmware API version supported */
  48. #define IWL6000_UCODE_API_MAX 4
  49. #define IWL6050_UCODE_API_MAX 5
  50. #define IWL6000G2_UCODE_API_MAX 5
  51. /* Lowest firmware API version supported */
  52. #define IWL6000_UCODE_API_MIN 4
  53. #define IWL6050_UCODE_API_MIN 4
  54. #define IWL6000G2_UCODE_API_MIN 4
  55. #define IWL6000_FW_PRE "iwlwifi-6000-"
  56. #define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode"
  57. #define IWL6050_FW_PRE "iwlwifi-6050-"
  58. #define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
  59. #define IWL6005_FW_PRE "iwlwifi-6000g2a-"
  60. #define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE #api ".ucode"
  61. #define IWL6030_FW_PRE "iwlwifi-6000g2b-"
  62. #define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE #api ".ucode"
  63. static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
  64. {
  65. /* want Celsius */
  66. priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
  67. priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
  68. }
  69. static void iwl6050_additional_nic_config(struct iwl_priv *priv)
  70. {
  71. /* Indicate calibration version to uCode. */
  72. if (iwlagn_eeprom_calib_version(priv) >= 6)
  73. iwl_set_bit(priv, CSR_GP_DRIVER_REG,
  74. CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
  75. }
  76. static void iwl6150_additional_nic_config(struct iwl_priv *priv)
  77. {
  78. /* Indicate calibration version to uCode. */
  79. if (iwlagn_eeprom_calib_version(priv) >= 6)
  80. iwl_set_bit(priv, CSR_GP_DRIVER_REG,
  81. CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
  82. iwl_set_bit(priv, CSR_GP_DRIVER_REG,
  83. CSR_GP_DRIVER_REG_BIT_6050_1x2);
  84. }
  85. /* NIC configuration for 6000 series */
  86. static void iwl6000_nic_config(struct iwl_priv *priv)
  87. {
  88. u16 radio_cfg;
  89. radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
  90. /* write radio config values to register */
  91. if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
  92. iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
  93. EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
  94. EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
  95. EEPROM_RF_CFG_DASH_MSK(radio_cfg));
  96. /* set CSR_HW_CONFIG_REG for uCode use */
  97. iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
  98. CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
  99. CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
  100. /* no locking required for register write */
  101. if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
  102. /* 2x2 IPA phy type */
  103. iwl_write32(priv, CSR_GP_DRIVER_REG,
  104. CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
  105. }
  106. /* do additional nic configuration if needed */
  107. if (priv->cfg->ops->nic &&
  108. priv->cfg->ops->nic->additional_nic_config) {
  109. priv->cfg->ops->nic->additional_nic_config(priv);
  110. }
  111. }
  112. static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
  113. .min_nrg_cck = 97,
  114. .max_nrg_cck = 0, /* not used, set to 0 */
  115. .auto_corr_min_ofdm = 80,
  116. .auto_corr_min_ofdm_mrc = 128,
  117. .auto_corr_min_ofdm_x1 = 105,
  118. .auto_corr_min_ofdm_mrc_x1 = 192,
  119. .auto_corr_max_ofdm = 145,
  120. .auto_corr_max_ofdm_mrc = 232,
  121. .auto_corr_max_ofdm_x1 = 110,
  122. .auto_corr_max_ofdm_mrc_x1 = 232,
  123. .auto_corr_min_cck = 125,
  124. .auto_corr_max_cck = 175,
  125. .auto_corr_min_cck_mrc = 160,
  126. .auto_corr_max_cck_mrc = 310,
  127. .nrg_th_cck = 97,
  128. .nrg_th_ofdm = 100,
  129. .barker_corr_th_min = 190,
  130. .barker_corr_th_min_mrc = 390,
  131. .nrg_th_cca = 62,
  132. };
  133. static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
  134. {
  135. if (iwlagn_mod_params.num_of_queues >= IWL_MIN_NUM_QUEUES &&
  136. iwlagn_mod_params.num_of_queues <= IWLAGN_NUM_QUEUES)
  137. priv->cfg->base_params->num_of_queues =
  138. iwlagn_mod_params.num_of_queues;
  139. priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
  140. priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
  141. priv->hw_params.scd_bc_tbls_size =
  142. priv->cfg->base_params->num_of_queues *
  143. sizeof(struct iwlagn_scd_bc_tbl);
  144. priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
  145. priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
  146. priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID;
  147. priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
  148. priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
  149. priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
  150. BIT(IEEE80211_BAND_5GHZ);
  151. priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
  152. priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
  153. if (priv->cfg->rx_with_siso_diversity)
  154. priv->hw_params.rx_chains_num = 1;
  155. else
  156. priv->hw_params.rx_chains_num =
  157. num_of_ant(priv->cfg->valid_rx_ant);
  158. priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
  159. priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
  160. iwl6000_set_ct_threshold(priv);
  161. /* Set initial sensitivity parameters */
  162. /* Set initial calibration set */
  163. priv->hw_params.sens = &iwl6000_sensitivity;
  164. priv->hw_params.calib_init_cfg =
  165. BIT(IWL_CALIB_XTAL) |
  166. BIT(IWL_CALIB_LO) |
  167. BIT(IWL_CALIB_TX_IQ) |
  168. BIT(IWL_CALIB_BASE_BAND);
  169. if (priv->cfg->need_dc_calib)
  170. priv->hw_params.calib_rt_cfg |= BIT(IWL_CALIB_CFG_DC_IDX);
  171. if (priv->cfg->need_temp_offset_calib)
  172. priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_TEMP_OFFSET);
  173. priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
  174. return 0;
  175. }
  176. static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
  177. struct ieee80211_channel_switch *ch_switch)
  178. {
  179. /*
  180. * MULTI-FIXME
  181. * See iwl_mac_channel_switch.
  182. */
  183. struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
  184. struct iwl6000_channel_switch_cmd cmd;
  185. const struct iwl_channel_info *ch_info;
  186. u32 switch_time_in_usec, ucode_switch_time;
  187. u16 ch;
  188. u32 tsf_low;
  189. u8 switch_count;
  190. u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval);
  191. struct ieee80211_vif *vif = ctx->vif;
  192. struct iwl_host_cmd hcmd = {
  193. .id = REPLY_CHANNEL_SWITCH,
  194. .len = { sizeof(cmd), },
  195. .flags = CMD_SYNC,
  196. .data = { &cmd, },
  197. };
  198. cmd.band = priv->band == IEEE80211_BAND_2GHZ;
  199. ch = ch_switch->channel->hw_value;
  200. IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
  201. ctx->active.channel, ch);
  202. cmd.channel = cpu_to_le16(ch);
  203. cmd.rxon_flags = ctx->staging.flags;
  204. cmd.rxon_filter_flags = ctx->staging.filter_flags;
  205. switch_count = ch_switch->count;
  206. tsf_low = ch_switch->timestamp & 0x0ffffffff;
  207. /*
  208. * calculate the ucode channel switch time
  209. * adding TSF as one of the factor for when to switch
  210. */
  211. if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
  212. if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
  213. beacon_interval)) {
  214. switch_count -= (priv->ucode_beacon_time -
  215. tsf_low) / beacon_interval;
  216. } else
  217. switch_count = 0;
  218. }
  219. if (switch_count <= 1)
  220. cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
  221. else {
  222. switch_time_in_usec =
  223. vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
  224. ucode_switch_time = iwl_usecs_to_beacons(priv,
  225. switch_time_in_usec,
  226. beacon_interval);
  227. cmd.switch_time = iwl_add_beacon_time(priv,
  228. priv->ucode_beacon_time,
  229. ucode_switch_time,
  230. beacon_interval);
  231. }
  232. IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
  233. cmd.switch_time);
  234. ch_info = iwl_get_channel_info(priv, priv->band, ch);
  235. if (ch_info)
  236. cmd.expect_beacon = is_channel_radar(ch_info);
  237. else {
  238. IWL_ERR(priv, "invalid channel switch from %u to %u\n",
  239. ctx->active.channel, ch);
  240. return -EFAULT;
  241. }
  242. priv->switch_rxon.channel = cmd.channel;
  243. priv->switch_rxon.switch_in_progress = true;
  244. return iwl_send_cmd_sync(priv, &hcmd);
  245. }
  246. static struct iwl_lib_ops iwl6000_lib = {
  247. .set_hw_params = iwl6000_hw_set_hw_params,
  248. .rx_handler_setup = iwlagn_rx_handler_setup,
  249. .setup_deferred_work = iwlagn_setup_deferred_work,
  250. .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
  251. .send_tx_power = iwlagn_send_tx_power,
  252. .update_chain_flags = iwl_update_chain_flags,
  253. .set_channel_switch = iwl6000_hw_channel_switch,
  254. .apm_ops = {
  255. .init = iwl_apm_init,
  256. .config = iwl6000_nic_config,
  257. },
  258. .eeprom_ops = {
  259. .regulatory_bands = {
  260. EEPROM_REG_BAND_1_CHANNELS,
  261. EEPROM_REG_BAND_2_CHANNELS,
  262. EEPROM_REG_BAND_3_CHANNELS,
  263. EEPROM_REG_BAND_4_CHANNELS,
  264. EEPROM_REG_BAND_5_CHANNELS,
  265. EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
  266. EEPROM_REG_BAND_52_HT40_CHANNELS
  267. },
  268. .query_addr = iwlagn_eeprom_query_addr,
  269. .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
  270. },
  271. .temp_ops = {
  272. .temperature = iwlagn_temperature,
  273. },
  274. .txfifo_flush = iwlagn_txfifo_flush,
  275. .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
  276. };
  277. static struct iwl_lib_ops iwl6030_lib = {
  278. .set_hw_params = iwl6000_hw_set_hw_params,
  279. .rx_handler_setup = iwlagn_bt_rx_handler_setup,
  280. .setup_deferred_work = iwlagn_bt_setup_deferred_work,
  281. .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
  282. .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
  283. .send_tx_power = iwlagn_send_tx_power,
  284. .update_chain_flags = iwl_update_chain_flags,
  285. .set_channel_switch = iwl6000_hw_channel_switch,
  286. .apm_ops = {
  287. .init = iwl_apm_init,
  288. .config = iwl6000_nic_config,
  289. },
  290. .eeprom_ops = {
  291. .regulatory_bands = {
  292. EEPROM_REG_BAND_1_CHANNELS,
  293. EEPROM_REG_BAND_2_CHANNELS,
  294. EEPROM_REG_BAND_3_CHANNELS,
  295. EEPROM_REG_BAND_4_CHANNELS,
  296. EEPROM_REG_BAND_5_CHANNELS,
  297. EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
  298. EEPROM_REG_BAND_52_HT40_CHANNELS
  299. },
  300. .query_addr = iwlagn_eeprom_query_addr,
  301. .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
  302. },
  303. .temp_ops = {
  304. .temperature = iwlagn_temperature,
  305. },
  306. .txfifo_flush = iwlagn_txfifo_flush,
  307. .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
  308. };
  309. static struct iwl_nic_ops iwl6050_nic_ops = {
  310. .additional_nic_config = &iwl6050_additional_nic_config,
  311. };
  312. static struct iwl_nic_ops iwl6150_nic_ops = {
  313. .additional_nic_config = &iwl6150_additional_nic_config,
  314. };
  315. static const struct iwl_ops iwl6000_ops = {
  316. .lib = &iwl6000_lib,
  317. .hcmd = &iwlagn_hcmd,
  318. .utils = &iwlagn_hcmd_utils,
  319. };
  320. static const struct iwl_ops iwl6050_ops = {
  321. .lib = &iwl6000_lib,
  322. .hcmd = &iwlagn_hcmd,
  323. .utils = &iwlagn_hcmd_utils,
  324. .nic = &iwl6050_nic_ops,
  325. };
  326. static const struct iwl_ops iwl6150_ops = {
  327. .lib = &iwl6000_lib,
  328. .hcmd = &iwlagn_hcmd,
  329. .utils = &iwlagn_hcmd_utils,
  330. .nic = &iwl6150_nic_ops,
  331. };
  332. static const struct iwl_ops iwl6030_ops = {
  333. .lib = &iwl6030_lib,
  334. .hcmd = &iwlagn_bt_hcmd,
  335. .utils = &iwlagn_hcmd_utils,
  336. };
  337. static struct iwl_base_params iwl6000_base_params = {
  338. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  339. .num_of_queues = IWLAGN_NUM_QUEUES,
  340. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  341. .pll_cfg_val = 0,
  342. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  343. .shadow_ram_support = true,
  344. .led_compensation = 51,
  345. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  346. .adv_thermal_throttle = true,
  347. .support_ct_kill_exit = true,
  348. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  349. .chain_noise_scale = 1000,
  350. .wd_timeout = IWL_DEF_WD_TIMEOUT,
  351. .max_event_log_size = 512,
  352. .shadow_reg_enable = true,
  353. };
  354. static struct iwl_base_params iwl6050_base_params = {
  355. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  356. .num_of_queues = IWLAGN_NUM_QUEUES,
  357. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  358. .pll_cfg_val = 0,
  359. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  360. .shadow_ram_support = true,
  361. .led_compensation = 51,
  362. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  363. .adv_thermal_throttle = true,
  364. .support_ct_kill_exit = true,
  365. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  366. .chain_noise_scale = 1500,
  367. .wd_timeout = IWL_DEF_WD_TIMEOUT,
  368. .max_event_log_size = 1024,
  369. .shadow_reg_enable = true,
  370. };
  371. static struct iwl_base_params iwl6000_g2_base_params = {
  372. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  373. .num_of_queues = IWLAGN_NUM_QUEUES,
  374. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  375. .pll_cfg_val = 0,
  376. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  377. .shadow_ram_support = true,
  378. .led_compensation = 57,
  379. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  380. .adv_thermal_throttle = true,
  381. .support_ct_kill_exit = true,
  382. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  383. .chain_noise_scale = 1000,
  384. .wd_timeout = IWL_LONG_WD_TIMEOUT,
  385. .max_event_log_size = 512,
  386. .shadow_reg_enable = true,
  387. };
  388. static struct iwl_ht_params iwl6000_ht_params = {
  389. .ht_greenfield_support = true,
  390. .use_rts_for_aggregation = true, /* use rts/cts protection */
  391. };
  392. static struct iwl_bt_params iwl6000_bt_params = {
  393. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  394. .advanced_bt_coexist = true,
  395. .agg_time_limit = BT_AGG_THRESHOLD_DEF,
  396. .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
  397. .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
  398. .bt_sco_disable = true,
  399. };
  400. #define IWL_DEVICE_6005 \
  401. .fw_name_pre = IWL6005_FW_PRE, \
  402. .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
  403. .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
  404. .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \
  405. .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
  406. .ops = &iwl6000_ops, \
  407. .base_params = &iwl6000_g2_base_params, \
  408. .need_dc_calib = true, \
  409. .need_temp_offset_calib = true, \
  410. .led_mode = IWL_LED_RF_STATE
  411. struct iwl_cfg iwl6005_2agn_cfg = {
  412. .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
  413. IWL_DEVICE_6005,
  414. .ht_params = &iwl6000_ht_params,
  415. };
  416. struct iwl_cfg iwl6005_2abg_cfg = {
  417. .name = "Intel(R) Centrino(R) Advanced-N 6205 ABG",
  418. IWL_DEVICE_6005,
  419. };
  420. struct iwl_cfg iwl6005_2bg_cfg = {
  421. .name = "Intel(R) Centrino(R) Advanced-N 6205 BG",
  422. IWL_DEVICE_6005,
  423. };
  424. #define IWL_DEVICE_6030 \
  425. .fw_name_pre = IWL6030_FW_PRE, \
  426. .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
  427. .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
  428. .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \
  429. .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
  430. .ops = &iwl6030_ops, \
  431. .base_params = &iwl6000_g2_base_params, \
  432. .bt_params = &iwl6000_bt_params, \
  433. .need_dc_calib = true, \
  434. .need_temp_offset_calib = true, \
  435. .led_mode = IWL_LED_RF_STATE, \
  436. .adv_pm = true \
  437. struct iwl_cfg iwl6030_2agn_cfg = {
  438. .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
  439. IWL_DEVICE_6030,
  440. .ht_params = &iwl6000_ht_params,
  441. };
  442. struct iwl_cfg iwl6030_2abg_cfg = {
  443. .name = "Intel(R) Centrino(R) Advanced-N 6230 ABG",
  444. IWL_DEVICE_6030,
  445. };
  446. struct iwl_cfg iwl6030_2bgn_cfg = {
  447. .name = "Intel(R) Centrino(R) Advanced-N 6230 BGN",
  448. IWL_DEVICE_6030,
  449. .ht_params = &iwl6000_ht_params,
  450. };
  451. struct iwl_cfg iwl6030_2bg_cfg = {
  452. .name = "Intel(R) Centrino(R) Advanced-N 6230 BG",
  453. IWL_DEVICE_6030,
  454. };
  455. struct iwl_cfg iwl6035_2agn_cfg = {
  456. .name = "6035 Series 2x2 AGN/BT",
  457. IWL_DEVICE_6030,
  458. .ht_params = &iwl6000_ht_params,
  459. };
  460. struct iwl_cfg iwl6035_2abg_cfg = {
  461. .name = "6035 Series 2x2 ABG/BT",
  462. IWL_DEVICE_6030,
  463. };
  464. struct iwl_cfg iwl6035_2bg_cfg = {
  465. .name = "6035 Series 2x2 BG/BT",
  466. IWL_DEVICE_6030,
  467. };
  468. struct iwl_cfg iwl1030_bgn_cfg = {
  469. .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
  470. IWL_DEVICE_6030,
  471. .ht_params = &iwl6000_ht_params,
  472. };
  473. struct iwl_cfg iwl1030_bg_cfg = {
  474. .name = "Intel(R) Centrino(R) Wireless-N 1030 BG",
  475. IWL_DEVICE_6030,
  476. };
  477. struct iwl_cfg iwl130_bgn_cfg = {
  478. .name = "Intel(R) Centrino(R) Wireless-N 130 BGN",
  479. IWL_DEVICE_6030,
  480. .ht_params = &iwl6000_ht_params,
  481. .rx_with_siso_diversity = true,
  482. };
  483. struct iwl_cfg iwl130_bg_cfg = {
  484. .name = "Intel(R) Centrino(R) Wireless-N 130 BG",
  485. IWL_DEVICE_6030,
  486. .rx_with_siso_diversity = true,
  487. };
  488. /*
  489. * "i": Internal configuration, use internal Power Amplifier
  490. */
  491. #define IWL_DEVICE_6000i \
  492. .fw_name_pre = IWL6000_FW_PRE, \
  493. .ucode_api_max = IWL6000_UCODE_API_MAX, \
  494. .ucode_api_min = IWL6000_UCODE_API_MIN, \
  495. .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
  496. .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
  497. .eeprom_ver = EEPROM_6000_EEPROM_VERSION, \
  498. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
  499. .ops = &iwl6000_ops, \
  500. .base_params = &iwl6000_base_params, \
  501. .pa_type = IWL_PA_INTERNAL, \
  502. .led_mode = IWL_LED_BLINK
  503. struct iwl_cfg iwl6000i_2agn_cfg = {
  504. .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
  505. IWL_DEVICE_6000i,
  506. .ht_params = &iwl6000_ht_params,
  507. };
  508. struct iwl_cfg iwl6000i_2abg_cfg = {
  509. .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
  510. IWL_DEVICE_6000i,
  511. };
  512. struct iwl_cfg iwl6000i_2bg_cfg = {
  513. .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
  514. IWL_DEVICE_6000i,
  515. };
  516. #define IWL_DEVICE_6050 \
  517. .fw_name_pre = IWL6050_FW_PRE, \
  518. .ucode_api_max = IWL6050_UCODE_API_MAX, \
  519. .ucode_api_min = IWL6050_UCODE_API_MIN, \
  520. .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
  521. .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
  522. .ops = &iwl6050_ops, \
  523. .eeprom_ver = EEPROM_6050_EEPROM_VERSION, \
  524. .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
  525. .base_params = &iwl6050_base_params, \
  526. .need_dc_calib = true, \
  527. .led_mode = IWL_LED_BLINK, \
  528. .internal_wimax_coex = true
  529. struct iwl_cfg iwl6050_2agn_cfg = {
  530. .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
  531. IWL_DEVICE_6050,
  532. .ht_params = &iwl6000_ht_params,
  533. };
  534. struct iwl_cfg iwl6050_2abg_cfg = {
  535. .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
  536. IWL_DEVICE_6050,
  537. };
  538. #define IWL_DEVICE_6150 \
  539. .fw_name_pre = IWL6050_FW_PRE, \
  540. .ucode_api_max = IWL6050_UCODE_API_MAX, \
  541. .ucode_api_min = IWL6050_UCODE_API_MIN, \
  542. .ops = &iwl6150_ops, \
  543. .eeprom_ver = EEPROM_6150_EEPROM_VERSION, \
  544. .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
  545. .base_params = &iwl6050_base_params, \
  546. .need_dc_calib = true, \
  547. .led_mode = IWL_LED_BLINK, \
  548. .internal_wimax_coex = true
  549. struct iwl_cfg iwl6150_bgn_cfg = {
  550. .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
  551. IWL_DEVICE_6150,
  552. .ht_params = &iwl6000_ht_params,
  553. };
  554. struct iwl_cfg iwl6150_bg_cfg = {
  555. .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
  556. IWL_DEVICE_6150,
  557. };
  558. struct iwl_cfg iwl6000_3agn_cfg = {
  559. .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
  560. .fw_name_pre = IWL6000_FW_PRE,
  561. .ucode_api_max = IWL6000_UCODE_API_MAX,
  562. .ucode_api_min = IWL6000_UCODE_API_MIN,
  563. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  564. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  565. .ops = &iwl6000_ops,
  566. .base_params = &iwl6000_base_params,
  567. .ht_params = &iwl6000_ht_params,
  568. .need_dc_calib = true,
  569. .led_mode = IWL_LED_BLINK,
  570. };
  571. MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
  572. MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
  573. MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
  574. MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));