mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
Fix missing generation of waiting-time-extension in some situations
In the function set_tpdu_state(), there is a missing transition to WAIT_TX state. This is fine if you are coming from the WAIT_PB state, which has already restarted the waiting timer via card_emu_uart_update_wt(), but if you are coming from the WAIT_RX state, then card_emu_uart_update_wt() is never called and the USART timer is never restarted. (Because the transmitter is left enabled in WAIT_RX, the response is still sent to the modem; it is just the half-wait timeouts that are missing). Change-Id: Ib4eb964c073192e8f067004625af818ba2caf003
This commit is contained in:
@@ -775,6 +775,15 @@ static void set_tpdu_state(struct card_handle *ch, enum tpdu_state new_ts)
|
|||||||
/* prepare to extend the waiting time once half of it is reached */
|
/* prepare to extend the waiting time once half of it is reached */
|
||||||
card_emu_uart_update_wt(ch->uart_chan, ch->waiting_time);
|
card_emu_uart_update_wt(ch->uart_chan, ch->waiting_time);
|
||||||
break;
|
break;
|
||||||
|
case TPDU_S_WAIT_TX:
|
||||||
|
/* If we came from WAIT_RX, disable the receiver and
|
||||||
|
* enable the transmitter. If we came from WAIT_RX or
|
||||||
|
* WAIT_PB, reset the waiting time so that we can extend
|
||||||
|
* waiting time if needed. */
|
||||||
|
card_emu_uart_enable(ch->uart_chan, ENABLE_TX);
|
||||||
|
/* prepare to extend the waiting time once half of it is reached */
|
||||||
|
card_emu_uart_update_wt(ch->uart_chan, ch->waiting_time);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user