diff options
Diffstat (limited to 'net/switchdev/switchdev.c')
-rw-r--r-- | net/switchdev/switchdev.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c index aa84acfb6632..5df9d1138ac9 100644 --- a/net/switchdev/switchdev.c +++ b/net/switchdev/switchdev.c | |||
@@ -616,16 +616,21 @@ static int __switchdev_handle_port_obj_add(struct net_device *dev, | |||
616 | bool (*check_cb)(const struct net_device *dev), | 616 | bool (*check_cb)(const struct net_device *dev), |
617 | int (*add_cb)(struct net_device *dev, | 617 | int (*add_cb)(struct net_device *dev, |
618 | const struct switchdev_obj *obj, | 618 | const struct switchdev_obj *obj, |
619 | struct switchdev_trans *trans)) | 619 | struct switchdev_trans *trans, |
620 | struct netlink_ext_ack *extack)) | ||
620 | { | 621 | { |
622 | struct netlink_ext_ack *extack; | ||
621 | struct net_device *lower_dev; | 623 | struct net_device *lower_dev; |
622 | struct list_head *iter; | 624 | struct list_head *iter; |
623 | int err = -EOPNOTSUPP; | 625 | int err = -EOPNOTSUPP; |
624 | 626 | ||
627 | extack = switchdev_notifier_info_to_extack(&port_obj_info->info); | ||
628 | |||
625 | if (check_cb(dev)) { | 629 | if (check_cb(dev)) { |
626 | /* This flag is only checked if the return value is success. */ | 630 | /* This flag is only checked if the return value is success. */ |
627 | port_obj_info->handled = true; | 631 | port_obj_info->handled = true; |
628 | return add_cb(dev, port_obj_info->obj, port_obj_info->trans); | 632 | return add_cb(dev, port_obj_info->obj, port_obj_info->trans, |
633 | extack); | ||
629 | } | 634 | } |
630 | 635 | ||
631 | /* Switch ports might be stacked under e.g. a LAG. Ignore the | 636 | /* Switch ports might be stacked under e.g. a LAG. Ignore the |
@@ -650,7 +655,8 @@ int switchdev_handle_port_obj_add(struct net_device *dev, | |||
650 | bool (*check_cb)(const struct net_device *dev), | 655 | bool (*check_cb)(const struct net_device *dev), |
651 | int (*add_cb)(struct net_device *dev, | 656 | int (*add_cb)(struct net_device *dev, |
652 | const struct switchdev_obj *obj, | 657 | const struct switchdev_obj *obj, |
653 | struct switchdev_trans *trans)) | 658 | struct switchdev_trans *trans, |
659 | struct netlink_ext_ack *extack)) | ||
654 | { | 660 | { |
655 | int err; | 661 | int err; |
656 | 662 | ||