1253572Sloos/*-
2253572Sloos * Copyright (c) 2013 Luiz Otavio O Souza.
3253572Sloos * Copyright (c) 2011-2012 Stefan Bethke.
4253572Sloos * All rights reserved.
5253572Sloos *
6253572Sloos * Redistribution and use in source and binary forms, with or without
7253572Sloos * modification, are permitted provided that the following conditions
8253572Sloos * are met:
9253572Sloos * 1. Redistributions of source code must retain the above copyright
10253572Sloos *    notice, this list of conditions and the following disclaimer.
11253572Sloos * 2. Redistributions in binary form must reproduce the above copyright
12253572Sloos *    notice, this list of conditions and the following disclaimer in the
13253572Sloos *    documentation and/or other materials provided with the distribution.
14253572Sloos *
15253572Sloos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16253572Sloos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17253572Sloos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18253572Sloos * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19253572Sloos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20253572Sloos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21253572Sloos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22253572Sloos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23253572Sloos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24253572Sloos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25253572Sloos * SUCH DAMAGE.
26253572Sloos *
27253572Sloos * $FreeBSD: releng/11.0/sys/dev/etherswitch/arswitch/arswitch_vlans.h 279943 2015-03-13 02:16:39Z adrian $
28253572Sloos */
29253572Sloos#ifndef	__ARSWITCH_VLANS_H__
30253572Sloos#define	__ARSWITCH_VLANS_H__
31253572Sloos
32262429Sadrianvoid ar8xxx_reset_vlans(struct arswitch_softc *);
33262429Sadrianint ar8xxx_getvgroup(struct arswitch_softc *, etherswitch_vlangroup_t *);
34262429Sadrianint ar8xxx_setvgroup(struct arswitch_softc *, etherswitch_vlangroup_t *);
35262429Sadrianint ar8xxx_get_pvid(struct arswitch_softc *, int, int *);
36262429Sadrianint ar8xxx_set_pvid(struct arswitch_softc *, int, int);
37253572Sloos
38279797Sadrianint ar8xxx_flush_dot1q_vlan(struct arswitch_softc *sc);
39279797Sadrianint ar8xxx_purge_dot1q_vlan(struct arswitch_softc *sc, int vid);
40279943Sadrianint ar8xxx_get_dot1q_vlan(struct arswitch_softc *sc, uint32_t *ports,
41279943Sadrian    uint32_t *untagged_ports, int vid);
42279943Sadrianint ar8xxx_set_dot1q_vlan(struct arswitch_softc *sc, uint32_t ports,
43279943Sadrian    uint32_t untagged_ports, int vid);
44279790Sadrianint ar8xxx_get_port_vlan(struct arswitch_softc *sc, uint32_t *ports, int vid);
45279790Sadrianint ar8xxx_set_port_vlan(struct arswitch_softc *sc, uint32_t ports, int vid);
46279790Sadrian
47253572Sloos#endif	/* __ARSWITCH_VLANS_H__ */
48