summaryrefslogtreecommitdiffstats
path: root/sys/dev/etherswitch/arswitch/arswitch_vlans.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/etherswitch/arswitch/arswitch_vlans.c')
-rw-r--r--sys/dev/etherswitch/arswitch/arswitch_vlans.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/dev/etherswitch/arswitch/arswitch_vlans.c b/sys/dev/etherswitch/arswitch/arswitch_vlans.c
index f981614..5e24e57 100644
--- a/sys/dev/etherswitch/arswitch/arswitch_vlans.c
+++ b/sys/dev/etherswitch/arswitch/arswitch_vlans.c
@@ -171,7 +171,7 @@ arswitch_set_port_vlan(struct arswitch_softc *sc, uint32_t ports, int vid)
* Reset vlans to default state.
*/
void
-arswitch_reset_vlans(struct arswitch_softc *sc)
+ar8xxx_reset_vlans(struct arswitch_softc *sc)
{
uint32_t ports;
int i, j;
@@ -220,7 +220,7 @@ arswitch_reset_vlans(struct arswitch_softc *sc)
sc->vid[0] = 1;
/* Set PVID for everyone. */
for (i = 0; i <= sc->numphys; i++)
- arswitch_set_pvid(sc, i, sc->vid[0]);
+ sc->hal.arswitch_vlan_set_pvid(sc, i, sc->vid[0]);
ports = 0;
for (i = 0; i <= sc->numphys; i++)
ports |= (1 << i);
@@ -259,12 +259,10 @@ arswitch_reset_vlans(struct arswitch_softc *sc)
}
int
-arswitch_getvgroup(device_t dev, etherswitch_vlangroup_t *vg)
+ar8xxx_getvgroup(struct arswitch_softc *sc, etherswitch_vlangroup_t *vg)
{
- struct arswitch_softc *sc;
int err;
- sc = device_get_softc(dev);
ARSWITCH_LOCK_ASSERT(sc, MA_NOTOWNED);
if (vg->es_vlangroup > sc->info.es_nvlangroups)
@@ -305,12 +303,10 @@ arswitch_getvgroup(device_t dev, etherswitch_vlangroup_t *vg)
}
int
-arswitch_setvgroup(device_t dev, etherswitch_vlangroup_t *vg)
+ar8xxx_setvgroup(struct arswitch_softc *sc, etherswitch_vlangroup_t *vg)
{
- struct arswitch_softc *sc;
int err, vid;
- sc = device_get_softc(dev);
ARSWITCH_LOCK_ASSERT(sc, MA_NOTOWNED);
/* Check VLAN mode. */
@@ -362,7 +358,7 @@ arswitch_setvgroup(device_t dev, etherswitch_vlangroup_t *vg)
}
int
-arswitch_get_pvid(struct arswitch_softc *sc, int port, int *pvid)
+ar8xxx_get_pvid(struct arswitch_softc *sc, int port, int *pvid)
{
uint32_t reg;
@@ -373,7 +369,7 @@ arswitch_get_pvid(struct arswitch_softc *sc, int port, int *pvid)
}
int
-arswitch_set_pvid(struct arswitch_softc *sc, int port, int pvid)
+ar8xxx_set_pvid(struct arswitch_softc *sc, int port, int pvid)
{
ARSWITCH_LOCK_ASSERT(sc, MA_OWNED);
OpenPOWER on IntegriCloud