brcm80211: fmac: remove brcmf_usb_attrib structure
authorArend van Spriel <arend@broadcom.com>
Fri, 2 Mar 2012 21:55:46 +0000 (22:55 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 5 Mar 2012 20:53:53 +0000 (15:53 -0500)
Several fields in this structure are only written once or not used
at all. Remaining two fields have been moved and brcmf_usb_attrib
definition has been removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Kan Yan <kanyan@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/usb.c
drivers/net/wireless/brcm80211/brcmfmac/usb.h

index 8616961a066ebdb298f2545b80fde7ae3cc02a5a..0418a40fce8d848a9915276294af501dd68c73f3 100644 (file)
@@ -897,8 +897,8 @@ brcmf_usb_dlneeded(struct brcmf_usbdev_info *devinfo)
                        sizeof(struct bootrom_id_le));
                return false;
        } else {
-               devinfo->bus_pub.attrib.devid = chipid;
-               devinfo->bus_pub.attrib.chiprev = chiprev;
+               devinfo->bus_pub.devid = chipid;
+               devinfo->bus_pub.chiprev = chiprev;
        }
        return true;
 }
@@ -1064,7 +1064,7 @@ static int brcmf_usb_dlstart(struct brcmf_usbdev_info *devinfo, u8 *fw, int len)
        if (devinfo == NULL)
                return -EINVAL;
 
-       if (devinfo->bus_pub.attrib.devid == 0xDEAD)
+       if (devinfo->bus_pub.devid == 0xDEAD)
                return -EINVAL;
 
        err = brcmf_usb_dl_writeimage(devinfo, fw, len);
@@ -1085,7 +1085,7 @@ static int brcmf_usb_dlrun(struct brcmf_usbdev_info *devinfo)
        if (!devinfo)
                return -EINVAL;
 
-       if (devinfo->bus_pub.attrib.devid == 0xDEAD)
+       if (devinfo->bus_pub.devid == 0xDEAD)
                return -EINVAL;
 
        /* Check we are runnable */
@@ -1124,18 +1124,19 @@ static bool brcmf_usb_chip_support(int chipid, int chiprev)
 static int
 brcmf_usb_fw_download(struct brcmf_usbdev_info *devinfo)
 {
-       struct brcmf_usb_attrib *attr;
+       int devid, chiprev;
        int err;
 
        brcmf_dbg(TRACE, "enter\n");
        if (devinfo == NULL)
                return -ENODEV;
 
-       attr = &devinfo->bus_pub.attrib;
+       devid = devinfo->bus_pub.devid;
+       chiprev = devinfo->bus_pub.chiprev;
 
-       if (!brcmf_usb_chip_support(attr->devid, attr->chiprev)) {
+       if (!brcmf_usb_chip_support(devid, chiprev)) {
                brcmf_dbg(ERROR, "unsupported chip %d rev %d\n",
-                         attr->devid, attr->chiprev);
+                         devid, chiprev);
                return -EINVAL;
        }
 
index b31da7b83ff7a2a65c1772c058b80f50ca0dc58c..3377d63e6c8b6f222c5f7eeb5156aa0e7658546b 100644 (file)
@@ -50,19 +50,6 @@ struct brcmf_stats {
 
 };
 
-struct brcmf_usb_attrib {
-       int bustype;
-       int vid;
-       int pid;
-       int devid;
-       int chiprev; /* chip revsion number */
-       int mtu;
-       int nchan; /* Data Channels */
-       int has_2nd_bulk_in_ep;
-};
-
-struct brcmf_usbdev_info;
-
 struct brcmf_usbdev {
        struct brcmf_bus *bus;
        struct brcmf_usbdev_info *devinfo;
@@ -70,7 +57,8 @@ struct brcmf_usbdev {
        struct brcmf_stats stats;
        int ntxq, nrxq, rxsize;
        u32 bus_mtu;
-       struct brcmf_usb_attrib attrib;
+       int devid;
+       int chiprev; /* chip revsion number */
 };
 
 /* IO Request Block (IRB) */