wl12xx: Simplify TX blocks accounting
authorIdo Yariv <ido@wizery.com>
Thu, 31 Mar 2011 08:07:00 +0000 (10:07 +0200)
committerLuciano Coelho <coelho@ti.com>
Tue, 19 Apr 2011 13:49:20 +0000 (16:49 +0300)
commitd2f4d47d84f8c665ab9babb2cc84d2e7872a96e1
tree34a2d0fe6f399c7c3c7bf1e2e85fb0adf5aa378f
parent990f5de7384f9e5922e4c7c7572cbf4f29a9441e
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>
drivers/net/wireless/wl12xx/acx.c
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/tx.c
drivers/net/wireless/wl12xx/wl12xx.h