]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/adm8211.c
p54: fix EEPROM structure endianness
[linux-2.6] / drivers / net / wireless / adm8211.c
index e4fdadb52503bb0ae82bf479ba3ca12b3c38f132..79796186713e5af59aaa6d172d7f67301ecc03f5 100644 (file)
@@ -104,7 +104,7 @@ static int adm8211_read_eeprom(struct ieee80211_hw *dev)
        if (!priv->eeprom)
                return -ENOMEM;
 
-       eeprom_93cx6_multiread(&eeprom, 0, (__le16 __force *)priv->eeprom, words);
+       eeprom_93cx6_multiread(&eeprom, 0, (__le16 *)priv->eeprom, words);
 
        cr49 = le16_to_cpu(priv->eeprom->cr49);
        priv->rf_type = (cr49 >> 3) & 0x7;
@@ -1312,7 +1312,8 @@ static int adm8211_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf)
        return 0;
 }
 
-static int adm8211_config_interface(struct ieee80211_hw *dev, int if_id,
+static int adm8211_config_interface(struct ieee80211_hw *dev,
+                                   struct ieee80211_vif *vif,
                                    struct ieee80211_if_conf *conf)
 {
        struct adm8211_priv *priv = dev->priv;
@@ -1555,7 +1556,7 @@ static void adm8211_stop(struct ieee80211_hw *dev)
 {
        struct adm8211_priv *priv = dev->priv;
 
-       priv->mode = IEEE80211_IF_TYPE_MGMT;
+       priv->mode = IEEE80211_IF_TYPE_INVALID;
        priv->nar = 0;
        ADM8211_CSR_WRITE(NAR, 0);
        ADM8211_CSR_WRITE(IER, 0);
@@ -1867,9 +1868,9 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
                goto err_iounmap;
        }
 
-       *(u32 *)perm_addr = le32_to_cpu((__force __le32)ADM8211_CSR_READ(PAR0));
-       *(u16 *)&perm_addr[4] =
-               le16_to_cpu((__force __le16)ADM8211_CSR_READ(PAR1) & 0xFFFF);
+       *(__le32 *)perm_addr = cpu_to_le32(ADM8211_CSR_READ(PAR0));
+       *(__le16 *)&perm_addr[4] =
+               cpu_to_le16(ADM8211_CSR_READ(PAR1) & 0xFFFF);
 
        if (!is_valid_ether_addr(perm_addr)) {
                printk(KERN_WARNING "%s (adm8211): Invalid hwaddr in EEPROM!\n",
@@ -1898,7 +1899,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
        priv->tx_power = 0x40;
        priv->lpf_cutoff = 0xFF;
        priv->lnags_threshold = 0xFF;
-       priv->mode = IEEE80211_IF_TYPE_MGMT;
+       priv->mode = IEEE80211_IF_TYPE_INVALID;
 
        /* Power-on issue. EEPROM won't read correctly without */
        if (pdev->revision >= ADM8211_REV_BA) {
@@ -1993,7 +1994,7 @@ static int adm8211_suspend(struct pci_dev *pdev, pm_message_t state)
        struct ieee80211_hw *dev = pci_get_drvdata(pdev);
        struct adm8211_priv *priv = dev->priv;
 
-       if (priv->mode != IEEE80211_IF_TYPE_MGMT) {
+       if (priv->mode != IEEE80211_IF_TYPE_INVALID) {
                ieee80211_stop_queues(dev);
                adm8211_stop(dev);
        }
@@ -2011,7 +2012,7 @@ static int adm8211_resume(struct pci_dev *pdev)
        pci_set_power_state(pdev, PCI_D0);
        pci_restore_state(pdev);
 
-       if (priv->mode != IEEE80211_IF_TYPE_MGMT) {
+       if (priv->mode != IEEE80211_IF_TYPE_INVALID) {
                adm8211_start(dev);
                ieee80211_start_queues(dev);
        }