summaryrefslogtreecommitdiff
path: root/net/dsa/slave.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r--net/dsa/slave.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 165bb2cb8431..8abc1658ac47 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -3289,6 +3289,7 @@ static int dsa_master_changeupper(struct net_device *dev,
static int dsa_slave_netdevice_event(struct notifier_block *nb,
unsigned long event, void *ptr)
{
+ struct netlink_ext_ack *extack = netdev_notifier_info_to_extack(ptr);
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
switch (event) {
@@ -3418,6 +3419,16 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb,
return NOTIFY_OK;
}
+ case NETDEV_PRE_CHANGE_HWTSTAMP: {
+ struct netdev_notifier_hwtstamp_info *info = ptr;
+ int err;
+
+ if (!netdev_uses_dsa(dev))
+ return NOTIFY_DONE;
+
+ err = dsa_master_pre_change_hwtstamp(dev, info->config, extack);
+ return notifier_from_errno(err);
+ }
default:
break;
}