diff options
author | Ido Yariv <ido@wizery.com> | 2011-03-31 10:07:00 +0200 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-04-19 16:49:20 +0300 |
commit | d2f4d47d84f8c665ab9babb2cc84d2e7872a96e1 (patch) | |
tree | 34a2d0fe6f399c7c3c7bf1e2e85fb0adf5aa378f /drivers/net/wireless/wl12xx/wl12xx.h | |
parent | 990f5de7384f9e5922e4c7c7572cbf4f29a9441e (diff) |
wl12xx: Simplify TX blocks accounting
The total number of TX memory blocks may change when the dynamic memory
option is enabled. The current implementation only tracks the available
memory blocks, which over-complicates TX blocks accounting.
By tracking the number of allocated blocks, calculation of the number of
available blocks becomes simpler and cleaner. It simply equals the total
number of TX memory blocks minus the allocated ones.
Also, remove some unnecessary castings and use union member accesses
instead.
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl12xx.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index 1b430d2aec4..9ccbcfdd080 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h @@ -418,10 +418,8 @@ struct wl1271 { /* Accounting for allocated / available TX blocks on HW */ u32 tx_blocks_freed[NUM_TX_QUEUES]; u32 tx_blocks_available; + u32 tx_allocated_blocks; u32 tx_results_count; - /* Indicates how many memory blocks should be moved to the RX pool */ - int tx_total_diff; - u32 tx_new_total; /* Transmitted TX packets counter for chipset interface */ u32 tx_packets_count; |