[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150330120118.GF2045@nanopsycho.orion>
Date: Mon, 30 Mar 2015 14:01:18 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: sfeldma@...il.com
Cc: netdev@...r.kernel.org, roopa@...ulusnetworks.com,
linux@...ck-us.net, f.fainelli@...il.com
Subject: Re: [PATCH net-next 06/18] rocker: use swdev get/set attr for bridge
port flags
Mon, Mar 30, 2015 at 10:40:24AM CEST, sfeldma@...il.com wrote:
>From: Scott Feldman <sfeldma@...il.com>
>
>Signed-off-by: Scott Feldman <sfeldma@...il.com>
>---
> drivers/net/ethernet/rocker/rocker.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
I would squash this patch with the previous one.
>
>diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
>index 224f91d..bc4fd33 100644
>--- a/drivers/net/ethernet/rocker/rocker.c
>+++ b/drivers/net/ethernet/rocker/rocker.c
>@@ -4230,6 +4230,9 @@ static int rocker_port_attr_get(struct net_device *dev, struct swdev_attr *attr)
> attr->ppid.id_len = sizeof(rocker->hw.id);
> memcpy(&attr->ppid.id, &rocker->hw.id, attr->ppid.id_len);
> break;
>+ case SWDEV_ATTR_PORT_BRIDGE_FLAGS:
>+ attr->brport_flags = rocker_port->brport_flags;
>+ break;
> default:
> return -EOPNOTSUPP;
> }
>@@ -4240,12 +4243,19 @@ static int rocker_port_attr_get(struct net_device *dev, struct swdev_attr *attr)
> static int rocker_port_attr_set(struct net_device *dev, struct swdev_attr *attr)
> {
> struct rocker_port *rocker_port = netdev_priv(dev);
>+ unsigned long orig_flags;
> int err = 0;
>
> switch (attr->attr) {
> case SWDEV_ATTR_PORT_STP_STATE:
> err = rocker_port_stp_update(rocker_port, attr->stp_state);
> break;
>+ case SWDEV_ATTR_PORT_BRIDGE_FLAGS:
>+ orig_flags = rocker_port->brport_flags;
>+ rocker_port->brport_flags = attr->brport_flags;
>+ if ((orig_flags ^ rocker_port->brport_flags) & BR_LEARNING)
>+ err = rocker_port_set_learning(rocker_port);
>+ break;
> default:
> err = -EOPNOTSUPP;
> break;
>--
>1.7.10.4
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists