diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index f214510e3bee..27fbcbf82afb 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | |||
@@ -3750,15 +3750,6 @@ static void brcmf_sdio_dataworker(struct work_struct *work) | |||
3750 | } | 3750 | } |
3751 | } | 3751 | } |
3752 | 3752 | ||
3753 | static void brcmf_sdio_release_malloc(struct brcmf_sdio *bus) | ||
3754 | { | ||
3755 | brcmf_dbg(TRACE, "Enter\n"); | ||
3756 | |||
3757 | kfree(bus->rxbuf); | ||
3758 | bus->rxctl = bus->rxbuf = NULL; | ||
3759 | bus->rxlen = 0; | ||
3760 | } | ||
3761 | |||
3762 | static bool brcmf_sdio_probe_malloc(struct brcmf_sdio *bus) | 3753 | static bool brcmf_sdio_probe_malloc(struct brcmf_sdio *bus) |
3763 | { | 3754 | { |
3764 | brcmf_dbg(TRACE, "Enter\n"); | 3755 | brcmf_dbg(TRACE, "Enter\n"); |
@@ -3955,24 +3946,6 @@ brcmf_sdio_watchdog(unsigned long data) | |||
3955 | } | 3946 | } |
3956 | } | 3947 | } |
3957 | 3948 | ||
3958 | static void brcmf_sdio_release_dongle(struct brcmf_sdio *bus) | ||
3959 | { | ||
3960 | brcmf_dbg(TRACE, "Enter\n"); | ||
3961 | |||
3962 | if (bus->ci) { | ||
3963 | sdio_claim_host(bus->sdiodev->func[1]); | ||
3964 | brcmf_sdio_clkctl(bus, CLK_AVAIL, false); | ||
3965 | brcmf_sdio_clkctl(bus, CLK_NONE, false); | ||
3966 | sdio_release_host(bus->sdiodev->func[1]); | ||
3967 | brcmf_sdio_chip_detach(&bus->ci); | ||
3968 | if (bus->vars && bus->varsz) | ||
3969 | kfree(bus->vars); | ||
3970 | bus->vars = NULL; | ||
3971 | } | ||
3972 | |||
3973 | brcmf_dbg(TRACE, "Disconnected\n"); | ||
3974 | } | ||
3975 | |||
3976 | static struct brcmf_bus_ops brcmf_sdio_bus_ops = { | 3949 | static struct brcmf_bus_ops brcmf_sdio_bus_ops = { |
3977 | .stop = brcmf_sdio_bus_stop, | 3950 | .stop = brcmf_sdio_bus_stop, |
3978 | .preinit = brcmf_sdio_bus_preinit, | 3951 | .preinit = brcmf_sdio_bus_preinit, |
@@ -4108,12 +4081,20 @@ void brcmf_sdio_remove(struct brcmf_sdio *bus) | |||
4108 | 4081 | ||
4109 | if (bus->sdiodev->bus_if->drvr) { | 4082 | if (bus->sdiodev->bus_if->drvr) { |
4110 | brcmf_detach(bus->sdiodev->dev); | 4083 | brcmf_detach(bus->sdiodev->dev); |
4111 | brcmf_sdio_release_dongle(bus); | 4084 | } |
4085 | |||
4086 | if (bus->ci) { | ||
4087 | sdio_claim_host(bus->sdiodev->func[1]); | ||
4088 | brcmf_sdio_clkctl(bus, CLK_AVAIL, false); | ||
4089 | brcmf_sdio_clkctl(bus, CLK_NONE, false); | ||
4090 | sdio_release_host(bus->sdiodev->func[1]); | ||
4091 | brcmf_sdio_chip_detach(&bus->ci); | ||
4112 | } | 4092 | } |
4113 | 4093 | ||
4114 | brcmu_pkt_buf_free_skb(bus->txglom_sgpad); | 4094 | brcmu_pkt_buf_free_skb(bus->txglom_sgpad); |
4115 | brcmf_sdio_release_malloc(bus); | 4095 | kfree(bus->rxbuf); |
4116 | kfree(bus->hdrbuf); | 4096 | kfree(bus->hdrbuf); |
4097 | kfree(bus->vars); | ||
4117 | kfree(bus); | 4098 | kfree(bus); |
4118 | } | 4099 | } |
4119 | 4100 | ||