Skip to content

Commit

Permalink
brcmfmac: change parameter in brcmf_add_if() function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arend van Spriel authored and John W. Linville committed Nov 16, 2012
1 parent 7c38e69 commit 699b5e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/brcm80211/brcmfmac/dhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_ */
6 changes: 2 additions & 4 deletions drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,13 +694,11 @@ int brcmf_net_attach(struct brcmf_if *ifp)
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);

Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/brcm80211/brcmfmac/fweh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 699b5e5

Please sign in to comment.