Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265816
b: refs/heads/master
c: bdf91cf
h: refs/heads/master
v: v3
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Aug 22, 2011
1 parent 52d2b02 commit b5d36ba
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: 742246f8bc16c3a1a556c68ca2fabca162d14c24
refs/heads/master: bdf91cfae66dd76a093c75cac8f6ada12fd21b83
11 changes: 9 additions & 2 deletions trunk/drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,8 +834,15 @@ static void wl12xx_fw_status(struct wl1271 *wl,
wl->tx_pkts_freed[i] = status->tx_released_pkts[i];
}

freed_blocks = le32_to_cpu(status->total_released_blks) -
wl->tx_blocks_freed;
/* prevent wrap-around in total blocks counter */
if (likely(wl->tx_blocks_freed <=
le32_to_cpu(status->total_released_blks)))
freed_blocks = le32_to_cpu(status->total_released_blks) -
wl->tx_blocks_freed;
else
freed_blocks = 0x100000000LL - wl->tx_blocks_freed +
le32_to_cpu(status->total_released_blks);

wl->tx_blocks_freed = le32_to_cpu(status->total_released_blks);

wl->tx_allocated_blocks -= freed_blocks;
Expand Down

0 comments on commit b5d36ba

Please sign in to comment.