When the FD is turned off through the netlink interface, the value still remain in struct can_tdc and are displayed despite of the feature being disabled. This patch clears priv->tdc whenever FD is set to off. This way, the TDC variables are not displayed anymore. Signed-off-by: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx> --- Hi Marc, I would suggest to squash that into commit 5eb2cd8e2ded ("can: netlink: add interface for CAN-FD Transmitter Delay Compensation (TDC)"). --- drivers/net/can/dev/netlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/can/dev/netlink.c b/drivers/net/can/dev/netlink.c index b8d531e49540..b33e6da6ca5a 100644 --- a/drivers/net/can/dev/netlink.c +++ b/drivers/net/can/dev/netlink.c @@ -207,6 +207,7 @@ static int can_changelink(struct net_device *dev, struct nlattr *tb[], dev->mtu = CAN_MTU; memset(&priv->data_bittiming, 0, sizeof(priv->data_bittiming)); + memset(&priv->tdc, 0, sizeof(priv->tdc)); } } -- 2.31.1