Skip to content

Commit

Permalink
net: dsa: remove .set_addr
Browse files Browse the repository at this point in the history
Now that there is no user for the .set_addr function, remove it from
DSA. If a switch supports this feature (like mv88e6xxx), the
implementation can be done in the driver setup.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vivien Didelot authored and David S. Miller committed Oct 15, 2017
1 parent 93004a9 commit 841f4f2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion include/net/dsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ struct dsa_switch_ops {
enum dsa_tag_protocol (*get_tag_protocol)(struct dsa_switch *ds);

int (*setup)(struct dsa_switch *ds);
int (*set_addr)(struct dsa_switch *ds, u8 *addr);
u32 (*get_phy_flags)(struct dsa_switch *ds, int port);

/*
Expand Down
6 changes: 0 additions & 6 deletions net/dsa/dsa2.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,6 @@ static int dsa_ds_apply(struct dsa_switch_tree *dst, struct dsa_switch *ds)
if (err)
return err;

if (ds->ops->set_addr) {
err = ds->ops->set_addr(ds, dst->cpu_dp->netdev->dev_addr);
if (err < 0)
return err;
}

if (!ds->slave_mii_bus && ds->ops->phy_read) {
ds->slave_mii_bus = devm_mdiobus_alloc(ds->dev);
if (!ds->slave_mii_bus)
Expand Down
6 changes: 0 additions & 6 deletions net/dsa/legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,6 @@ static int dsa_switch_setup_one(struct dsa_switch *ds,
if (ret)
return ret;

if (ops->set_addr) {
ret = ops->set_addr(ds, master->dev_addr);
if (ret < 0)
return ret;
}

if (!ds->slave_mii_bus && ops->phy_read) {
ds->slave_mii_bus = devm_mdiobus_alloc(ds->dev);
if (!ds->slave_mii_bus)
Expand Down

0 comments on commit 841f4f2

Please sign in to comment.