]> rtime.felk.cvut.cz Git - socketcan-devel.git/commit
can bcm: fix tx_setup off-by-one errors
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Thu, 29 Sep 2011 05:38:44 +0000 (05:38 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Thu, 29 Sep 2011 05:38:44 +0000 (05:38 +0000)
commit55b7bae29a3225bf5922d8d7ce3e2ff467650f05
treea7e04424f9b5306ab18ba78addd90e63405c7aa6
parent650389722c26050d2efd1d3aeb6fda15d702a8a1
can bcm: fix tx_setup off-by-one errors

This patch fixes two off-by-one errors that canceled each other out.
Checking for the same condition two times in bcm_tx_timeout_tsklet() reduced
the count of frames to be sent by one. This did not show up the first time
tx_setup is invoked as an additional frame is sent due to TX_ANNONCE.
Invoking a second tx_setup on the same item led to a reduced (by 1) number of
sent frames.

Reported-by: Andre Naujoks <nautsch@gmail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Upstream commit https://github.com/davem330/net/commit/aabdcb0b553b9c9547b1a506b34d55a764745870

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1274 030b6a49-0b11-0410-94ab-b0dab22257f2
kernel/2.6/net/can/bcm-prior-2-6-22.c
kernel/2.6/net/can/bcm.c