Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352317
b: refs/heads/master
c: 795ce73
h: refs/heads/master
i:
  352315: 0a51518
v: v3
  • Loading branch information
Vladimir Kondratiev authored and John W. Linville committed Jan 30, 2013
1 parent c71a21a commit 50bf8d1
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 47e19af9a791d8862cdffb754cc2347b6389d487
refs/heads/master: 795ce734380b729e076131528e485e98a580d3e8
11 changes: 9 additions & 2 deletions trunk/drivers/net/wireless/ath/wil6210/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,7 @@ netdev_tx_t wil_start_xmit(struct sk_buff *skb, struct net_device *ndev)
}
switch (rc) {
case 0:
ndev->stats.tx_packets++;
ndev->stats.tx_bytes += skb->len;
/* statistics will be updated on the tx_complete */
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
case -ENOMEM:
Expand All @@ -777,6 +776,7 @@ netdev_tx_t wil_start_xmit(struct sk_buff *skb, struct net_device *ndev)
*/
void wil_tx_complete(struct wil6210_priv *wil, int ringid)
{
struct net_device *ndev = wil_to_ndev(wil);
struct device *dev = wil_to_dev(wil);
struct vring *vring = &wil->vring_tx[ringid];

Expand Down Expand Up @@ -804,6 +804,13 @@ void wil_tx_complete(struct wil6210_priv *wil, int ringid)
pa = d->dma.addr_low | ((u64)d->dma.addr_high << 32);
skb = vring->ctx[vring->swtail];
if (skb) {
if (d->dma.error == 0) {
ndev->stats.tx_packets++;
ndev->stats.tx_bytes += skb->len;
} else {
ndev->stats.tx_errors++;
}

dma_unmap_single(dev, pa, d->dma.length, DMA_TO_DEVICE);
dev_kfree_skb_any(skb);
vring->ctx[vring->swtail] = NULL;
Expand Down

0 comments on commit 50bf8d1

Please sign in to comment.