diff options
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/dev/bittiming.c | 15 | ||||
-rw-r--r-- | drivers/net/can/dev/calc_bittiming.c | 2 | ||||
-rw-r--r-- | drivers/net/can/dev/netlink.c | 6 |
3 files changed, 14 insertions, 9 deletions
diff --git a/drivers/net/can/dev/bittiming.c b/drivers/net/can/dev/bittiming.c index 263e46a1f648..0b0b8c767c5b 100644 --- a/drivers/net/can/dev/bittiming.c +++ b/drivers/net/can/dev/bittiming.c @@ -12,7 +12,8 @@ * file linux/can/netlink.h. */ static int can_fixup_bittiming(const struct net_device *dev, struct can_bittiming *bt, - const struct can_bittiming_const *btc) + const struct can_bittiming_const *btc, + struct netlink_ext_ack *extack) { const struct can_priv *priv = netdev_priv(dev); unsigned int tseg1; @@ -50,7 +51,8 @@ static int can_fixup_bittiming(const struct net_device *dev, struct can_bittimin static int can_validate_bitrate(const struct net_device *dev, const struct can_bittiming *bt, const u32 *bitrate_const, - const unsigned int bitrate_const_cnt) + const unsigned int bitrate_const_cnt, + struct netlink_ext_ack *extack) { unsigned int i; @@ -65,7 +67,8 @@ can_validate_bitrate(const struct net_device *dev, const struct can_bittiming *b int can_get_bittiming(const struct net_device *dev, struct can_bittiming *bt, const struct can_bittiming_const *btc, const u32 *bitrate_const, - const unsigned int bitrate_const_cnt) + const unsigned int bitrate_const_cnt, + struct netlink_ext_ack *extack) { /* Depending on the given can_bittiming parameter structure the CAN * timing parameters are calculated based on the provided bitrate OR @@ -73,12 +76,12 @@ int can_get_bittiming(const struct net_device *dev, struct can_bittiming *bt, * provided directly which are then checked and fixed up. */ if (!bt->tq && bt->bitrate && btc) - return can_calc_bittiming(dev, bt, btc); + return can_calc_bittiming(dev, bt, btc, extack); if (bt->tq && !bt->bitrate && btc) - return can_fixup_bittiming(dev, bt, btc); + return can_fixup_bittiming(dev, bt, btc, extack); if (!bt->tq && bt->bitrate && bitrate_const) return can_validate_bitrate(dev, bt, bitrate_const, - bitrate_const_cnt); + bitrate_const_cnt, extack); return -EINVAL; } diff --git a/drivers/net/can/dev/calc_bittiming.c b/drivers/net/can/dev/calc_bittiming.c index 28dbb6cbfd5d..46d28f377186 100644 --- a/drivers/net/can/dev/calc_bittiming.c +++ b/drivers/net/can/dev/calc_bittiming.c @@ -63,7 +63,7 @@ can_update_sample_point(const struct can_bittiming_const *btc, } int can_calc_bittiming(const struct net_device *dev, struct can_bittiming *bt, - const struct can_bittiming_const *btc) + const struct can_bittiming_const *btc, struct netlink_ext_ack *extack) { struct can_priv *priv = netdev_priv(dev); unsigned int bitrate; /* current bitrate */ diff --git a/drivers/net/can/dev/netlink.c b/drivers/net/can/dev/netlink.c index a03b45a020b9..036d85ef07f5 100644 --- a/drivers/net/can/dev/netlink.c +++ b/drivers/net/can/dev/netlink.c @@ -215,7 +215,8 @@ static int can_changelink(struct net_device *dev, struct nlattr *tb[], err = can_get_bittiming(dev, &bt, priv->bittiming_const, priv->bitrate_const, - priv->bitrate_const_cnt); + priv->bitrate_const_cnt, + extack); if (err) return err; @@ -320,7 +321,8 @@ static int can_changelink(struct net_device *dev, struct nlattr *tb[], err = can_get_bittiming(dev, &dbt, priv->data_bittiming_const, priv->data_bitrate_const, - priv->data_bitrate_const_cnt); + priv->data_bitrate_const_cnt, + extack); if (err) return err; |