drivers: can: fix can_configure() when CAN-FD is enabled
Currently, can_configure() pass a hard-coded 0 for the data bitrate (which is only used for CAN-FD), breaking this API for CAN-FD enabled applications. Instead pass in the provided bitrate for both arbitration phase and data phase. Fixes: #34375 Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
2cc3fab62f
commit
8d5a0664d2
1 changed files with 1 additions and 2 deletions
|
@ -860,7 +860,7 @@ __deprecated static inline int can_configure(const struct device *dev, enum can_
|
|||
uint32_t bitrate)
|
||||
{
|
||||
if (bitrate > 0) {
|
||||
int err = can_set_bitrate(dev, bitrate, 0);
|
||||
int err = can_set_bitrate(dev, bitrate, bitrate);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
|
@ -869,7 +869,6 @@ __deprecated static inline int can_configure(const struct device *dev, enum can_
|
|||
return can_set_mode(dev, mode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get current state
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue