stir4200 turnaround calculation fix
PATCH 1/1 stir4200 turnaround calculation fix
ir261_stir_turn.diff :
~~~~~~~~~~~~~~~~~~~~
<Patch from John K. Luebs>
o [CORRECT] Proper turnaround computations in the stir4200 driver
o [CORRECT] Take care of Tx packet without IrDA metadata (speed)
Signed-off-by John K. Luebs <jkluebs@lu...>
Signed-off-by Jean Tourrilhes <[email protected]>
drivers/net/irda/stir4200.c renamed from drivers/net/irda/stir4200.d0.c +3 -2
@@ -671,7 +671,8 @@ static void turnaround_delay(const strucreturn ;do_gettimeofday (&now); - us -= (now.tv_sec - stir->rx_time.tv_sec) *USEC_PER_SEC ; +if (now.tv_sec - stir->rx_time.tv_sec >0 ) + us -=USEC_PER_SEC ; us -= now.tv_usec - stir->rx_time.tv_usec;if (us <10 )return ;
@@ -787,7 +788,7 @@ static int stir_transmit_thread(void *arstir_send (stir, skb);dev_kfree_skb (skb); -if (stir->speed != new_speed) { +if ((new_speed !=-1 ) && (stir->speed != new_speed)) {if (fifo_txwait (stir,-1 ) ||change_speed (stir, new_speed))break ;