Commit 6f7d7362 authored by Franky Lin's avatar Franky Lin Committed by Greg Kroah-Hartman

staging: brcm80211: void * cleanup in fullmac

Remove improper usage of void * in dhd_linux.c and dhd_sdio.c
Reported-by: default avatarJulian Calaby <julian.calaby@gmail.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2f6b1dde
...@@ -760,8 +760,9 @@ extern int brcmf_c_host_event(struct brcmf_info *drvr_priv, int *idx, ...@@ -760,8 +760,9 @@ extern int brcmf_c_host_event(struct brcmf_info *drvr_priv, int *idx,
extern void brcmf_c_init(void); extern void brcmf_c_init(void);
extern int brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, void *handle, extern int brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx,
char *name, u8 *mac_addr, u32 flags, u8 bssidx); struct net_device *net, char *name, u8 *mac_addr,
u32 flags, u8 bssidx);
extern void brcmf_del_if(struct brcmf_info *drvr_priv, int ifidx); extern void brcmf_del_if(struct brcmf_info *drvr_priv, int ifidx);
/* Send packet to dongle via data channel */ /* Send packet to dongle via data channel */
......
...@@ -978,7 +978,7 @@ static int brcmf_netdev_ioctl_entry(struct net_device *net, struct ifreq *ifr, ...@@ -978,7 +978,7 @@ static int brcmf_netdev_ioctl_entry(struct net_device *net, struct ifreq *ifr,
return -1; return -1;
if (cmd == SIOCETHTOOL) if (cmd == SIOCETHTOOL)
return brcmf_ethtool(drvr_priv, (void *)ifr->ifr_data); return brcmf_ethtool(drvr_priv, ifr->ifr_data);
if (cmd != SIOCDEVPRIVATE) if (cmd != SIOCDEVPRIVATE)
return -EOPNOTSUPP; return -EOPNOTSUPP;
...@@ -1140,12 +1140,12 @@ static int brcmf_netdev_open(struct net_device *net) ...@@ -1140,12 +1140,12 @@ static int brcmf_netdev_open(struct net_device *net)
} }
int int
brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, void *handle, char *name, brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, struct net_device *net,
u8 *mac_addr, u32 flags, u8 bssidx) char *name, u8 *mac_addr, u32 flags, u8 bssidx)
{ {
struct brcmf_if *ifp; struct brcmf_if *ifp;
BRCMF_TRACE(("%s: idx %d, handle->%p\n", __func__, ifidx, handle)); BRCMF_TRACE(("%s: idx %d, handle->%p\n", __func__, ifidx, net));
ifp = drvr_priv->iflist[ifidx]; ifp = drvr_priv->iflist[ifidx];
if (!ifp) { if (!ifp) {
...@@ -1163,12 +1163,12 @@ brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, void *handle, char *name, ...@@ -1163,12 +1163,12 @@ brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, void *handle, char *name,
if (mac_addr != NULL) if (mac_addr != NULL)
memcpy(&ifp->mac_addr, mac_addr, ETH_ALEN); memcpy(&ifp->mac_addr, mac_addr, ETH_ALEN);
if (handle == NULL) { if (net == NULL) {
ifp->state = BRCMF_E_IF_ADD; ifp->state = BRCMF_E_IF_ADD;
ifp->idx = ifidx; ifp->idx = ifidx;
wake_up(&drvr_priv->sysioc_waitq); wake_up(&drvr_priv->sysioc_waitq);
} else } else
ifp->net = (struct net_device *)handle; ifp->net = net;
return 0; return 0;
} }
...@@ -1228,7 +1228,7 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen) ...@@ -1228,7 +1228,7 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen)
strcat(net->name, "%d"); strcat(net->name, "%d");
} }
if (brcmf_add_if(drvr_priv, 0, (void *)net, net->name, NULL, 0, 0) == if (brcmf_add_if(drvr_priv, 0, net, net->name, NULL, 0, 0) ==
BRCMF_BAD_IF) BRCMF_BAD_IF)
goto fail; goto fail;
......
...@@ -910,7 +910,7 @@ static int brcmf_sdbrcm_send_buf(struct brcmf_bus *bus, u32 addr, uint fn, ...@@ -910,7 +910,7 @@ static int brcmf_sdbrcm_send_buf(struct brcmf_bus *bus, u32 addr, uint fn,
uint flags, u8 *buf, uint nbytes, uint flags, u8 *buf, uint nbytes,
struct sk_buff *pkt); struct sk_buff *pkt);
static bool brcmf_sdbrcm_download_firmware(struct brcmf_bus *bus, void *card); static bool brcmf_sdbrcm_download_firmware(struct brcmf_bus *bus);
static int _brcmf_sdbrcm_download_firmware(struct brcmf_bus *bus); static int _brcmf_sdbrcm_download_firmware(struct brcmf_bus *bus);
static int brcmf_sdbrcm_download_code_file(struct brcmf_bus *bus); static int brcmf_sdbrcm_download_code_file(struct brcmf_bus *bus);
...@@ -3100,7 +3100,7 @@ int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr, bool enforce_mutex) ...@@ -3100,7 +3100,7 @@ int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr, bool enforce_mutex)
/* try to download image and nvram to the dongle */ /* try to download image and nvram to the dongle */
if (drvr->busstate == BRCMF_BUS_DOWN) { if (drvr->busstate == BRCMF_BUS_DOWN) {
if (!(brcmf_sdbrcm_download_firmware(bus, bus->sdiodev))) if (!(brcmf_sdbrcm_download_firmware(bus)))
return -1; return -1;
} }
...@@ -5122,7 +5122,7 @@ static bool brcmf_sdbrcm_probe_init(struct brcmf_bus *bus) ...@@ -5122,7 +5122,7 @@ static bool brcmf_sdbrcm_probe_init(struct brcmf_bus *bus)
} }
static bool static bool
brcmf_sdbrcm_download_firmware(struct brcmf_bus *bus, void *card) brcmf_sdbrcm_download_firmware(struct brcmf_bus *bus)
{ {
bool ret; bool ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment