| Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 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 |  | 
|  | 27 | #include <linux/kernel.h> | 
|  | 28 | #include <linux/module.h> | 
|  | 29 | #include <linux/init.h> | 
|  | 30 | #include <linux/pci.h> | 
|  | 31 | #include <linux/dma-mapping.h> | 
|  | 32 | #include <linux/delay.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 |  | 
|  | 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-5000-hw.h" | 
|  | 47 |  | 
|  | 48 | /* Highest firmware API version supported */ | 
| Jay Sternberg | 77dcb6a | 2009-03-06 13:52:55 -0800 | [diff] [blame] | 49 | #define IWL1000_UCODE_API_MAX 2 | 
| Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 50 |  | 
|  | 51 | /* Lowest firmware API version supported */ | 
| Jay Sternberg | 77dcb6a | 2009-03-06 13:52:55 -0800 | [diff] [blame] | 52 | #define IWL1000_UCODE_API_MIN 1 | 
| Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 53 |  | 
| Jay Sternberg | 77dcb6a | 2009-03-06 13:52:55 -0800 | [diff] [blame] | 54 | #define IWL1000_FW_PRE "iwlwifi-1000-" | 
|  | 55 | #define _IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE #api ".ucode" | 
|  | 56 | #define IWL1000_MODULE_FIRMWARE(api) _IWL1000_MODULE_FIRMWARE(api) | 
| Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 57 |  | 
| Jay Sternberg | 77dcb6a | 2009-03-06 13:52:55 -0800 | [diff] [blame] | 58 | struct iwl_cfg iwl1000_bgn_cfg = { | 
|  | 59 | .name = "1000 Series BGN", | 
|  | 60 | .fw_name_pre = IWL1000_FW_PRE, | 
|  | 61 | .ucode_api_max = IWL1000_UCODE_API_MAX, | 
|  | 62 | .ucode_api_min = IWL1000_UCODE_API_MIN, | 
| Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 63 | .sku = IWL_SKU_G|IWL_SKU_N, | 
|  | 64 | .ops = &iwl5000_ops, | 
|  | 65 | .eeprom_size = IWL_5000_EEPROM_IMG_SIZE, | 
|  | 66 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | 
|  | 67 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | 
|  | 68 | .mod_params = &iwl50_mod_params, | 
| Jay Sternberg | c0bac76 | 2009-02-02 16:21:14 -0800 | [diff] [blame] | 69 | .valid_tx_ant = ANT_A, | 
|  | 70 | .valid_rx_ant = ANT_AB, | 
| Jay Sternberg | 050681b | 2009-01-29 11:09:13 -0800 | [diff] [blame] | 71 | .need_pll_cfg = true, | 
| Jay Sternberg | c5d0569 | 2009-01-19 15:30:35 -0800 | [diff] [blame] | 72 | }; | 
|  | 73 |  |