aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2012-03-02 16:55:46 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-05 15:53:53 -0500
commitac94f196a5fed4915b82d71b9b111867d78df992 (patch)
tree36cb79611aed5261a58f892476289764665cc5b6 /drivers/net/wireless
parent3bc7e29c984ffda0b6133c2b34233023ff36f370 (diff)
brcm80211: fmac: remove brcmf_usb_attrib structure
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/usb.c17
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/usb.h16
2 files changed, 11 insertions, 22 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
index 8616961a066e..0418a40fce8d 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
@@ -897,8 +897,8 @@ brcmf_usb_dlneeded(struct brcmf_usbdev_info *devinfo)
897 sizeof(struct bootrom_id_le)); 897 sizeof(struct bootrom_id_le));
898 return false; 898 return false;
899 } else { 899 } else {
900 devinfo->bus_pub.attrib.devid = chipid; 900 devinfo->bus_pub.devid = chipid;
901 devinfo->bus_pub.attrib.chiprev = chiprev; 901 devinfo->bus_pub.chiprev = chiprev;
902 } 902 }
903 return true; 903 return true;
904} 904}
@@ -1064,7 +1064,7 @@ static int brcmf_usb_dlstart(struct brcmf_usbdev_info *devinfo, u8 *fw, int len)
1064 if (devinfo == NULL) 1064 if (devinfo == NULL)
1065 return -EINVAL; 1065 return -EINVAL;
1066 1066
1067 if (devinfo->bus_pub.attrib.devid == 0xDEAD) 1067 if (devinfo->bus_pub.devid == 0xDEAD)
1068 return -EINVAL; 1068 return -EINVAL;
1069 1069
1070 err = brcmf_usb_dl_writeimage(devinfo, fw, len); 1070 err = brcmf_usb_dl_writeimage(devinfo, fw, len);
@@ -1085,7 +1085,7 @@ static int brcmf_usb_dlrun(struct brcmf_usbdev_info *devinfo)
1085 if (!devinfo) 1085 if (!devinfo)
1086 return -EINVAL; 1086 return -EINVAL;
1087 1087
1088 if (devinfo->bus_pub.attrib.devid == 0xDEAD) 1088 if (devinfo->bus_pub.devid == 0xDEAD)
1089 return -EINVAL; 1089 return -EINVAL;
1090 1090
1091 /* Check we are runnable */ 1091 /* Check we are runnable */
@@ -1124,18 +1124,19 @@ static bool brcmf_usb_chip_support(int chipid, int chiprev)
1124static int 1124static int
1125brcmf_usb_fw_download(struct brcmf_usbdev_info *devinfo) 1125brcmf_usb_fw_download(struct brcmf_usbdev_info *devinfo)
1126{ 1126{
1127 struct brcmf_usb_attrib *attr; 1127 int devid, chiprev;
1128 int err; 1128 int err;
1129 1129
1130 brcmf_dbg(TRACE, "enter\n"); 1130 brcmf_dbg(TRACE, "enter\n");
1131 if (devinfo == NULL) 1131 if (devinfo == NULL)
1132 return -ENODEV; 1132 return -ENODEV;
1133 1133
1134 attr = &devinfo->bus_pub.attrib; 1134 devid = devinfo->bus_pub.devid;
1135 chiprev = devinfo->bus_pub.chiprev;
1135 1136
1136 if (!brcmf_usb_chip_support(attr->devid, attr->chiprev)) { 1137 if (!brcmf_usb_chip_support(devid, chiprev)) {
1137 brcmf_dbg(ERROR, "unsupported chip %d rev %d\n", 1138 brcmf_dbg(ERROR, "unsupported chip %d rev %d\n",
1138 attr->devid, attr->chiprev); 1139 devid, chiprev);
1139 return -EINVAL; 1140 return -EINVAL;
1140 } 1141 }
1141 1142
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.h b/drivers/net/wireless/brcm80211/brcmfmac/usb.h
index b31da7b83ff7..3377d63e6c8b 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.h
@@ -50,19 +50,6 @@ struct brcmf_stats {
50 50
51}; 51};
52 52
53struct brcmf_usb_attrib {
54 int bustype;
55 int vid;
56 int pid;
57 int devid;
58 int chiprev; /* chip revsion number */
59 int mtu;
60 int nchan; /* Data Channels */
61 int has_2nd_bulk_in_ep;
62};
63
64struct brcmf_usbdev_info;
65
66struct brcmf_usbdev { 53struct brcmf_usbdev {
67 struct brcmf_bus *bus; 54 struct brcmf_bus *bus;
68 struct brcmf_usbdev_info *devinfo; 55 struct brcmf_usbdev_info *devinfo;
@@ -70,7 +57,8 @@ struct brcmf_usbdev {
70 struct brcmf_stats stats; 57 struct brcmf_stats stats;
71 int ntxq, nrxq, rxsize; 58 int ntxq, nrxq, rxsize;
72 u32 bus_mtu; 59 u32 bus_mtu;
73 struct brcmf_usb_attrib attrib; 60 int devid;
61 int chiprev; /* chip revsion number */
74}; 62};
75 63
76/* IO Request Block (IRB) */ 64/* IO Request Block (IRB) */