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