mac80211: update brcmfmac including missing boardrev workaround
[openwrt.git] / package / kernel / mac80211 / patches / 325-brcmfmac-sdio-Increase-the-default-timeouts-a-bit.patch
1 From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2 Date: Mon, 25 Jan 2016 11:47:29 +0100
3 Subject: [PATCH] brcmfmac: sdio: Increase the default timeouts a bit
4
5 On a Radxa Rock2 board with a Ampak AP6335 (Broadcom 4339 core) it seems
6 the card responds very quickly most of the time, unfortunately during
7 initialisation it sometimes seems to take just a bit over 2 seconds to
8 respond.
9
10 This results intialization failing with message like:
11   brcmf_c_preinit_dcmds: Retreiving cur_etheraddr failed, -52
12   brcmf_bus_start: failed: -52
13   brcmf_sdio_firmware_callback: dongle is not responding
14
15 Increasing the timeout to allow for a bit more headroom allows the
16 card to initialize reliably.
17
18 A quick search online after diagnosing/fixing this showed that Google
19 has a similar patch in their ChromeOS tree, so this doesn't seem
20 specific to the board I'm using.
21
22 Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
23 Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
24 Acked-by: Arend van Spriel <arend@broadcom.com>
25 Reviewed-by: Douglas Anderson <dianders@chromium.org>
26 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
27 ---
28
29 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
30 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
31 @@ -45,8 +45,8 @@
32  #include "chip.h"
33  #include "firmware.h"
34  
35 -#define DCMD_RESP_TIMEOUT      msecs_to_jiffies(2000)
36 -#define CTL_DONE_TIMEOUT       msecs_to_jiffies(2000)
37 +#define DCMD_RESP_TIMEOUT      msecs_to_jiffies(2500)
38 +#define CTL_DONE_TIMEOUT       msecs_to_jiffies(2500)
39  
40  #ifdef DEBUG
41