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 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 11 |
1 files changed, 8 insertions, 3 deletions
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)) { |