drivers: can: stm32: bxcan: store current operation mode

Store the current operation mode in the can_driver_data structure.

Fixes: 9051824fa3

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2024-01-24 12:56:06 +01:00 committed by Henrik Brix Andersen
parent 1b90d29c89
commit bc8d69caa6

View File

@ -532,6 +532,8 @@ static int can_stm32_set_mode(const struct device *dev, can_mode_t mode)
can->MCR &= ~CAN_MCR_NART;
}
data->common.mode = mode;
k_mutex_unlock(&data->inst_mutex);
return 0;