aa97762830ed2d916a8a8059adbc2b7a57b3ba21
[librecmc/librecmc.git] / package / kernel / mac80211 / patches / 361-0003-brcmfmac-fix-incorrect-event-channel-deduction.patch
1 From 8e290cecdd0178f3d4cf7d463c51dc7e462843b4 Mon Sep 17 00:00:00 2001
2 From: Gavin Li <git@thegavinli.com>
3 Date: Tue, 17 Jan 2017 15:24:05 -0800
4 Subject: [PATCH] brcmfmac: fix incorrect event channel deduction
5
6 brcmf_sdio_fromevntchan() was being called on the the data frame
7 rather than the software header, causing some frames to be
8 mischaracterized as on the event channel rather than the data channel.
9
10 This fixes a major performance regression (due to dropped packets). With
11 this patch the download speed jumped from 1Mbit/s back up to 40MBit/s due
12 to the sheer amount of packets being incorrectly processed.
13
14 Fixes: c56caa9db8ab ("brcmfmac: screening firmware event packet")
15 Signed-off-by: Gavin Li <git@thegavinli.com>
16 Cc: <stable@vger.kernel.org> # 4.7+
17 Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
18 [kvalo@codeaurora.org: improve commit logs based on email discussion]
19 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
20 ---
21  drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +-
22  1 file changed, 1 insertion(+), 1 deletion(-)
23
24 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
25 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
26 @@ -1661,7 +1661,7 @@ static u8 brcmf_sdio_rxglom(struct brcmf
27                                            pfirst->len, pfirst->next,
28                                            pfirst->prev);
29                         skb_unlink(pfirst, &bus->glom);
30 -                       if (brcmf_sdio_fromevntchan(pfirst->data))
31 +                       if (brcmf_sdio_fromevntchan(&dptr[SDPCM_HWHDR_LEN]))
32                                 brcmf_rx_event(bus->sdiodev->dev, pfirst);
33                         else
34                                 brcmf_rx_frame(bus->sdiodev->dev, pfirst,