1b9f07b86SLuiz Otavio O Souza /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 3718cf2ccSPedro F. Giffuni * 4b9f07b86SLuiz Otavio O Souza * Copyright (c) 2013 Luiz Otavio O Souza. 5b9f07b86SLuiz Otavio O Souza * Copyright (c) 2011-2012 Stefan Bethke. 6b9f07b86SLuiz Otavio O Souza * All rights reserved. 7b9f07b86SLuiz Otavio O Souza * 8b9f07b86SLuiz Otavio O Souza * Redistribution and use in source and binary forms, with or without 9b9f07b86SLuiz Otavio O Souza * modification, are permitted provided that the following conditions 10b9f07b86SLuiz Otavio O Souza * are met: 11b9f07b86SLuiz Otavio O Souza * 1. Redistributions of source code must retain the above copyright 12b9f07b86SLuiz Otavio O Souza * notice, this list of conditions and the following disclaimer. 13b9f07b86SLuiz Otavio O Souza * 2. Redistributions in binary form must reproduce the above copyright 14b9f07b86SLuiz Otavio O Souza * notice, this list of conditions and the following disclaimer in the 15b9f07b86SLuiz Otavio O Souza * documentation and/or other materials provided with the distribution. 16b9f07b86SLuiz Otavio O Souza * 17b9f07b86SLuiz Otavio O Souza * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18b9f07b86SLuiz Otavio O Souza * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19b9f07b86SLuiz Otavio O Souza * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20b9f07b86SLuiz Otavio O Souza * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21b9f07b86SLuiz Otavio O Souza * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22b9f07b86SLuiz Otavio O Souza * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23b9f07b86SLuiz Otavio O Souza * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24b9f07b86SLuiz Otavio O Souza * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25b9f07b86SLuiz Otavio O Souza * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26b9f07b86SLuiz Otavio O Souza * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27b9f07b86SLuiz Otavio O Souza * SUCH DAMAGE. 28b9f07b86SLuiz Otavio O Souza */ 29b9f07b86SLuiz Otavio O Souza #ifndef __ARSWITCH_VLANS_H__ 30b9f07b86SLuiz Otavio O Souza #define __ARSWITCH_VLANS_H__ 31b9f07b86SLuiz Otavio O Souza 326dcbabd7SAdrian Chadd void ar8xxx_reset_vlans(struct arswitch_softc *); 336dcbabd7SAdrian Chadd int ar8xxx_getvgroup(struct arswitch_softc *, etherswitch_vlangroup_t *); 346dcbabd7SAdrian Chadd int ar8xxx_setvgroup(struct arswitch_softc *, etherswitch_vlangroup_t *); 356dcbabd7SAdrian Chadd int ar8xxx_get_pvid(struct arswitch_softc *, int, int *); 366dcbabd7SAdrian Chadd int ar8xxx_set_pvid(struct arswitch_softc *, int, int); 37b9f07b86SLuiz Otavio O Souza 38f35f94f4SAdrian Chadd int ar8xxx_flush_dot1q_vlan(struct arswitch_softc *sc); 39f35f94f4SAdrian Chadd int ar8xxx_purge_dot1q_vlan(struct arswitch_softc *sc, int vid); 40036e1c76SAdrian Chadd int ar8xxx_get_dot1q_vlan(struct arswitch_softc *sc, uint32_t *ports, 41036e1c76SAdrian Chadd uint32_t *untagged_ports, int vid); 42036e1c76SAdrian Chadd int ar8xxx_set_dot1q_vlan(struct arswitch_softc *sc, uint32_t ports, 43036e1c76SAdrian Chadd uint32_t untagged_ports, int vid); 44749cac13SAdrian Chadd int ar8xxx_get_port_vlan(struct arswitch_softc *sc, uint32_t *ports, int vid); 45749cac13SAdrian Chadd int ar8xxx_set_port_vlan(struct arswitch_softc *sc, uint32_t ports, int vid); 46749cac13SAdrian Chadd 47b9f07b86SLuiz Otavio O Souza #endif /* __ARSWITCH_VLANS_H__ */ 48