]> git.baikalelectronics.ru Git - kernel.git/commit
rt2x00: Calculate tx status fifo size instead of hardcoding it
authorHelmut Schaa <helmut.schaa@googlemail.com>
Mon, 28 Mar 2011 11:30:36 +0000 (13:30 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 4 Apr 2011 20:20:02 +0000 (16:20 -0400)
commit4c8ab5a4a3670a5e88d9b818012ee722412b1784
treef447ca74205caebb7dc32a1bdcbfd128ec245601
parent41852479bddf3410c76bc02019fecf4c2ac42c3c
rt2x00: Calculate tx status fifo size instead of hardcoding it

Instead of hardcoding the tx status fifo size as 512 calculate it based
on the number of tx queues and the number of entries per queue. Also
round the size up to a power of 2 as kfifo would otherwise round it
down.

On rt2800pci this will increase the kfifo size from 512 bytes to 1024
bytes which is then able to hold the tx status for all entries in all
tx queues.

Furthermore, if the number of tx queues or tx entries changes in the
future (use of the MGMT queue for example) the kfifo size doesn't need
to be updated.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00dev.c