Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279310
b: refs/heads/master
c: 5f947ad
h: refs/heads/master
v: v3
  • Loading branch information
Franky Lin authored and John W. Linville committed Dec 19, 2011
1 parent 50ee19e commit e1d7174
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 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: ed683c986f6fff6b9d9fe2adc8b11e0b0be7c085
refs/heads/master: 5f947ad942a72e7f96942da97d719dd62037dbc2
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 @@ -703,7 +703,7 @@ extern int brcmf_netdev_wait_pend8021x(struct net_device *ndev);
extern s32 brcmf_exec_dcmd(struct net_device *dev, u32 cmd, void *arg, u32 len);

/* Indication from bus module regarding removal/absence of dongle */
extern void brcmf_detach(struct brcmf_pub *drvr);
extern void brcmf_detach(struct device *dev);

/* Indication from bus module to change flow-control state */
extern void brcmf_txflowcontrol(struct brcmf_pub *drvr, int ifidx, bool on);
Expand Down
33 changes: 17 additions & 16 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ struct brcmf_pub *brcmf_attach(struct brcmf_sdio *bus, uint bus_hdrlen,

fail:
if (drvr)
brcmf_detach(drvr);
brcmf_detach(dev);

return NULL;
}
Expand Down Expand Up @@ -1093,29 +1093,30 @@ static void brcmf_bus_detach(struct brcmf_pub *drvr)
}
}

void brcmf_detach(struct brcmf_pub *drvr)
void brcmf_detach(struct device *dev)
{
int i;
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
struct brcmf_pub *drvr = bus_if->drvr;

brcmf_dbg(TRACE, "Enter\n");

if (drvr) {
int i;

/* make sure primary interface removed last */
for (i = BRCMF_MAX_IFS-1; i > -1; i--)
if (drvr->iflist[i])
brcmf_del_if(drvr, i);
/* make sure primary interface removed last */
for (i = BRCMF_MAX_IFS-1; i > -1; i--)
if (drvr->iflist[i])
brcmf_del_if(drvr, i);

cancel_work_sync(&drvr->setmacaddr_work);
cancel_work_sync(&drvr->multicast_work);
cancel_work_sync(&drvr->setmacaddr_work);
cancel_work_sync(&drvr->multicast_work);

brcmf_bus_detach(drvr);
brcmf_bus_detach(drvr);

if (drvr->prot)
brcmf_proto_detach(drvr);
if (drvr->prot)
brcmf_proto_detach(drvr);

drvr->bus_if->drvr = NULL;
kfree(drvr);
}
bus_if->drvr = NULL;
kfree(drvr);
}

static int brcmf_get_pend_8021x_cnt(struct brcmf_pub *drvr)
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -3865,8 +3865,8 @@ static void brcmf_sdbrcm_release(struct brcmf_sdio *bus)
/* De-register interrupt handler */
brcmf_sdcard_intr_dereg(bus->sdiodev);

if (bus->drvr) {
brcmf_detach(bus->drvr);
if (bus->sdiodev->bus_if->drvr) {
brcmf_detach(bus->sdiodev->dev);
brcmf_sdbrcm_release_dongle(bus);
bus->drvr = NULL;
}
Expand Down

0 comments on commit e1d7174

Please sign in to comment.