Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352625
b: refs/heads/master
c: 28c14f4
h: refs/heads/master
i:
  352623: e8d4d53
v: v3
  • Loading branch information
Hante Meuleman authored and John W. Linville committed Feb 8, 2013
1 parent a774a3b commit 34f5fae
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7ab6acd025cdca23485227d85d80cb747a71d1fc
refs/heads/master: 28c14f4a3b4639032c7cd35a7d8bdd2898b5fbf2
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ extern int brcmf_proto_cdc_set_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd,
extern int brcmf_proto_hdrpull(struct brcmf_pub *drvr, u8 *ifidx,
struct sk_buff *rxp);

extern int brcmf_net_attach(struct brcmf_if *ifp);
extern int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked);
extern struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bssidx,
s32 ifidx, char *name, u8 *mac_addr);
extern void brcmf_del_if(struct brcmf_pub *drvr, s32 bssidx);
Expand Down
11 changes: 8 additions & 3 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,11 @@ static const struct net_device_ops brcmf_netdev_ops_pri = {
.ndo_set_rx_mode = brcmf_netdev_set_multicast_list
};

int brcmf_net_attach(struct brcmf_if *ifp)
int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked)
{
struct brcmf_pub *drvr = ifp->drvr;
struct net_device *ndev;
s32 err;

brcmf_dbg(TRACE, "Enter, idx=%d mac=%pM\n", ifp->bssidx,
ifp->mac_addr);
Expand All @@ -623,7 +624,11 @@ int brcmf_net_attach(struct brcmf_if *ifp)
INIT_WORK(&ifp->setmacaddr_work, _brcmf_set_mac_address);
INIT_WORK(&ifp->multicast_work, _brcmf_set_multicast_list);

if (register_netdev(ndev) != 0) {
if (rtnl_locked)
err = register_netdevice(ndev);
else
err = register_netdev(ndev);
if (err != 0) {
brcmf_err("couldn't register the net device\n");
goto fail;
}
Expand Down Expand Up @@ -876,7 +881,7 @@ int brcmf_bus_start(struct device *dev)
if (ret < 0)
goto fail;

ret = brcmf_net_attach(ifp);
ret = brcmf_net_attach(ifp, false);
fail:
if (ret < 0) {
brcmf_err("failed: %d\n", ret);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/brcm80211/brcmfmac/fweh.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static void brcmf_fweh_handle_if_event(struct brcmf_pub *drvr,
return;

if (!drvr->fweh.evt_handler[BRCMF_E_IF])
err = brcmf_net_attach(ifp);
err = brcmf_net_attach(ifp, false);
}

err = brcmf_fweh_call_event_handler(ifp, emsg->event_code, emsg, data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4668,7 +4668,7 @@ static s32 brcmf_notify_vif_event(struct brcmf_if *ifp,

/* waiting process need to set the netdev name */
wait_for_completion(&event->vif_complete);
return brcmf_net_attach(ifp);
return brcmf_net_attach(ifp, true);

case BRCMF_E_IF_DEL:
ifp->vif = NULL;
Expand Down

0 comments on commit 34f5fae

Please sign in to comment.