aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c35
1 files changed, 7 insertions, 28 deletions
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 = {
8067static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 8069static 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)) {