mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 16:41:25 +00:00
can: Proper ctrlmode handling for CAN devices
This patch adds error checking of ctrlmode values for CAN devices. As an example all availabe bits are implemented in the mcp251x driver. Signed-off-by: Christian Pellegrin <chripell@fsfe.org> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1954dc1177
commit
ad72c347e5
9 changed files with 19 additions and 1 deletions
|
@ -686,6 +686,7 @@ struct net_device *alloc_mscandev(void)
|
|||
priv->can.bittiming_const = &mscan_bittiming_const;
|
||||
priv->can.do_set_bittiming = mscan_do_set_bittiming;
|
||||
priv->can.do_set_mode = mscan_do_set_mode;
|
||||
priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES;
|
||||
|
||||
for (i = 0; i < TX_QUEUE_SIZE; i++) {
|
||||
priv->tx_queue[i].id = i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue