]> git.baikalelectronics.ru Git - kernel.git/commit
mwl8k: allow more time for transmit rings to drain
authorLennert Buytenhek <buytenh@wantstofly.org>
Mon, 30 Nov 2009 17:13:04 +0000 (18:13 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Dec 2009 21:51:21 +0000 (16:51 -0500)
commitb8c5d2b164cf29669d8c8ef8f95c72bacc542d0c
tree40b4445de8a802f603142822863d065c89d70b1b
parent875e07471c683e64889fe28eb2d03881e91cc26f
mwl8k: allow more time for transmit rings to drain

Before issuing any firmware commands, we wait for the transmit rings
to drain, to prevent control versus data path synchronization issues.
In some cases, this can end up taking longer than the current hardcoded
limit of 5 seconds, for example if the transmit rings are filled with
packets for a host that has dropped off the air and we end up
retransmitting every pending packet at the lowest rate a couple of
times.

This patch changes mwl8k_tx_wait_empty() to only bail out on timeout
expiry if there was no change in the number of packets pending in the
transmit rings during the waiting period.  If at least one transmit
ring entry was reclaimed while we were waiting, we are apparently still
making progress, and we'll allow waiting for another timeout period.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwl8k.c