brcmfmac: Dont sleep when ctrl frames to transmit.
authorHante Meuleman <meuleman@broadcom.com>
Fri, 6 Feb 2015 17:36:46 +0000 (18:36 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 26 Feb 2015 13:14:21 +0000 (15:14 +0200)
The SDIO watchdog will put the device in sleep mode when there is
no activity for some time and nothing to do anymore. This check
is incomplete and should also check if there is a control frame
to transmit.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/brcm80211/brcmfmac/sdio.c

index 01b34a37dde0fe452f07f502eeb499eca34f11fc..257ee70feb5b143d8e9b5acbf59115f917bc072f 100644 (file)
@@ -1027,6 +1027,7 @@ brcmf_sdio_bus_sleep(struct brcmf_sdio *bus, bool sleep, bool pendok)
                        /* Don't sleep if something is pending */
                        if (atomic_read(&bus->intstatus) ||
                            atomic_read(&bus->ipend) > 0 ||
+                           bus->ctrl_frame_stat ||
                            (!atomic_read(&bus->fcstate) &&
                            brcmu_pktq_mlen(&bus->txq, ~bus->flowcontrol) &&
                            data_ok(bus))) {