Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341514
b: refs/heads/master
c: 05f8a61
h: refs/heads/master
v: v3
  • Loading branch information
Seth Forshee authored and John W. Linville committed Nov 20, 2012
1 parent aa0df4d commit ad86ff3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 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: 5c8067caeecbabf8c60dbb73dd517d2a2aad16a5
refs/heads/master: 05f8a6160491ea46636370fbacb4061c341d5d94
15 changes: 13 additions & 2 deletions trunk/drivers/net/wireless/brcm80211/brcmsmac/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,17 @@ bool dma_rxreset(struct dma_pub *pub)
return status == D64_RS0_RS_DISABLED;
}

/* Update count of available tx descriptors based on current DMA state */
static void dma_update_txavail(struct dma_info *di)
{
/*
* Available space is number of descriptors less the number of
* active descriptors and the number of queued AMPDU frames.
*/
di->dma.txavail = di->ntxd - ntxdactive(di, di->txin, di->txout) - 1;
}


/*
* !! tx entry routine
* WARNING: call must check the return value for error.
Expand Down Expand Up @@ -1325,7 +1336,7 @@ int dma_txfast(struct dma_pub *pub, struct sk_buff *p, bool commit)
di->xmtptrbase + I2B(txout, struct dma64desc));

/* tx flow control */
di->dma.txavail = di->ntxd - ntxdactive(di, di->txin, di->txout) - 1;
dma_update_txavail(di);

return 0;

Expand Down Expand Up @@ -1412,7 +1423,7 @@ struct sk_buff *dma_getnexttxp(struct dma_pub *pub, enum txd_range range)
di->txin = i;

/* tx flow control */
di->dma.txavail = di->ntxd - ntxdactive(di, di->txin, di->txout) - 1;
dma_update_txavail(di);

return txp;

Expand Down

0 comments on commit ad86ff3

Please sign in to comment.