mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
net: switchdev: change fdb addr for a byte array
The address in the switchdev_obj_fdb structure is currently represented as a pointer. Replacing it for a 6-byte array allows switchdev to carry addresses directly read from hardware registers, not stored by the switch chip driver (as in Rocker). Signed-off-by: Vivien Didelot <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
4933d85c51
commit
1525c386a1
4 changed files with 6 additions and 5 deletions
|
|
@ -136,11 +136,11 @@ static void fdb_del_external_learn(struct net_bridge_fdb_entry *f)
|
|||
struct switchdev_obj obj = {
|
||||
.id = SWITCHDEV_OBJ_PORT_FDB,
|
||||
.u.fdb = {
|
||||
.addr = f->addr.addr,
|
||||
.vid = f->vlan_id,
|
||||
},
|
||||
};
|
||||
|
||||
ether_addr_copy(obj.u.fdb.addr, f->addr.addr);
|
||||
switchdev_port_obj_del(f->dst->dev, &obj);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
#include <linux/mutex.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/if_bridge.h>
|
||||
#include <net/ip_fib.h>
|
||||
#include <net/switchdev.h>
|
||||
|
|
@ -742,11 +743,11 @@ int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
|
|||
struct switchdev_obj obj = {
|
||||
.id = SWITCHDEV_OBJ_PORT_FDB,
|
||||
.u.fdb = {
|
||||
.addr = addr,
|
||||
.vid = vid,
|
||||
},
|
||||
};
|
||||
|
||||
ether_addr_copy(obj.u.fdb.addr, addr);
|
||||
return switchdev_port_obj_add(dev, &obj);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(switchdev_port_fdb_add);
|
||||
|
|
@ -769,11 +770,11 @@ int switchdev_port_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
|
|||
struct switchdev_obj obj = {
|
||||
.id = SWITCHDEV_OBJ_PORT_FDB,
|
||||
.u.fdb = {
|
||||
.addr = addr,
|
||||
.vid = vid,
|
||||
},
|
||||
};
|
||||
|
||||
ether_addr_copy(obj.u.fdb.addr, addr);
|
||||
return switchdev_port_obj_del(dev, &obj);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(switchdev_port_fdb_del);
|
||||
|
|
|
|||
Loading…
Reference in a new issue