brcmfmac: change parameter in brcmf_add_if() function
authorArend van Spriel <arend@broadcom.com>
Thu, 15 Nov 2012 02:46:08 +0000 (18:46 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 16 Nov 2012 19:28:48 +0000 (14:28 -0500)
The brcmf_add_if() function had a struct device as parameter
to accomodate the bus specific code to use this function. The
driver has been reworked so the bus specific code does not need
this function. Better replace the parameter with a more specific
driver object, ie. struct brcmf_pub.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@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/fweh.c

index 10d92b51ee46066566bef9122b04ac1db4c7a856..a41e1c69f8c57ef50bb669c8c0a2858bbd1a0499 100644 (file)
@@ -586,8 +586,8 @@ extern int brcmf_c_host_event(struct brcmf_pub *drvr, int *idx,
                              void **data_ptr);
 
 extern int brcmf_net_attach(struct brcmf_if *ifp);
-extern struct brcmf_if *brcmf_add_if(struct device *dev, int ifidx, s32 bssidx,
-                                    char *name, u8 *mac_addr);
+extern struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx,
+                                    s32 bssidx, char *name, u8 *mac_addr);
 extern void brcmf_del_if(struct brcmf_pub *drvr, int ifidx);
 
 #endif                         /* _BRCMF_H_ */
index 60907decca9d347c0120c6334d6635abbba30742..f10203410b39cfc09e1a8350b1b36f2f2aa19707 100644 (file)
@@ -694,13 +694,11 @@ fail:
        return -EBADE;
 }
 
-struct brcmf_if *brcmf_add_if(struct device *dev, int ifidx, s32 bssidx,
+struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx, s32 bssidx,
                              char *name, u8 *mac_addr)
 {
        struct brcmf_if *ifp;
        struct net_device *ndev;
-       struct brcmf_bus *bus_if = dev_get_drvdata(dev);
-       struct brcmf_pub *drvr = bus_if->drvr;
 
        brcmf_dbg(TRACE, "idx %d\n", ifidx);
 
@@ -835,7 +833,7 @@ int brcmf_bus_start(struct device *dev)
        }
 
        /* add primary networking interface */
-       ifp = brcmf_add_if(dev, 0, 0, "wlan%d", NULL);
+       ifp = brcmf_add_if(drvr, 0, 0, "wlan%d", NULL);
        if (IS_ERR(ifp))
                return PTR_ERR(ifp);
 
index c091c125dd56655123cea7c3efe14c4425ea78d7..825be26b0c65d65816ff7f7a61734608213d52e7 100644 (file)
@@ -264,7 +264,7 @@ static int brcmf_fweh_process_if_event(struct brcmf_pub *drvr,
        case BRCMF_E_IF_ADD:
                brcmf_dbg(EVENT, "adding %s (%pM, %pM)\n", event->ifname,
                          event->addr, item->ifaddr);
-               ifp = brcmf_add_if(drvr->dev, ifevent->ifidx, ifevent->bssidx,
+               ifp = brcmf_add_if(drvr, ifevent->ifidx, ifevent->bssidx,
                                   event->ifname, item->ifaddr);
                if (!IS_ERR(ifp)) {
                        *ifpp = ifp;