iwl-5000.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 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/sched.h>
  33. #include <linux/skbuff.h>
  34. #include <linux/netdevice.h>
  35. #include <linux/wireless.h>
  36. #include <net/mac80211.h>
  37. #include <linux/etherdevice.h>
  38. #include <asm/unaligned.h>
  39. #include <linux/stringify.h>
  40. #include "iwl-eeprom.h"
  41. #include "iwl-dev.h"
  42. #include "iwl-core.h"
  43. #include "iwl-io.h"
  44. #include "iwl-sta.h"
  45. #include "iwl-helpers.h"
  46. #include "iwl-agn.h"
  47. #include "iwl-agn-hw.h"
  48. #include "iwl-5000-hw.h"
  49. /* Highest firmware API version supported */
  50. #define IWL5000_UCODE_API_MAX 5
  51. #define IWL5150_UCODE_API_MAX 2
  52. /* Lowest firmware API version supported */
  53. #define IWL5000_UCODE_API_MIN 1
  54. #define IWL5150_UCODE_API_MIN 1
  55. #define IWL5000_FW_PRE "iwlwifi-5000-"
  56. #define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
  57. #define IWL5150_FW_PRE "iwlwifi-5150-"
  58. #define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
  59. /* NIC configuration for 5000 series */
  60. static void iwl5000_nic_config(struct iwl_priv *priv)
  61. {
  62. unsigned long flags;
  63. u16 radio_cfg;
  64. spin_lock_irqsave(&priv->lock, flags);
  65. radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
  66. /* write radio config values to register */
  67. if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) < EEPROM_RF_CONFIG_TYPE_MAX)
  68. iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
  69. EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
  70. EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
  71. EEPROM_RF_CFG_DASH_MSK(radio_cfg));
  72. /* set CSR_HW_CONFIG_REG for uCode use */
  73. iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
  74. CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
  75. CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
  76. /* W/A : NIC is stuck in a reset state after Early PCIe power off
  77. * (PCIe power is lost before PERST# is asserted),
  78. * causing ME FW to lose ownership and not being able to obtain it back.
  79. */
  80. iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG,
  81. APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS,
  82. ~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS);
  83. spin_unlock_irqrestore(&priv->lock, flags);
  84. }
  85. static struct iwl_sensitivity_ranges iwl5000_sensitivity = {
  86. .min_nrg_cck = 95,
  87. .max_nrg_cck = 0, /* not used, set to 0 */
  88. .auto_corr_min_ofdm = 90,
  89. .auto_corr_min_ofdm_mrc = 170,
  90. .auto_corr_min_ofdm_x1 = 120,
  91. .auto_corr_min_ofdm_mrc_x1 = 240,
  92. .auto_corr_max_ofdm = 120,
  93. .auto_corr_max_ofdm_mrc = 210,
  94. .auto_corr_max_ofdm_x1 = 120,
  95. .auto_corr_max_ofdm_mrc_x1 = 240,
  96. .auto_corr_min_cck = 125,
  97. .auto_corr_max_cck = 200,
  98. .auto_corr_min_cck_mrc = 170,
  99. .auto_corr_max_cck_mrc = 400,
  100. .nrg_th_cck = 95,
  101. .nrg_th_ofdm = 95,
  102. .barker_corr_th_min = 190,
  103. .barker_corr_th_min_mrc = 390,
  104. .nrg_th_cca = 62,
  105. };
  106. static struct iwl_sensitivity_ranges iwl5150_sensitivity = {
  107. .min_nrg_cck = 95,
  108. .max_nrg_cck = 0, /* not used, set to 0 */
  109. .auto_corr_min_ofdm = 90,
  110. .auto_corr_min_ofdm_mrc = 170,
  111. .auto_corr_min_ofdm_x1 = 105,
  112. .auto_corr_min_ofdm_mrc_x1 = 220,
  113. .auto_corr_max_ofdm = 120,
  114. .auto_corr_max_ofdm_mrc = 210,
  115. /* max = min for performance bug in 5150 DSP */
  116. .auto_corr_max_ofdm_x1 = 105,
  117. .auto_corr_max_ofdm_mrc_x1 = 220,
  118. .auto_corr_min_cck = 125,
  119. .auto_corr_max_cck = 200,
  120. .auto_corr_min_cck_mrc = 170,
  121. .auto_corr_max_cck_mrc = 400,
  122. .nrg_th_cck = 95,
  123. .nrg_th_ofdm = 95,
  124. .barker_corr_th_min = 190,
  125. .barker_corr_th_min_mrc = 390,
  126. .nrg_th_cca = 62,
  127. };
  128. static void iwl5150_set_ct_threshold(struct iwl_priv *priv)
  129. {
  130. const s32 volt2temp_coef = IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF;
  131. s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) -
  132. iwl_temp_calib_to_offset(priv);
  133. priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef;
  134. }
  135. static void iwl5000_set_ct_threshold(struct iwl_priv *priv)
  136. {
  137. /* want Celsius */
  138. priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY;
  139. }
  140. static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
  141. {
  142. if (iwlagn_mod_params.num_of_queues >= IWL_MIN_NUM_QUEUES &&
  143. iwlagn_mod_params.num_of_queues <= IWLAGN_NUM_QUEUES)
  144. priv->cfg->base_params->num_of_queues =
  145. iwlagn_mod_params.num_of_queues;
  146. priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
  147. priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
  148. priv->hw_params.scd_bc_tbls_size =
  149. priv->cfg->base_params->num_of_queues *
  150. sizeof(struct iwlagn_scd_bc_tbl);
  151. priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
  152. priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
  153. priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID;
  154. priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE;
  155. priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE;
  156. priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
  157. BIT(IEEE80211_BAND_5GHZ);
  158. priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
  159. priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
  160. priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
  161. priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
  162. priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
  163. iwl5000_set_ct_threshold(priv);
  164. /* Set initial sensitivity parameters */
  165. /* Set initial calibration set */
  166. priv->hw_params.sens = &iwl5000_sensitivity;
  167. priv->hw_params.calib_init_cfg =
  168. BIT(IWL_CALIB_XTAL) |
  169. BIT(IWL_CALIB_LO) |
  170. BIT(IWL_CALIB_TX_IQ) |
  171. BIT(IWL_CALIB_TX_IQ_PERD) |
  172. BIT(IWL_CALIB_BASE_BAND);
  173. priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
  174. return 0;
  175. }
  176. static int iwl5150_hw_set_hw_params(struct iwl_priv *priv)
  177. {
  178. if (iwlagn_mod_params.num_of_queues >= IWL_MIN_NUM_QUEUES &&
  179. iwlagn_mod_params.num_of_queues <= IWLAGN_NUM_QUEUES)
  180. priv->cfg->base_params->num_of_queues =
  181. iwlagn_mod_params.num_of_queues;
  182. priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
  183. priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
  184. priv->hw_params.scd_bc_tbls_size =
  185. priv->cfg->base_params->num_of_queues *
  186. sizeof(struct iwlagn_scd_bc_tbl);
  187. priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
  188. priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
  189. priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID;
  190. priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE;
  191. priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE;
  192. priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
  193. BIT(IEEE80211_BAND_5GHZ);
  194. priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
  195. priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
  196. priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
  197. priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
  198. priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
  199. iwl5150_set_ct_threshold(priv);
  200. /* Set initial sensitivity parameters */
  201. /* Set initial calibration set */
  202. priv->hw_params.sens = &iwl5150_sensitivity;
  203. priv->hw_params.calib_init_cfg =
  204. BIT(IWL_CALIB_LO) |
  205. BIT(IWL_CALIB_TX_IQ) |
  206. BIT(IWL_CALIB_BASE_BAND);
  207. if (priv->cfg->need_dc_calib)
  208. priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC);
  209. priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
  210. return 0;
  211. }
  212. static void iwl5150_temperature(struct iwl_priv *priv)
  213. {
  214. u32 vt = 0;
  215. s32 offset = iwl_temp_calib_to_offset(priv);
  216. vt = le32_to_cpu(priv->statistics.common.temperature);
  217. vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset;
  218. /* now vt hold the temperature in Kelvin */
  219. priv->temperature = KELVIN_TO_CELSIUS(vt);
  220. iwl_tt_handler(priv);
  221. }
  222. static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
  223. struct ieee80211_channel_switch *ch_switch)
  224. {
  225. /*
  226. * MULTI-FIXME
  227. * See iwl_mac_channel_switch.
  228. */
  229. struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
  230. struct iwl5000_channel_switch_cmd cmd;
  231. const struct iwl_channel_info *ch_info;
  232. u32 switch_time_in_usec, ucode_switch_time;
  233. u16 ch;
  234. u32 tsf_low;
  235. u8 switch_count;
  236. u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval);
  237. struct ieee80211_vif *vif = ctx->vif;
  238. struct iwl_host_cmd hcmd = {
  239. .id = REPLY_CHANNEL_SWITCH,
  240. .len = { sizeof(cmd), },
  241. .flags = CMD_SYNC,
  242. .data = { &cmd, },
  243. };
  244. cmd.band = priv->band == IEEE80211_BAND_2GHZ;
  245. ch = ch_switch->channel->hw_value;
  246. IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
  247. ctx->active.channel, ch);
  248. cmd.channel = cpu_to_le16(ch);
  249. cmd.rxon_flags = ctx->staging.flags;
  250. cmd.rxon_filter_flags = ctx->staging.filter_flags;
  251. switch_count = ch_switch->count;
  252. tsf_low = ch_switch->timestamp & 0x0ffffffff;
  253. /*
  254. * calculate the ucode channel switch time
  255. * adding TSF as one of the factor for when to switch
  256. */
  257. if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
  258. if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
  259. beacon_interval)) {
  260. switch_count -= (priv->ucode_beacon_time -
  261. tsf_low) / beacon_interval;
  262. } else
  263. switch_count = 0;
  264. }
  265. if (switch_count <= 1)
  266. cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
  267. else {
  268. switch_time_in_usec =
  269. vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
  270. ucode_switch_time = iwl_usecs_to_beacons(priv,
  271. switch_time_in_usec,
  272. beacon_interval);
  273. cmd.switch_time = iwl_add_beacon_time(priv,
  274. priv->ucode_beacon_time,
  275. ucode_switch_time,
  276. beacon_interval);
  277. }
  278. IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
  279. cmd.switch_time);
  280. ch_info = iwl_get_channel_info(priv, priv->band, ch);
  281. if (ch_info)
  282. cmd.expect_beacon = is_channel_radar(ch_info);
  283. else {
  284. IWL_ERR(priv, "invalid channel switch from %u to %u\n",
  285. ctx->active.channel, ch);
  286. return -EFAULT;
  287. }
  288. return iwl_send_cmd_sync(priv, &hcmd);
  289. }
  290. static struct iwl_lib_ops iwl5000_lib = {
  291. .set_hw_params = iwl5000_hw_set_hw_params,
  292. .rx_handler_setup = iwlagn_rx_handler_setup,
  293. .setup_deferred_work = iwlagn_setup_deferred_work,
  294. .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
  295. .send_tx_power = iwlagn_send_tx_power,
  296. .update_chain_flags = iwl_update_chain_flags,
  297. .set_channel_switch = iwl5000_hw_channel_switch,
  298. .apm_ops = {
  299. .init = iwl_apm_init,
  300. .config = iwl5000_nic_config,
  301. },
  302. .eeprom_ops = {
  303. .regulatory_bands = {
  304. EEPROM_REG_BAND_1_CHANNELS,
  305. EEPROM_REG_BAND_2_CHANNELS,
  306. EEPROM_REG_BAND_3_CHANNELS,
  307. EEPROM_REG_BAND_4_CHANNELS,
  308. EEPROM_REG_BAND_5_CHANNELS,
  309. EEPROM_REG_BAND_24_HT40_CHANNELS,
  310. EEPROM_REG_BAND_52_HT40_CHANNELS
  311. },
  312. .query_addr = iwlagn_eeprom_query_addr,
  313. },
  314. .temp_ops = {
  315. .temperature = iwlagn_temperature,
  316. },
  317. .txfifo_flush = iwlagn_txfifo_flush,
  318. .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
  319. };
  320. static struct iwl_lib_ops iwl5150_lib = {
  321. .set_hw_params = iwl5150_hw_set_hw_params,
  322. .rx_handler_setup = iwlagn_rx_handler_setup,
  323. .setup_deferred_work = iwlagn_setup_deferred_work,
  324. .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
  325. .send_tx_power = iwlagn_send_tx_power,
  326. .update_chain_flags = iwl_update_chain_flags,
  327. .set_channel_switch = iwl5000_hw_channel_switch,
  328. .apm_ops = {
  329. .init = iwl_apm_init,
  330. .config = iwl5000_nic_config,
  331. },
  332. .eeprom_ops = {
  333. .regulatory_bands = {
  334. EEPROM_REG_BAND_1_CHANNELS,
  335. EEPROM_REG_BAND_2_CHANNELS,
  336. EEPROM_REG_BAND_3_CHANNELS,
  337. EEPROM_REG_BAND_4_CHANNELS,
  338. EEPROM_REG_BAND_5_CHANNELS,
  339. EEPROM_REG_BAND_24_HT40_CHANNELS,
  340. EEPROM_REG_BAND_52_HT40_CHANNELS
  341. },
  342. .query_addr = iwlagn_eeprom_query_addr,
  343. },
  344. .temp_ops = {
  345. .temperature = iwl5150_temperature,
  346. },
  347. .txfifo_flush = iwlagn_txfifo_flush,
  348. .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
  349. };
  350. static const struct iwl_ops iwl5000_ops = {
  351. .lib = &iwl5000_lib,
  352. .hcmd = &iwlagn_hcmd,
  353. .utils = &iwlagn_hcmd_utils,
  354. };
  355. static const struct iwl_ops iwl5150_ops = {
  356. .lib = &iwl5150_lib,
  357. .hcmd = &iwlagn_hcmd,
  358. .utils = &iwlagn_hcmd_utils,
  359. };
  360. static struct iwl_base_params iwl5000_base_params = {
  361. .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
  362. .num_of_queues = IWLAGN_NUM_QUEUES,
  363. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  364. .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
  365. .led_compensation = 51,
  366. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  367. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
  368. .chain_noise_scale = 1000,
  369. .wd_timeout = IWL_LONG_WD_TIMEOUT,
  370. .max_event_log_size = 512,
  371. .no_idle_support = true,
  372. };
  373. static struct iwl_ht_params iwl5000_ht_params = {
  374. .ht_greenfield_support = true,
  375. };
  376. #define IWL_DEVICE_5000 \
  377. .fw_name_pre = IWL5000_FW_PRE, \
  378. .ucode_api_max = IWL5000_UCODE_API_MAX, \
  379. .ucode_api_min = IWL5000_UCODE_API_MIN, \
  380. .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \
  381. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
  382. .ops = &iwl5000_ops, \
  383. .base_params = &iwl5000_base_params, \
  384. .led_mode = IWL_LED_BLINK
  385. struct iwl_cfg iwl5300_agn_cfg = {
  386. .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
  387. IWL_DEVICE_5000,
  388. /* at least EEPROM 0x11A has wrong info */
  389. .valid_tx_ant = ANT_ABC, /* .cfg overwrite */
  390. .valid_rx_ant = ANT_ABC, /* .cfg overwrite */
  391. .ht_params = &iwl5000_ht_params,
  392. };
  393. struct iwl_cfg iwl5100_bgn_cfg = {
  394. .name = "Intel(R) WiFi Link 5100 BGN",
  395. IWL_DEVICE_5000,
  396. .valid_tx_ant = ANT_B, /* .cfg overwrite */
  397. .valid_rx_ant = ANT_AB, /* .cfg overwrite */
  398. .ht_params = &iwl5000_ht_params,
  399. };
  400. struct iwl_cfg iwl5100_abg_cfg = {
  401. .name = "Intel(R) WiFi Link 5100 ABG",
  402. IWL_DEVICE_5000,
  403. .valid_tx_ant = ANT_B, /* .cfg overwrite */
  404. .valid_rx_ant = ANT_AB, /* .cfg overwrite */
  405. };
  406. struct iwl_cfg iwl5100_agn_cfg = {
  407. .name = "Intel(R) WiFi Link 5100 AGN",
  408. IWL_DEVICE_5000,
  409. .valid_tx_ant = ANT_B, /* .cfg overwrite */
  410. .valid_rx_ant = ANT_AB, /* .cfg overwrite */
  411. .ht_params = &iwl5000_ht_params,
  412. };
  413. struct iwl_cfg iwl5350_agn_cfg = {
  414. .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
  415. .fw_name_pre = IWL5000_FW_PRE,
  416. .ucode_api_max = IWL5000_UCODE_API_MAX,
  417. .ucode_api_min = IWL5000_UCODE_API_MIN,
  418. .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
  419. .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
  420. .ops = &iwl5000_ops,
  421. .base_params = &iwl5000_base_params,
  422. .ht_params = &iwl5000_ht_params,
  423. .led_mode = IWL_LED_BLINK,
  424. .internal_wimax_coex = true,
  425. };
  426. #define IWL_DEVICE_5150 \
  427. .fw_name_pre = IWL5150_FW_PRE, \
  428. .ucode_api_max = IWL5150_UCODE_API_MAX, \
  429. .ucode_api_min = IWL5150_UCODE_API_MIN, \
  430. .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \
  431. .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
  432. .ops = &iwl5150_ops, \
  433. .base_params = &iwl5000_base_params, \
  434. .need_dc_calib = true, \
  435. .led_mode = IWL_LED_BLINK, \
  436. .internal_wimax_coex = true
  437. struct iwl_cfg iwl5150_agn_cfg = {
  438. .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
  439. IWL_DEVICE_5150,
  440. .ht_params = &iwl5000_ht_params,
  441. };
  442. struct iwl_cfg iwl5150_abg_cfg = {
  443. .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
  444. IWL_DEVICE_5150,
  445. };
  446. MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
  447. MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));