diff options
Diffstat (limited to 'net/switchdev/switchdev.c')
-rw-r--r-- | net/switchdev/switchdev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c index 33bafa2e703e..9db87a34f866 100644 --- a/net/switchdev/switchdev.c +++ b/net/switchdev/switchdev.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
16 | #include <linux/notifier.h> | 16 | #include <linux/notifier.h> |
17 | #include <linux/netdevice.h> | 17 | #include <linux/netdevice.h> |
18 | #include <linux/etherdevice.h> | ||
18 | #include <linux/if_bridge.h> | 19 | #include <linux/if_bridge.h> |
19 | #include <net/ip_fib.h> | 20 | #include <net/ip_fib.h> |
20 | #include <net/switchdev.h> | 21 | #include <net/switchdev.h> |
@@ -742,11 +743,11 @@ int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], | |||
742 | struct switchdev_obj obj = { | 743 | struct switchdev_obj obj = { |
743 | .id = SWITCHDEV_OBJ_PORT_FDB, | 744 | .id = SWITCHDEV_OBJ_PORT_FDB, |
744 | .u.fdb = { | 745 | .u.fdb = { |
745 | .addr = addr, | ||
746 | .vid = vid, | 746 | .vid = vid, |
747 | }, | 747 | }, |
748 | }; | 748 | }; |
749 | 749 | ||
750 | ether_addr_copy(obj.u.fdb.addr, addr); | ||
750 | return switchdev_port_obj_add(dev, &obj); | 751 | return switchdev_port_obj_add(dev, &obj); |
751 | } | 752 | } |
752 | EXPORT_SYMBOL_GPL(switchdev_port_fdb_add); | 753 | EXPORT_SYMBOL_GPL(switchdev_port_fdb_add); |
@@ -769,11 +770,11 @@ int switchdev_port_fdb_del(struct ndmsg *ndm, struct nlattr *tb[], | |||
769 | struct switchdev_obj obj = { | 770 | struct switchdev_obj obj = { |
770 | .id = SWITCHDEV_OBJ_PORT_FDB, | 771 | .id = SWITCHDEV_OBJ_PORT_FDB, |
771 | .u.fdb = { | 772 | .u.fdb = { |
772 | .addr = addr, | ||
773 | .vid = vid, | 773 | .vid = vid, |
774 | }, | 774 | }, |
775 | }; | 775 | }; |
776 | 776 | ||
777 | ether_addr_copy(obj.u.fdb.addr, addr); | ||
777 | return switchdev_port_obj_del(dev, &obj); | 778 | return switchdev_port_obj_del(dev, &obj); |
778 | } | 779 | } |
779 | EXPORT_SYMBOL_GPL(switchdev_port_fdb_del); | 780 | EXPORT_SYMBOL_GPL(switchdev_port_fdb_del); |