drivers: can: native_posix_linux: drop rx frames while stopped

The driver should drop rx frames while in stopped state.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This commit is contained in:
Thomas Stranger 2022-09-15 12:57:03 +02:00 committed by Fabio Baltieri
commit fc33325fc7

View file

@ -103,11 +103,11 @@ static void rx_thread(void *arg1, void *arg2, void *arg3)
k_sem_give(&data->tx_idle);
if (!data->loopback || !data->started) {
if (!data->loopback) {
continue;
}
}
if (count <= 0) {
if ((count <= 0) || !data->started) {
break;
}