diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2015-10-22 16:34:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-22 17:38:43 +0300 |
commit | 2c49471b6695c5bac0d36c30ca07b8c311cd7cc3 (patch) | |
tree | 83903ef4e06836c5d4f1b7e7051c4ff11160c693 /drivers/net/dsa/mv88e6xxx.c | |
parent | f33475bd678e3c052f585d5660373ee7e957c742 (diff) | |
download | linux-2c49471b6695c5bac0d36c30ca07b8c311cd7cc3.tar.xz |
net: dsa: mv88e6xxx: remove port_fdb_getnext
Now that port_fdb_dump is implemented and even simpler, get rid of
port_fdb_getnext.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx.c | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c index 8d0acf3f64de..39664d8667af 100644 --- a/drivers/net/dsa/mv88e6xxx.c +++ b/drivers/net/dsa/mv88e6xxx.c @@ -1559,33 +1559,6 @@ unlock: return err; } -static int _mv88e6xxx_port_vtu_getnext(struct dsa_switch *ds, int port, u16 vid, - struct mv88e6xxx_vtu_stu_entry *entry) -{ - int err; - - do { - if (vid == 4095) - return -ENOENT; - - err = _mv88e6xxx_vtu_vid_write(ds, vid); - if (err) - return err; - - err = _mv88e6xxx_vtu_getnext(ds, entry); - if (err) - return err; - - if (!entry->valid) - return -ENOENT; - - vid = entry->vid; - } while (entry->data[port] != GLOBAL_VTU_DATA_MEMBER_TAG_TAGGED && - entry->data[port] != GLOBAL_VTU_DATA_MEMBER_TAG_UNTAGGED); - - return 0; -} - int mv88e6xxx_vlan_getnext(struct dsa_switch *ds, u16 *vid, unsigned long *ports, unsigned long *untagged) { @@ -1864,52 +1837,6 @@ unlock: return err; } -/* get next entry for port */ -int mv88e6xxx_port_fdb_getnext(struct dsa_switch *ds, int port, - unsigned char *addr, u16 *vid, bool *is_static) -{ - struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); - struct mv88e6xxx_atu_entry next; - u16 fid = *vid; /* We use one FID per VLAN */ - int ret; - - mutex_lock(&ps->smi_mutex); - - do { - if (is_broadcast_ether_addr(addr)) { - struct mv88e6xxx_vtu_stu_entry vtu; - - ret = _mv88e6xxx_port_vtu_getnext(ds, port, *vid, &vtu); - if (ret < 0) - goto unlock; - - *vid = vtu.vid; - fid = vtu.fid; - } - - ret = _mv88e6xxx_atu_mac_write(ds, addr); - if (ret < 0) - goto unlock; - - ret = _mv88e6xxx_atu_getnext(ds, fid, &next); - if (ret < 0) - goto unlock; - - ether_addr_copy(addr, next.mac); - - if (next.state == GLOBAL_ATU_DATA_STATE_UNUSED) - continue; - } while (next.trunk || (next.portv_trunkid & BIT(port)) == 0); - - *is_static = next.state == (is_multicast_ether_addr(addr) ? - GLOBAL_ATU_DATA_STATE_MC_STATIC : - GLOBAL_ATU_DATA_STATE_UC_STATIC); -unlock: - mutex_unlock(&ps->smi_mutex); - - return ret; -} - static void mv88e6xxx_bridge_work(struct work_struct *work) { struct mv88e6xxx_priv_state *ps; |