aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/can/dev.c')
-rw-r--r--drivers/net/can/dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index c1bb29f0322b..f08f1202ff00 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -592,6 +592,8 @@ static int can_changelink(struct net_device *dev,
592 if (dev->flags & IFF_UP) 592 if (dev->flags & IFF_UP)
593 return -EBUSY; 593 return -EBUSY;
594 cm = nla_data(data[IFLA_CAN_CTRLMODE]); 594 cm = nla_data(data[IFLA_CAN_CTRLMODE]);
595 if (cm->flags & ~priv->ctrlmode_supported)
596 return -EOPNOTSUPP;
595 priv->ctrlmode &= ~cm->mask; 597 priv->ctrlmode &= ~cm->mask;
596 priv->ctrlmode |= cm->flags; 598 priv->ctrlmode |= cm->flags;
597 } 599 }