diff options
author | Arend van Spriel <arend@broadcom.com> | 2015-03-11 11:11:33 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-03-13 10:10:37 -0400 |
commit | cf45932a74d4d07c2d05c4e871f2ea5bc0e5891c (patch) | |
tree | 50c0b8160f4812ffa01ab924939bdbf2c13b887c /drivers/net/wireless/brcm80211/brcmfmac | |
parent | 9819a9024eabee7bb793bbbb3f3833dfaf222dc9 (diff) |
brcmfmac: fix watchdog timer regression
The watchdog timer is used to put the device in a low-power mode when
it is idle for some time. This timer is stopped during that mode and
should be restarted upon activity. This has been broken by commit
d4150fced0365 ("brcmfmac: Simplify watchdog sleep."). This patch
restores the behaviour as it was before that commit.
Reported-by: Pontus Fuchs <pontusf@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@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>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c index 5202e766535d..17a7212cfd70 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c | |||
@@ -972,7 +972,6 @@ static int brcmf_sdio_clkctl(struct brcmf_sdio *bus, uint target, bool pendok) | |||
972 | brcmf_sdio_sdclk(bus, true); | 972 | brcmf_sdio_sdclk(bus, true); |
973 | /* Now request HT Avail on the backplane */ | 973 | /* Now request HT Avail on the backplane */ |
974 | brcmf_sdio_htclk(bus, true, pendok); | 974 | brcmf_sdio_htclk(bus, true, pendok); |
975 | brcmf_sdio_wd_timer(bus, BRCMF_WD_POLL_MS); | ||
976 | break; | 975 | break; |
977 | 976 | ||
978 | case CLK_SDONLY: | 977 | case CLK_SDONLY: |
@@ -984,7 +983,6 @@ static int brcmf_sdio_clkctl(struct brcmf_sdio *bus, uint target, bool pendok) | |||
984 | else | 983 | else |
985 | brcmf_err("request for %d -> %d\n", | 984 | brcmf_err("request for %d -> %d\n", |
986 | bus->clkstate, target); | 985 | bus->clkstate, target); |
987 | brcmf_sdio_wd_timer(bus, BRCMF_WD_POLL_MS); | ||
988 | break; | 986 | break; |
989 | 987 | ||
990 | case CLK_NONE: | 988 | case CLK_NONE: |
@@ -993,7 +991,6 @@ static int brcmf_sdio_clkctl(struct brcmf_sdio *bus, uint target, bool pendok) | |||
993 | brcmf_sdio_htclk(bus, false, false); | 991 | brcmf_sdio_htclk(bus, false, false); |
994 | /* Now remove the SD clock */ | 992 | /* Now remove the SD clock */ |
995 | brcmf_sdio_sdclk(bus, false); | 993 | brcmf_sdio_sdclk(bus, false); |
996 | brcmf_sdio_wd_timer(bus, 0); | ||
997 | break; | 994 | break; |
998 | } | 995 | } |
999 | #ifdef DEBUG | 996 | #ifdef DEBUG |
@@ -1048,6 +1045,7 @@ end: | |||
1048 | brcmf_sdio_clkctl(bus, CLK_NONE, pendok); | 1045 | brcmf_sdio_clkctl(bus, CLK_NONE, pendok); |
1049 | } else { | 1046 | } else { |
1050 | brcmf_sdio_clkctl(bus, CLK_AVAIL, pendok); | 1047 | brcmf_sdio_clkctl(bus, CLK_AVAIL, pendok); |
1048 | brcmf_sdio_wd_timer(bus, BRCMF_WD_POLL_MS); | ||
1051 | } | 1049 | } |
1052 | bus->sleeping = sleep; | 1050 | bus->sleeping = sleep; |
1053 | brcmf_dbg(SDIO, "new state %s\n", | 1051 | brcmf_dbg(SDIO, "new state %s\n", |
@@ -4242,6 +4240,7 @@ void brcmf_sdio_remove(struct brcmf_sdio *bus) | |||
4242 | if (bus->ci) { | 4240 | if (bus->ci) { |
4243 | if (bus->sdiodev->state != BRCMF_SDIOD_NOMEDIUM) { | 4241 | if (bus->sdiodev->state != BRCMF_SDIOD_NOMEDIUM) { |
4244 | sdio_claim_host(bus->sdiodev->func[1]); | 4242 | sdio_claim_host(bus->sdiodev->func[1]); |
4243 | brcmf_sdio_wd_timer(bus, 0); | ||
4245 | brcmf_sdio_clkctl(bus, CLK_AVAIL, false); | 4244 | brcmf_sdio_clkctl(bus, CLK_AVAIL, false); |
4246 | /* Leave the device in state where it is | 4245 | /* Leave the device in state where it is |
4247 | * 'passive'. This is done by resetting all | 4246 | * 'passive'. This is done by resetting all |