diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-03-04 21:09:30 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-07 16:03:00 -0500 |
commit | 82b9a1213132aa53ddbcc459ed77a335d031cd2e (patch) | |
tree | f6e75639b37eba98273ce51cbdf4dad25d280fae | |
parent | 750fe6396614e267aeec0e2ff636740e2688d4d9 (diff) |
iwlwifi: add struct iwl_cfg
This patch introduces struct iwl_cfg. struct iwl_cfg defines static
configuration for each device type and sku. It is passed as driver_data
to the bus probe function.
This patch also introduce new common header file iwl-core.h
which will represent core functionality of iwlwifi driver
3945ABG uses separate iwl-3945-dev.h header file for now
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-core.h | 80 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 81 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 35 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 11 |
8 files changed, 203 insertions, 37 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-core.h b/drivers/net/wireless/iwlwifi/iwl-3945-core.h new file mode 100644 index 000000000000..bc12f97ba0b1 --- /dev/null +++ b/drivers/net/wireless/iwlwifi/iwl-3945-core.h | |||
@@ -0,0 +1,80 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * This file is provided under a dual BSD/GPLv2 license. When using or | ||
4 | * redistributing this file, you may do so under either license. | ||
5 | * | ||
6 | * GPL LICENSE SUMMARY | ||
7 | * | ||
8 | * Copyright(c) 2008 Intel Corporation. All rights reserved. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of version 2 of the GNU General Public License as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, | ||
22 | * USA | ||
23 | * | ||
24 | * The full GNU General Public License is included in this distribution | ||
25 | * in the file called LICENSE.GPL. | ||
26 | * | ||
27 | * Contact Information: | ||
28 | * Tomas Winkler <tomas.winkler@intel.com> | ||
29 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
30 | * | ||
31 | * BSD LICENSE | ||
32 | * | ||
33 | * Copyright(c) 2005 - 2008 Intel Corporation. All rights reserved. | ||
34 | * All rights reserved. | ||
35 | * | ||
36 | * Redistribution and use in source and binary forms, with or without | ||
37 | * modification, are permitted provided that the following conditions | ||
38 | * are met: | ||
39 | * | ||
40 | * * Redistributions of source code must retain the above copyright | ||
41 | * notice, this list of conditions and the following disclaimer. | ||
42 | * * Redistributions in binary form must reproduce the above copyright | ||
43 | * notice, this list of conditions and the following disclaimer in | ||
44 | * the documentation and/or other materials provided with the | ||
45 | * distribution. | ||
46 | * * Neither the name Intel Corporation nor the names of its | ||
47 | * contributors may be used to endorse or promote products derived | ||
48 | * from this software without specific prior written permission. | ||
49 | * | ||
50 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
51 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
52 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
53 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
54 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
56 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
57 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
58 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
59 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
61 | *****************************************************************************/ | ||
62 | |||
63 | #ifndef __iwl_3945_dev_h__ | ||
64 | #define __iwl_3945_dev_h__ | ||
65 | |||
66 | #define IWL_PCI_DEVICE(dev, subdev, cfg) \ | ||
67 | .vendor = PCI_VENDOR_ID_INTEL, .device = (dev), \ | ||
68 | .subvendor = PCI_ANY_ID, .subdevice = (subdev), \ | ||
69 | .driver_data = (kernel_ulong_t)&(cfg) | ||
70 | |||
71 | #define IWL_SKU_G 0x1 | ||
72 | #define IWL_SKU_A 0x2 | ||
73 | |||
74 | struct iwl_3945_cfg { | ||
75 | const char *name; | ||
76 | const char *fw_name; | ||
77 | unsigned int sku; | ||
78 | }; | ||
79 | |||
80 | #endif /* __iwl_dev_h__ */ | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 0fca35650ad3..b9097643a648 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <asm/unaligned.h> | 39 | #include <asm/unaligned.h> |
40 | #include <net/mac80211.h> | 40 | #include <net/mac80211.h> |
41 | 41 | ||
42 | #include "iwl-3945-core.h" | ||
42 | #include "iwl-3945.h" | 43 | #include "iwl-3945.h" |
43 | #include "iwl-helpers.h" | 44 | #include "iwl-helpers.h" |
44 | #include "iwl-3945-rs.h" | 45 | #include "iwl-3945-rs.h" |
@@ -2523,9 +2524,23 @@ void iwl3945_hw_cancel_deferred_work(struct iwl3945_priv *priv) | |||
2523 | cancel_delayed_work(&priv->thermal_periodic); | 2524 | cancel_delayed_work(&priv->thermal_periodic); |
2524 | } | 2525 | } |
2525 | 2526 | ||
2527 | static struct iwl_3945_cfg iwl3945_bg_cfg = { | ||
2528 | .name = "3945BG", | ||
2529 | .sku = IWL_SKU_G, | ||
2530 | }; | ||
2531 | |||
2532 | static struct iwl_3945_cfg iwl3945_abg_cfg = { | ||
2533 | .name = "3945ABG", | ||
2534 | .sku = IWL_SKU_A|IWL_SKU_G, | ||
2535 | }; | ||
2536 | |||
2526 | struct pci_device_id iwl3945_hw_card_ids[] = { | 2537 | struct pci_device_id iwl3945_hw_card_ids[] = { |
2527 | {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4222)}, | 2538 | {IWL_PCI_DEVICE(0x4222, 0x1005, iwl3945_bg_cfg)}, |
2528 | {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4227)}, | 2539 | {IWL_PCI_DEVICE(0x4222, 0x1034, iwl3945_bg_cfg)}, |
2540 | {IWL_PCI_DEVICE(0x4222, 0x1044, iwl3945_bg_cfg)}, | ||
2541 | {IWL_PCI_DEVICE(0x4227, 0x1014, iwl3945_bg_cfg)}, | ||
2542 | {IWL_PCI_DEVICE(0x4222, PCI_ANY_ID, iwl3945_abg_cfg)}, | ||
2543 | {IWL_PCI_DEVICE(0x4227, PCI_ANY_ID, iwl3945_abg_cfg)}, | ||
2529 | {0} | 2544 | {0} |
2530 | }; | 2545 | }; |
2531 | 2546 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h index 1701e0b9b877..fa89da2db3e1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h | |||
@@ -682,6 +682,7 @@ struct iwl3945_priv { | |||
682 | struct ieee80211_hw *hw; | 682 | struct ieee80211_hw *hw; |
683 | struct ieee80211_channel *ieee_channels; | 683 | struct ieee80211_channel *ieee_channels; |
684 | struct ieee80211_rate *ieee_rates; | 684 | struct ieee80211_rate *ieee_rates; |
685 | struct iwl_3945_cfg *cfg; /* device configuration */ | ||
685 | 686 | ||
686 | /* temporary frame storage list */ | 687 | /* temporary frame storage list */ |
687 | struct list_head free_frames; | 688 | struct list_head free_frames; |
@@ -820,7 +821,6 @@ struct iwl3945_priv { | |||
820 | int is_open; | 821 | int is_open; |
821 | 822 | ||
822 | u8 mac80211_registered; | 823 | u8 mac80211_registered; |
823 | int is_abg; | ||
824 | 824 | ||
825 | u32 notif_missed_beacons; | 825 | u32 notif_missed_beacons; |
826 | 826 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 2da153331a7d..8cf1b9ce4dab 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/etherdevice.h> | 38 | #include <linux/etherdevice.h> |
39 | #include <asm/unaligned.h> | 39 | #include <asm/unaligned.h> |
40 | 40 | ||
41 | #include "iwl-core.h" | ||
41 | #include "iwl-4965.h" | 42 | #include "iwl-4965.h" |
42 | #include "iwl-helpers.h" | 43 | #include "iwl-helpers.h" |
43 | 44 | ||
@@ -4820,9 +4821,14 @@ void iwl4965_hw_cancel_deferred_work(struct iwl4965_priv *priv) | |||
4820 | cancel_delayed_work(&priv->init_alive_start); | 4821 | cancel_delayed_work(&priv->init_alive_start); |
4821 | } | 4822 | } |
4822 | 4823 | ||
4824 | static struct iwl_cfg iwl4965_agn_cfg = { | ||
4825 | .name = "4965AGN", | ||
4826 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
4827 | }; | ||
4828 | |||
4823 | struct pci_device_id iwl4965_hw_card_ids[] = { | 4829 | struct pci_device_id iwl4965_hw_card_ids[] = { |
4824 | {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4229)}, | 4830 | {IWL_PCI_DEVICE(0x4229, PCI_ANY_ID, iwl4965_agn_cfg)}, |
4825 | {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4230)}, | 4831 | {IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)}, |
4826 | {0} | 4832 | {0} |
4827 | }; | 4833 | }; |
4828 | 4834 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h index a782c454e0dd..0bfd1b475897 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965.h | |||
@@ -967,6 +967,7 @@ struct iwl4965_priv { | |||
967 | struct ieee80211_hw *hw; | 967 | struct ieee80211_hw *hw; |
968 | struct ieee80211_channel *ieee_channels; | 968 | struct ieee80211_channel *ieee_channels; |
969 | struct ieee80211_rate *ieee_rates; | 969 | struct ieee80211_rate *ieee_rates; |
970 | struct iwl_cfg *cfg; | ||
970 | 971 | ||
971 | /* temporary frame storage list */ | 972 | /* temporary frame storage list */ |
972 | struct list_head free_frames; | 973 | struct list_head free_frames; |
@@ -1126,7 +1127,6 @@ struct iwl4965_priv { | |||
1126 | int is_open; | 1127 | int is_open; |
1127 | 1128 | ||
1128 | u8 mac80211_registered; | 1129 | u8 mac80211_registered; |
1129 | int is_abg; | ||
1130 | 1130 | ||
1131 | u32 notif_missed_beacons; | 1131 | u32 notif_missed_beacons; |
1132 | 1132 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h new file mode 100644 index 000000000000..e6449af590c2 --- /dev/null +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * This file is provided under a dual BSD/GPLv2 license. When using or | ||
4 | * redistributing this file, you may do so under either license. | ||
5 | * | ||
6 | * GPL LICENSE SUMMARY | ||
7 | * | ||
8 | * Copyright(c) 2008 Intel Corporation. All rights reserved. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of version 2 of the GNU General Public License as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, | ||
22 | * USA | ||
23 | * | ||
24 | * The full GNU General Public License is included in this distribution | ||
25 | * in the file called LICENSE.GPL. | ||
26 | * | ||
27 | * Contact Information: | ||
28 | * Tomas Winkler <tomas.winkler@intel.com> | ||
29 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
30 | * | ||
31 | * BSD LICENSE | ||
32 | * | ||
33 | * Copyright(c) 2005 - 2008 Intel Corporation. All rights reserved. | ||
34 | * All rights reserved. | ||
35 | * | ||
36 | * Redistribution and use in source and binary forms, with or without | ||
37 | * modification, are permitted provided that the following conditions | ||
38 | * are met: | ||
39 | * | ||
40 | * * Redistributions of source code must retain the above copyright | ||
41 | * notice, this list of conditions and the following disclaimer. | ||
42 | * * Redistributions in binary form must reproduce the above copyright | ||
43 | * notice, this list of conditions and the following disclaimer in | ||
44 | * the documentation and/or other materials provided with the | ||
45 | * distribution. | ||
46 | * * Neither the name Intel Corporation nor the names of its | ||
47 | * contributors may be used to endorse or promote products derived | ||
48 | * from this software without specific prior written permission. | ||
49 | * | ||
50 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
51 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
52 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
53 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
54 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
56 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
57 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
58 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
59 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
61 | *****************************************************************************/ | ||
62 | |||
63 | #ifndef __iwl_core_h__ | ||
64 | #define __iwl_core_h__ | ||
65 | |||
66 | #define IWL_PCI_DEVICE(dev, subdev, cfg) \ | ||
67 | .vendor = PCI_VENDOR_ID_INTEL, .device = (dev), \ | ||
68 | .subvendor = PCI_ANY_ID, .subdevice = (subdev), \ | ||
69 | .driver_data = (kernel_ulong_t)&(cfg) | ||
70 | |||
71 | #define IWL_SKU_G 0x1 | ||
72 | #define IWL_SKU_A 0x2 | ||
73 | #define IWL_SKU_N 0x8 | ||
74 | |||
75 | struct iwl_cfg { | ||
76 | const char *name; | ||
77 | const char *fw_name; | ||
78 | unsigned int sku; | ||
79 | }; | ||
80 | |||
81 | #endif /* __iwl_core_h__ */ | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index cc71bdc80359..0cdc7f84b5af 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -46,6 +46,7 @@ | |||
46 | 46 | ||
47 | #include <asm/div64.h> | 47 | #include <asm/div64.h> |
48 | 48 | ||
49 | #include "iwl-3945-core.h" | ||
49 | #include "iwl-3945.h" | 50 | #include "iwl-3945.h" |
50 | #include "iwl-helpers.h" | 51 | #include "iwl-helpers.h" |
51 | 52 | ||
@@ -5267,12 +5268,13 @@ static int iwl3945_init_geos(struct iwl3945_priv *priv) | |||
5267 | geo_ch->flags); | 5268 | geo_ch->flags); |
5268 | } | 5269 | } |
5269 | 5270 | ||
5270 | if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) && priv->is_abg) { | 5271 | if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) && |
5272 | priv->cfg->sku & IWL_SKU_A) { | ||
5271 | printk(KERN_INFO DRV_NAME | 5273 | printk(KERN_INFO DRV_NAME |
5272 | ": Incorrectly detected BG card as ABG. Please send " | 5274 | ": Incorrectly detected BG card as ABG. Please send " |
5273 | "your PCI ID 0x%04X:0x%04X to maintainer.\n", | 5275 | "your PCI ID 0x%04X:0x%04X to maintainer.\n", |
5274 | priv->pci_dev->device, priv->pci_dev->subsystem_device); | 5276 | priv->pci_dev->device, priv->pci_dev->subsystem_device); |
5275 | priv->is_abg = 0; | 5277 | priv->cfg->sku &= ~IWL_SKU_A; |
5276 | } | 5278 | } |
5277 | 5279 | ||
5278 | printk(KERN_INFO DRV_NAME | 5280 | printk(KERN_INFO DRV_NAME |
@@ -8067,9 +8069,9 @@ static struct ieee80211_ops iwl3945_hw_ops = { | |||
8067 | static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 8069 | static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
8068 | { | 8070 | { |
8069 | int err = 0; | 8071 | int err = 0; |
8070 | u32 pci_id; | ||
8071 | struct iwl3945_priv *priv; | 8072 | struct iwl3945_priv *priv; |
8072 | struct ieee80211_hw *hw; | 8073 | struct ieee80211_hw *hw; |
8074 | struct iwl_3945_cfg *cfg = (struct iwl_3945_cfg *)(ent->driver_data); | ||
8073 | int i; | 8075 | int i; |
8074 | DECLARE_MAC_BUF(mac); | 8076 | DECLARE_MAC_BUF(mac); |
8075 | 8077 | ||
@@ -8105,6 +8107,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8105 | priv->hw = hw; | 8107 | priv->hw = hw; |
8106 | 8108 | ||
8107 | priv->pci_dev = pdev; | 8109 | priv->pci_dev = pdev; |
8110 | priv->cfg = cfg; | ||
8108 | 8111 | ||
8109 | /* Select antenna (may be helpful if only one antenna is connected) */ | 8112 | /* Select antenna (may be helpful if only one antenna is connected) */ |
8110 | priv->antenna = (enum iwl3945_antenna)iwl3945_param_antenna; | 8113 | priv->antenna = (enum iwl3945_antenna)iwl3945_param_antenna; |
@@ -8194,32 +8197,8 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8194 | 8197 | ||
8195 | priv->iw_mode = IEEE80211_IF_TYPE_STA; | 8198 | priv->iw_mode = IEEE80211_IF_TYPE_STA; |
8196 | 8199 | ||
8197 | pci_id = | ||
8198 | (priv->pci_dev->device << 16) | priv->pci_dev->subsystem_device; | ||
8199 | |||
8200 | switch (pci_id) { | ||
8201 | case 0x42221005: /* 0x4222 0x8086 0x1005 is BG SKU */ | ||
8202 | case 0x42221034: /* 0x4222 0x8086 0x1034 is BG SKU */ | ||
8203 | case 0x42271014: /* 0x4227 0x8086 0x1014 is BG SKU */ | ||
8204 | case 0x42221044: /* 0x4222 0x8086 0x1044 is BG SKU */ | ||
8205 | priv->is_abg = 0; | ||
8206 | break; | ||
8207 | |||
8208 | /* | ||
8209 | * Rest are assumed ABG SKU -- if this is not the | ||
8210 | * case then the card will get the wrong 'Detected' | ||
8211 | * line in the kernel log however the code that | ||
8212 | * initializes the GEO table will detect no A-band | ||
8213 | * channels and remove the is_abg mask. | ||
8214 | */ | ||
8215 | default: | ||
8216 | priv->is_abg = 1; | ||
8217 | break; | ||
8218 | } | ||
8219 | |||
8220 | printk(KERN_INFO DRV_NAME | 8200 | printk(KERN_INFO DRV_NAME |
8221 | ": Detected Intel PRO/Wireless 3945%sBG Network Connection\n", | 8201 | ": Detected Intel Wireless WiFi Link %s\n", priv->cfg->name); |
8222 | priv->is_abg ? "A" : ""); | ||
8223 | 8202 | ||
8224 | /* Device-specific setup */ | 8203 | /* Device-specific setup */ |
8225 | if (iwl3945_hw_set_hw_setting(priv)) { | 8204 | if (iwl3945_hw_set_hw_setting(priv)) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 0c60f594dfe7..af97e0bdf483 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -45,6 +45,7 @@ | |||
45 | 45 | ||
46 | #include <asm/div64.h> | 46 | #include <asm/div64.h> |
47 | 47 | ||
48 | #include "iwl-core.h" | ||
48 | #include "iwl-4965.h" | 49 | #include "iwl-4965.h" |
49 | #include "iwl-helpers.h" | 50 | #include "iwl-helpers.h" |
50 | 51 | ||
@@ -5663,12 +5664,13 @@ static int iwl4965_init_geos(struct iwl4965_priv *priv) | |||
5663 | geo_ch->flags); | 5664 | geo_ch->flags); |
5664 | } | 5665 | } |
5665 | 5666 | ||
5666 | if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) && priv->is_abg) { | 5667 | if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) && |
5668 | priv->cfg->sku & IWL_SKU_A) { | ||
5667 | printk(KERN_INFO DRV_NAME | 5669 | printk(KERN_INFO DRV_NAME |
5668 | ": Incorrectly detected BG card as ABG. Please send " | 5670 | ": Incorrectly detected BG card as ABG. Please send " |
5669 | "your PCI ID 0x%04X:0x%04X to maintainer.\n", | 5671 | "your PCI ID 0x%04X:0x%04X to maintainer.\n", |
5670 | priv->pci_dev->device, priv->pci_dev->subsystem_device); | 5672 | priv->pci_dev->device, priv->pci_dev->subsystem_device); |
5671 | priv->is_abg = 0; | 5673 | priv->cfg->sku &= ~IWL_SKU_A; |
5672 | } | 5674 | } |
5673 | 5675 | ||
5674 | printk(KERN_INFO DRV_NAME | 5676 | printk(KERN_INFO DRV_NAME |
@@ -8613,6 +8615,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8613 | int err = 0; | 8615 | int err = 0; |
8614 | struct iwl4965_priv *priv; | 8616 | struct iwl4965_priv *priv; |
8615 | struct ieee80211_hw *hw; | 8617 | struct ieee80211_hw *hw; |
8618 | struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); | ||
8616 | int i; | 8619 | int i; |
8617 | DECLARE_MAC_BUF(mac); | 8620 | DECLARE_MAC_BUF(mac); |
8618 | 8621 | ||
@@ -8646,6 +8649,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8646 | IWL_DEBUG_INFO("*** LOAD DRIVER ***\n"); | 8649 | IWL_DEBUG_INFO("*** LOAD DRIVER ***\n"); |
8647 | priv = hw->priv; | 8650 | priv = hw->priv; |
8648 | priv->hw = hw; | 8651 | priv->hw = hw; |
8652 | priv->cfg = cfg; | ||
8649 | 8653 | ||
8650 | priv->pci_dev = pdev; | 8654 | priv->pci_dev = pdev; |
8651 | priv->antenna = (enum iwl4965_antenna)iwl4965_param_antenna; | 8655 | priv->antenna = (enum iwl4965_antenna)iwl4965_param_antenna; |
@@ -8748,8 +8752,9 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8748 | /* Choose which receivers/antennas to use */ | 8752 | /* Choose which receivers/antennas to use */ |
8749 | iwl4965_set_rxon_chain(priv); | 8753 | iwl4965_set_rxon_chain(priv); |
8750 | 8754 | ||
8755 | |||
8751 | printk(KERN_INFO DRV_NAME | 8756 | printk(KERN_INFO DRV_NAME |
8752 | ": Detected Intel Wireless WiFi Link 4965AGN\n"); | 8757 | ": Detected Intel Wireless WiFi Link %s\n", priv->cfg->name); |
8753 | 8758 | ||
8754 | /* Device-specific setup */ | 8759 | /* Device-specific setup */ |
8755 | if (iwl4965_hw_set_hw_setting(priv)) { | 8760 | if (iwl4965_hw_set_hw_setting(priv)) { |