rt2x00: Move interface type assignments to generic code.
authorGertjan van Wingerde <gwingerde@gmail.com>
Sun, 8 Nov 2009 11:30:14 +0000 (12:30 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 11 Nov 2009 20:23:55 +0000 (15:23 -0500)
Make sure all drivers can benefit of the assignment of the interface
type of an adapter, instead of keeping it for rt2800 only.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800pci.c
drivers/net/wireless/rt2x00/rt2800usb.c
drivers/net/wireless/rt2x00/rt2x00pci.c
drivers/net/wireless/rt2x00/rt2x00soc.c
drivers/net/wireless/rt2x00/rt2x00usb.c

index 3c5b875cdee801b9757aef42fcf66d258606cbb0..bff870799f64c14638ccfb14343be9a169d197c2 100644 (file)
@@ -1465,8 +1465,6 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev)
 {
        int retval;
 
-       rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);
-
        rt2x00dev->priv = (void *)&rt2800pci_rt2800_ops;
 
        /*
index ce2e893856c1826cdef15a5ee6faf495f15f680b..3168ad4437a474eb3daaec264964b3af185d5cdb 100644 (file)
@@ -1074,8 +1074,6 @@ static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev)
 {
        int retval;
 
-       rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_USB);
-
        rt2x00dev->priv = (void *)&rt2800usb_rt2800_ops;
 
        /*
index cdd5154bd4c05faa5065d3ff286ad6cfa93bd642..ece70d72880ff7ae009d1220ddf83371cd1e5518 100644 (file)
@@ -310,6 +310,8 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
        rt2x00dev->irq = pci_dev->irq;
        rt2x00dev->name = pci_name(pci_dev);
 
+       rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);
+
        /*
         * Determine RT chipset by reading PCI header.
         */
index 539568c48953c4f7a0ae05004afafa0ee31d52c4..4abcfa6bf1b27abcc5d094faf57556c893ad8ed5 100644 (file)
@@ -93,6 +93,11 @@ int rt2x00soc_probe(struct platform_device *pdev,
        rt2x00dev->irq = platform_get_irq(pdev, 0);
        rt2x00dev->name = pdev->dev.driver->name;
 
+       /*
+        * SoC devices mimic PCI behavior.
+        */
+       rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);
+
        rt2x00_set_chip_rt(rt2x00dev, chipset);
 
        retval = rt2x00soc_alloc_reg(rt2x00dev);
index c9cbdaa1073f0df47fed20ec84c6205370efb813..aa6c31d612a7a4d2b1f057f11dac7b9fc6ad0284 100644 (file)
@@ -653,6 +653,8 @@ int rt2x00usb_probe(struct usb_interface *usb_intf,
        rt2x00dev->ops = ops;
        rt2x00dev->hw = hw;
 
+       rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_USB);
+
        retval = rt2x00usb_alloc_reg(rt2x00dev);
        if (retval)
                goto exit_free_device;