brcm80211: fmac: change function bus_start parameter
authorFranky Lin <frankyl@broadcom.com>
Sat, 17 Dec 2011 02:36:55 +0000 (18:36 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 19 Dec 2011 19:40:43 +0000 (14:40 -0500)
Change parameter to device pointer for bus layer interface function
brcmf_bus_start. This is part of the fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd.h
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c

index a8e94eb8a7e713881c3beb5c26f31a9638ac0191..0f1384dd62be7e0dcc6fb7e08700e4024e2c06b3 100644 (file)
@@ -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,\
                         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_enable(struct brcmf_pub *drvr, char *arg,
index 3d0177ab250194a6328a9e658e39c6e5bd3e680c..0440471c083ba6d7094e9dd9c2272ea07627a3c6 100644 (file)
@@ -800,7 +800,7 @@ static int brcmf_netdev_open(struct net_device *ndev)
 
        if (ifp->idx == 0) {    /* do it only for primary eth0 */
                /* try to bring up bus */
-               ret = brcmf_bus_start(drvr);
+               ret = brcmf_bus_start(drvr->dev);
                if (ret != 0) {
                        brcmf_dbg(ERROR, "failed with code %d\n", ret);
                        return -1;
@@ -960,23 +960,25 @@ fail:
        return NULL;
 }
 
-int brcmf_bus_start(struct brcmf_pub *drvr)
+int brcmf_bus_start(struct device *dev)
 {
        int ret = -1;
        /* Room for "event_msgs" + '\0' + bitvec */
        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");
 
        /* Bring up the bus */
-       ret = brcmf_sdbrcm_bus_init(drvr->dev);
+       ret = brcmf_sdbrcm_bus_init(dev);
        if (ret != 0) {
                brcmf_dbg(ERROR, "brcmf_sdbrcm_bus_init failed %d\n", ret);
                return ret;
        }
 
        /* 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");
                return -ENODEV;
        }
index 4e3e4ec8158b414960ffc190936d38037427488b..a9616271ed1bf4a0afa192306e07fc4dcb2ddd5f 100644 (file)
@@ -3971,7 +3971,7 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev)
        brcmf_dbg(INFO, "completed!!\n");
 
        /* 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 == -ENOLINK) {
                        brcmf_dbg(ERROR, "dongle is not responding\n");