Commit ed683c98 authored by Franky Lin's avatar Franky Lin Committed by John W. Linville

brcm80211: fmac: change function bus_start parameter

Change parameter to device pointer for bus layer interface function
brcmf_bus_start. This is part of the fullmac bus interface
refactoring.
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarAlwin Beukers <alwin@broadcom.com>
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 55a63bcc
...@@ -752,7 +752,7 @@ extern void brcmf_del_if(struct brcmf_pub *drvr, int ifidx); ...@@ -752,7 +752,7 @@ extern void brcmf_del_if(struct brcmf_pub *drvr, int ifidx);
extern int brcmf_sendpkt(struct brcmf_pub *drvr, int ifidx,\ extern int brcmf_sendpkt(struct brcmf_pub *drvr, int ifidx,\
struct sk_buff *pkt); struct sk_buff *pkt);
extern int brcmf_bus_start(struct brcmf_pub *drvr); extern int brcmf_bus_start(struct device *dev);
extern void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg); extern void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg);
extern void brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg, extern void brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg,
......
...@@ -800,7 +800,7 @@ static int brcmf_netdev_open(struct net_device *ndev) ...@@ -800,7 +800,7 @@ static int brcmf_netdev_open(struct net_device *ndev)
if (ifp->idx == 0) { /* do it only for primary eth0 */ if (ifp->idx == 0) { /* do it only for primary eth0 */
/* try to bring up bus */ /* try to bring up bus */
ret = brcmf_bus_start(drvr); ret = brcmf_bus_start(drvr->dev);
if (ret != 0) { if (ret != 0) {
brcmf_dbg(ERROR, "failed with code %d\n", ret); brcmf_dbg(ERROR, "failed with code %d\n", ret);
return -1; return -1;
...@@ -960,23 +960,25 @@ struct brcmf_pub *brcmf_attach(struct brcmf_sdio *bus, uint bus_hdrlen, ...@@ -960,23 +960,25 @@ struct brcmf_pub *brcmf_attach(struct brcmf_sdio *bus, uint bus_hdrlen,
return NULL; return NULL;
} }
int brcmf_bus_start(struct brcmf_pub *drvr) int brcmf_bus_start(struct device *dev)
{ {
int ret = -1; int ret = -1;
/* Room for "event_msgs" + '\0' + bitvec */ /* Room for "event_msgs" + '\0' + bitvec */
char iovbuf[BRCMF_EVENTING_MASK_LEN + 12]; char iovbuf[BRCMF_EVENTING_MASK_LEN + 12];
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
struct brcmf_pub *drvr = bus_if->drvr;
brcmf_dbg(TRACE, "\n"); brcmf_dbg(TRACE, "\n");
/* Bring up the bus */ /* Bring up the bus */
ret = brcmf_sdbrcm_bus_init(drvr->dev); ret = brcmf_sdbrcm_bus_init(dev);
if (ret != 0) { if (ret != 0) {
brcmf_dbg(ERROR, "brcmf_sdbrcm_bus_init failed %d\n", ret); brcmf_dbg(ERROR, "brcmf_sdbrcm_bus_init failed %d\n", ret);
return ret; return ret;
} }
/* If bus is not ready, can't come up */ /* If bus is not ready, can't come up */
if (drvr->bus_if->state != BRCMF_BUS_DATA) { if (bus_if->state != BRCMF_BUS_DATA) {
brcmf_dbg(ERROR, "failed bus is not ready\n"); brcmf_dbg(ERROR, "failed bus is not ready\n");
return -ENODEV; return -ENODEV;
} }
......
...@@ -3971,7 +3971,7 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev) ...@@ -3971,7 +3971,7 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev)
brcmf_dbg(INFO, "completed!!\n"); brcmf_dbg(INFO, "completed!!\n");
/* if firmware path present try to download and bring up bus */ /* if firmware path present try to download and bring up bus */
ret = brcmf_bus_start(bus->drvr); ret = brcmf_bus_start(bus->sdiodev->dev);
if (ret != 0) { if (ret != 0) {
if (ret == -ENOLINK) { if (ret == -ENOLINK) {
brcmf_dbg(ERROR, "dongle is not responding\n"); brcmf_dbg(ERROR, "dongle is not responding\n");
......
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