mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: bridge: mcast: br_multicast_set_port_router takes multicast context as argument
Change br_multicast_set_port_router to take port multicast context as its first argument so we can later use it to control port/vlan mcast router option. Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a515e5b53c
commit
a53581d555
4 changed files with 11 additions and 8 deletions
|
@ -4246,15 +4246,16 @@ br_multicast_rport_del_notify(struct net_bridge_mcast_port *pmctx, bool deleted)
|
|||
pmctx->multicast_router = MDB_RTR_TYPE_TEMP_QUERY;
|
||||
}
|
||||
|
||||
int br_multicast_set_port_router(struct net_bridge_port *p, unsigned long val)
|
||||
int br_multicast_set_port_router(struct net_bridge_mcast_port *pmctx,
|
||||
unsigned long val)
|
||||
{
|
||||
struct net_bridge_mcast *brmctx = &p->br->multicast_ctx;
|
||||
struct net_bridge_mcast_port *pmctx = &p->multicast_ctx;
|
||||
struct net_bridge_mcast *brmctx;
|
||||
unsigned long now = jiffies;
|
||||
int err = -EINVAL;
|
||||
bool del = false;
|
||||
|
||||
spin_lock(&p->br->multicast_lock);
|
||||
brmctx = br_multicast_port_ctx_get_global(pmctx);
|
||||
spin_lock(&brmctx->br->multicast_lock);
|
||||
if (pmctx->multicast_router == val) {
|
||||
/* Refresh the temp router port timer */
|
||||
if (pmctx->multicast_router == MDB_RTR_TYPE_TEMP) {
|
||||
|
@ -4304,7 +4305,7 @@ int br_multicast_set_port_router(struct net_bridge_port *p, unsigned long val)
|
|||
}
|
||||
err = 0;
|
||||
unlock:
|
||||
spin_unlock(&p->br->multicast_lock);
|
||||
spin_unlock(&brmctx->br->multicast_lock);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue