diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-06-21 12:07:33 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-06-21 12:07:33 +0000 |
commit | 1909a42ad4ad297c4cee989c9e9dd5f99e37af4b (patch) | |
tree | f336d0da2c2f118185c8ffbcda4cf284b5ce2035 /package/kernel/mac80211/patches/392-brcmfmac-have-sdio-return-EIO-when-device-communicat.patch | |
parent | 167a2dc12ec879763b3f176e290523914679ea5c (diff) | |
download | upstream-1909a42ad4ad297c4cee989c9e9dd5f99e37af4b.tar.gz upstream-1909a42ad4ad297c4cee989c9e9dd5f99e37af4b.tar.bz2 upstream-1909a42ad4ad297c4cee989c9e9dd5f99e37af4b.zip |
mac80211: backport some brcmfmac patches
There are two important patches in this patchset: updating read pointer
quicker & rework of .get_station().
There are few more upstream patches that are p2p-related and weren't
backported in this commit.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 46084
Diffstat (limited to 'package/kernel/mac80211/patches/392-brcmfmac-have-sdio-return-EIO-when-device-communicat.patch')
-rw-r--r-- | package/kernel/mac80211/patches/392-brcmfmac-have-sdio-return-EIO-when-device-communicat.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/392-brcmfmac-have-sdio-return-EIO-when-device-communicat.patch b/package/kernel/mac80211/patches/392-brcmfmac-have-sdio-return-EIO-when-device-communicat.patch new file mode 100644 index 0000000000..302bc3ed15 --- /dev/null +++ b/package/kernel/mac80211/patches/392-brcmfmac-have-sdio-return-EIO-when-device-communicat.patch @@ -0,0 +1,56 @@ +From: Arend van Spriel <arend@broadcom.com> +Date: Thu, 11 Jun 2015 00:12:20 +0200 +Subject: [PATCH] brcmfmac: have sdio return -EIO when device communication + is not possible + +The bus interface functions txctl and rxctl may be used while the device +can not be accessed, eg. upon driver .remove() callback. This patch will +immediately return -EIO when this is the case which speeds up the module +unload. + +Reviewed-by: Hante Meuleman <meuleman@broadcom.com> +Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> +Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> +Signed-off-by: Arend van Spriel <arend@broadcom.com> +Signed-off-by: Kalle Valo <kvalo@codeaurora.org> +--- + +--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c +@@ -988,6 +988,7 @@ static void brcmf_sdiod_freezer_detach(s + + static int brcmf_sdiod_remove(struct brcmf_sdio_dev *sdiodev) + { ++ sdiodev->state = BRCMF_SDIOD_DOWN; + if (sdiodev->bus) { + brcmf_sdio_remove(sdiodev->bus); + sdiodev->bus = NULL; +--- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +@@ -2820,6 +2820,8 @@ static int brcmf_sdio_bus_txdata(struct + struct brcmf_sdio *bus = sdiodev->bus; + + brcmf_dbg(TRACE, "Enter: pkt: data %p len %d\n", pkt->data, pkt->len); ++ if (sdiodev->state != BRCMF_SDIOD_DATA) ++ return -EIO; + + /* Add space for the header */ + skb_push(pkt, bus->tx_hdrlen); +@@ -2948,6 +2950,8 @@ brcmf_sdio_bus_txctl(struct device *dev, + int ret; + + brcmf_dbg(TRACE, "Enter\n"); ++ if (sdiodev->state != BRCMF_SDIOD_DATA) ++ return -EIO; + + /* Send from dpc */ + bus->ctrl_frame_buf = msg; +@@ -3238,6 +3242,8 @@ brcmf_sdio_bus_rxctl(struct device *dev, + struct brcmf_sdio *bus = sdiodev->bus; + + brcmf_dbg(TRACE, "Enter\n"); ++ if (sdiodev->state != BRCMF_SDIOD_DATA) ++ return -EIO; + + /* Wait until control frame is available */ + timeleft = brcmf_sdio_dcmd_resp_wait(bus, &bus->rxlen, &pending); |