Commit 317d8e2f authored by David S. Miller's avatar David S. Miller

Merge branch 'SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS-get-remove'

Florian Fainelli says:

====================
Remove getting SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS

AFAICT there is no code that attempts to get the value of the attribute
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS while it is used with
switchdev_port_attr_set().

This is effectively no doing anything and it can slow down future work
that tries to make modifications in these areas so remove that.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 9f771f1f 1b8b589d
......@@ -431,19 +431,6 @@ static void mlxsw_sp_bridge_vlan_put(struct mlxsw_sp_bridge_vlan *bridge_vlan)
mlxsw_sp_bridge_vlan_destroy(bridge_vlan);
}
static void mlxsw_sp_port_bridge_flags_get(struct mlxsw_sp_bridge *bridge,
struct net_device *dev,
unsigned long *brport_flags)
{
struct mlxsw_sp_bridge_port *bridge_port;
bridge_port = mlxsw_sp_bridge_port_find(bridge, dev);
if (WARN_ON(!bridge_port))
return;
memcpy(brport_flags, &bridge_port->flags, sizeof(*brport_flags));
}
static int mlxsw_sp_port_attr_get(struct net_device *dev,
struct switchdev_attr *attr)
{
......@@ -451,10 +438,6 @@ static int mlxsw_sp_port_attr_get(struct net_device *dev,
struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp;
switch (attr->id) {
case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS:
mlxsw_sp_port_bridge_flags_get(mlxsw_sp->bridge, attr->orig_dev,
&attr->u.brport_flags);
break;
case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT:
attr->u.brport_flags_support = BR_LEARNING | BR_FLOOD |
BR_MCAST_FLOOD;
......
......@@ -109,8 +109,6 @@ struct rocker_world_ops {
int (*port_attr_bridge_flags_set)(struct rocker_port *rocker_port,
unsigned long brport_flags,
struct switchdev_trans *trans);
int (*port_attr_bridge_flags_get)(const struct rocker_port *rocker_port,
unsigned long *p_brport_flags);
int (*port_attr_bridge_flags_support_get)(const struct rocker_port *
rocker_port,
unsigned long *
......
......@@ -1582,17 +1582,6 @@ rocker_world_port_attr_bridge_flags_set(struct rocker_port *rocker_port,
trans);
}
static int
rocker_world_port_attr_bridge_flags_get(const struct rocker_port *rocker_port,
unsigned long *p_brport_flags)
{
struct rocker_world_ops *wops = rocker_port->rocker->wops;
if (!wops->port_attr_bridge_flags_get)
return -EOPNOTSUPP;
return wops->port_attr_bridge_flags_get(rocker_port, p_brport_flags);
}
static int
rocker_world_port_attr_bridge_flags_support_get(const struct rocker_port *
rocker_port,
......@@ -2061,10 +2050,6 @@ static int rocker_port_attr_get(struct net_device *dev,
int err = 0;
switch (attr->id) {
case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS:
err = rocker_world_port_attr_bridge_flags_get(rocker_port,
&attr->u.brport_flags);
break;
case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT:
err = rocker_world_port_attr_bridge_flags_support_get(rocker_port,
&attr->u.brport_flags_support);
......
......@@ -2511,16 +2511,6 @@ static int ofdpa_port_attr_bridge_flags_set(struct rocker_port *rocker_port,
return err;
}
static int
ofdpa_port_attr_bridge_flags_get(const struct rocker_port *rocker_port,
unsigned long *p_brport_flags)
{
const struct ofdpa_port *ofdpa_port = rocker_port->wpriv;
*p_brport_flags = ofdpa_port->brport_flags;
return 0;
}
static int
ofdpa_port_attr_bridge_flags_support_get(const struct rocker_port *
rocker_port,
......
......@@ -646,11 +646,6 @@ static int swdev_port_attr_get(struct net_device *netdev,
struct ethsw_port_priv *port_priv = netdev_priv(netdev);
switch (attr->id) {
case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS:
attr->u.brport_flags =
(port_priv->ethsw_data->learning ? BR_LEARNING : 0) |
(port_priv->flood ? BR_FLOOD : 0);
break;
case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT:
attr->u.brport_flags_support = BR_LEARNING | BR_FLOOD;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment