Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341929
b: refs/heads/master
c: 57fe504
h: refs/heads/master
i:
  341927: 7dd5bdf
v: v3
  • Loading branch information
Piotr Haber authored and John W. Linville committed Nov 30, 2012
1 parent 53cda53 commit 7147a31
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94d9902dc06a28a1b25cf56a7cdc057608bdf48b
refs/heads/master: 57fe504817ccec9b6ac23e973d2925343bf1e3b6
30 changes: 17 additions & 13 deletions trunk/drivers/net/wireless/brcm80211/brcmsmac/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1044,11 +1044,17 @@ brcms_b_txstatus(struct brcms_hardware *wlc_hw, bool bound, bool *fatal)
s1 = bcma_read32(core, D11REGOFFS(frmtxstatus));
while (!(*fatal)
&& (s1 & TXS_V)) {
/* !give others some time to run! */
if (n >= max_tx_num) {
morepending = true;
break;
}

if (s1 == 0xffffffff) {
brcms_err(core, "wl%d: %s: dead chip\n", wlc_hw->unit,
__func__);
return morepending;
*fatal = true;
return false;
}
s2 = bcma_read32(core, D11REGOFFS(frmtxstatus2));

Expand All @@ -1060,17 +1066,12 @@ brcms_b_txstatus(struct brcms_hardware *wlc_hw, bool bound, bool *fatal)

*fatal = brcms_c_dotxstatus(wlc_hw->wlc, txs);

/* !give others some time to run! */
if (++n >= max_tx_num)
break;
s1 = bcma_read32(core, D11REGOFFS(frmtxstatus));
n++;
}

if (*fatal)
return 0;

if (n >= max_tx_num)
morepending = true;
return false;

return morepending;
}
Expand Down Expand Up @@ -7631,16 +7632,19 @@ brcms_b_recv(struct brcms_hardware *wlc_hw, uint fifo, bool bound)

uint n = 0;
uint bound_limit = bound ? RXBND : -1;
bool morepending;

skb_queue_head_init(&recv_frames);

/* gather received frames */
while (dma_rx(wlc_hw->di[fifo], &recv_frames)) {

do {
/* !give others some time to run! */
if (++n >= bound_limit)
if (n >= bound_limit)
break;
}

morepending = dma_rx(wlc_hw->di[fifo], &recv_frames);
n++;
} while (morepending);

/* post more rbufs */
dma_rxfill(wlc_hw->di[fifo]);
Expand Down Expand Up @@ -7670,7 +7674,7 @@ brcms_b_recv(struct brcms_hardware *wlc_hw, uint fifo, bool bound)
brcms_c_recv(wlc_hw->wlc, p);
}

return n >= bound_limit;
return morepending;
}

/* second-level interrupt processing
Expand Down

0 comments on commit 7147a31

Please sign in to comment.