brcmfmac: Small cleanup of redundant code.
In time some of the code got redundant, without being noticed. This patch does not change any functionality, just removes redundant code. 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>
This commit is contained in:
parent
6f6c195b95
commit
b6a8cf2cd8
|
@ -770,8 +770,6 @@ brcmf_sdio_kso_control(struct brcmf_sdio *bus, bool on)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PKT_AVAILABLE() (intstatus & I_HMB_FRAME_IND)
|
|
||||||
|
|
||||||
#define HOSTINTMASK (I_HMB_SW_MASK | I_CHIPACTIVE)
|
#define HOSTINTMASK (I_HMB_SW_MASK | I_CHIPACTIVE)
|
||||||
|
|
||||||
/* Turn backplane clock on or off */
|
/* Turn backplane clock on or off */
|
||||||
|
@ -870,7 +868,6 @@ static int brcmf_sdio_htclk(struct brcmf_sdio *bus, bool on, bool pendok)
|
||||||
}
|
}
|
||||||
#endif /* defined (DEBUG) */
|
#endif /* defined (DEBUG) */
|
||||||
|
|
||||||
bus->activity = true;
|
|
||||||
} else {
|
} else {
|
||||||
clkreq = 0;
|
clkreq = 0;
|
||||||
|
|
||||||
|
@ -2341,7 +2338,7 @@ static uint brcmf_sdio_sendfromq(struct brcmf_sdio *bus, uint maxframes)
|
||||||
cnt += i;
|
cnt += i;
|
||||||
|
|
||||||
/* In poll mode, need to check for other events */
|
/* In poll mode, need to check for other events */
|
||||||
if (!bus->intr && cnt) {
|
if (!bus->intr) {
|
||||||
/* Check device status, signal pending interrupt */
|
/* Check device status, signal pending interrupt */
|
||||||
sdio_claim_host(bus->sdiodev->func[1]);
|
sdio_claim_host(bus->sdiodev->func[1]);
|
||||||
ret = r_sdreg32(bus, &intstatus,
|
ret = r_sdreg32(bus, &intstatus,
|
||||||
|
@ -2485,9 +2482,8 @@ static void brcmf_sdio_dpc(struct brcmf_sdio *bus)
|
||||||
{
|
{
|
||||||
u32 newstatus = 0;
|
u32 newstatus = 0;
|
||||||
unsigned long intstatus;
|
unsigned long intstatus;
|
||||||
uint rxlimit = bus->rxbound; /* Rx frames to read before resched */
|
|
||||||
uint txlimit = bus->txbound; /* Tx frames to send before resched */
|
uint txlimit = bus->txbound; /* Tx frames to send before resched */
|
||||||
uint framecnt = 0; /* Temporary counter of tx/rx frames */
|
uint framecnt; /* Temporary counter of tx/rx frames */
|
||||||
int err = 0, n;
|
int err = 0, n;
|
||||||
|
|
||||||
brcmf_dbg(TRACE, "Enter\n");
|
brcmf_dbg(TRACE, "Enter\n");
|
||||||
|
@ -2585,11 +2581,10 @@ static void brcmf_sdio_dpc(struct brcmf_sdio *bus)
|
||||||
intstatus &= ~I_HMB_FRAME_IND;
|
intstatus &= ~I_HMB_FRAME_IND;
|
||||||
|
|
||||||
/* On frame indication, read available frames */
|
/* On frame indication, read available frames */
|
||||||
if (PKT_AVAILABLE() && bus->clkstate == CLK_AVAIL) {
|
if ((intstatus & I_HMB_FRAME_IND) && (bus->clkstate == CLK_AVAIL)) {
|
||||||
framecnt = brcmf_sdio_readframes(bus, rxlimit);
|
brcmf_sdio_readframes(bus, bus->rxbound);
|
||||||
if (!bus->rxpending)
|
if (!bus->rxpending)
|
||||||
intstatus &= ~I_HMB_FRAME_IND;
|
intstatus &= ~I_HMB_FRAME_IND;
|
||||||
rxlimit -= min(framecnt, rxlimit);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Keep still-pending events for next scheduling */
|
/* Keep still-pending events for next scheduling */
|
||||||
|
@ -2647,8 +2642,7 @@ static void brcmf_sdio_dpc(struct brcmf_sdio *bus)
|
||||||
&& data_ok(bus)) {
|
&& data_ok(bus)) {
|
||||||
framecnt = bus->rxpending ? min(txlimit, bus->txminmax) :
|
framecnt = bus->rxpending ? min(txlimit, bus->txminmax) :
|
||||||
txlimit;
|
txlimit;
|
||||||
framecnt = brcmf_sdio_sendfromq(bus, framecnt);
|
brcmf_sdio_sendfromq(bus, framecnt);
|
||||||
txlimit -= framecnt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!brcmf_bus_ready(bus->sdiodev->bus_if) || (err != 0)) {
|
if (!brcmf_bus_ready(bus->sdiodev->bus_if) || (err != 0)) {
|
||||||
|
@ -2658,7 +2652,7 @@ static void brcmf_sdio_dpc(struct brcmf_sdio *bus)
|
||||||
atomic_read(&bus->ipend) > 0 ||
|
atomic_read(&bus->ipend) > 0 ||
|
||||||
(!atomic_read(&bus->fcstate) &&
|
(!atomic_read(&bus->fcstate) &&
|
||||||
brcmu_pktq_mlen(&bus->txq, ~bus->flowcontrol) &&
|
brcmu_pktq_mlen(&bus->txq, ~bus->flowcontrol) &&
|
||||||
data_ok(bus)) || PKT_AVAILABLE()) {
|
data_ok(bus))) {
|
||||||
atomic_inc(&bus->dpc_tskcnt);
|
atomic_inc(&bus->dpc_tskcnt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue