]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.4/brcmfmac-fix-incorrect-event-channel-deduction.patch
drop drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch from 4.4.y and 4.9.y
[thirdparty/kernel/stable-queue.git] / queue-4.4 / brcmfmac-fix-incorrect-event-channel-deduction.patch
CommitLineData
dd5b528c
GKH
1From foo@baz Tue 04 Jun 2019 04:46:27 PM CEST
2From: Gavin Li <git@thegavinli.com>
3Date: Tue, 17 Jan 2017 15:24:05 -0800
4Subject: brcmfmac: fix incorrect event channel deduction
5
6From: Gavin Li <git@thegavinli.com>
7
8commit 8e290cecdd0178f3d4cf7d463c51dc7e462843b4 upstream.
9
10brcmf_sdio_fromevntchan() was being called on the the data frame
11rather than the software header, causing some frames to be
12mischaracterized as on the event channel rather than the data channel.
13
14This fixes a major performance regression (due to dropped packets). With
15this patch the download speed jumped from 1Mbit/s back up to 40MBit/s due
16to the sheer amount of packets being incorrectly processed.
17
18Fixes: c56caa9db8ab ("brcmfmac: screening firmware event packet")
19Signed-off-by: Gavin Li <git@thegavinli.com>
20Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
21[kvalo@codeaurora.org: improve commit logs based on email discussion]
22Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
23[bwh: Backported to 4.4: adjust filename]
24Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26---
27 drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30--- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
31+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
32@@ -1765,7 +1765,7 @@ static u8 brcmf_sdio_rxglom(struct brcmf
33 pfirst->len, pfirst->next,
34 pfirst->prev);
35 skb_unlink(pfirst, &bus->glom);
36- if (brcmf_sdio_fromevntchan(pfirst->data))
37+ if (brcmf_sdio_fromevntchan(&dptr[SDPCM_HWHDR_LEN]))
38 brcmf_rx_event(bus->sdiodev->dev, pfirst);
39 else
40 brcmf_rx_frame(bus->sdiodev->dev, pfirst,