brcmfmac: Minimize SDIO dpc scheduling.
authorHante Meuleman <meuleman@broadcom.com>
Tue, 25 Feb 2014 19:30:31 +0000 (20:30 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 28 Feb 2014 19:33:21 +0000 (14:33 -0500)
SDIO dpc scheduling is done (repeated) when counter is set. This
counter gets decreased when dpc is finished. It is more efficient
to set counter to 0 before the dpc is actullay run. This will
minimize the frequency with which dpc is executed.

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: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c

index ce997324370b01de1f05d7825060e4f7f0277d55..cc0f1ad8b42c2e3e1f73a65a900272d55596f848 100644 (file)
@@ -3758,8 +3758,8 @@ static void brcmf_sdio_dataworker(struct work_struct *work)
                                              datawork);
 
        while (atomic_read(&bus->dpc_tskcnt)) {
+               atomic_set(&bus->dpc_tskcnt, 0);
                brcmf_sdio_dpc(bus);
-               atomic_dec(&bus->dpc_tskcnt);
        }
 }