1/* 2 * Copyright (c) 2012, The Linux Foundation. All rights reserved. 3 * Permission to use, copy, modify, and/or distribute this software for 4 * any purpose with or without fee is hereby granted, provided that the 5 * above copyright notice and this permission notice appear in all copies. 6 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 7 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 8 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 9 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 10 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 11 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 12 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 13 */ 14 15 16 17/** 18 * @defgroup garuda_port_vlan GARUDA_PORT_VLAN 19 * @{ 20 */ 21#ifndef _GARUDA_PORTVLAN_H_ 22#define _GARUDA_PORTVLAN_H_ 23 24#ifdef __cplusplus 25extern "C" { 26#endif /* __cplusplus */ 27 28#include "fal/fal_portvlan.h" 29 30 sw_error_t garuda_portvlan_init(a_uint32_t dev_id); 31 32#ifdef IN_PORTVLAN 33#define GARUDA_PORTVLAN_INIT(rv, dev_id) \ 34 { \ 35 rv = garuda_portvlan_init(dev_id); \ 36 SW_RTN_ON_ERROR(rv); \ 37 } 38#else 39#define GARUDA_PORTVLAN_INIT(rv, dev_id) 40#endif 41 42#ifdef HSL_STANDALONG 43 44 45 HSL_LOCAL sw_error_t 46 garuda_port_1qmode_set(a_uint32_t dev_id, fal_port_t port_id, 47 fal_pt_1qmode_t port_1qmode); 48 49 50 51 HSL_LOCAL sw_error_t 52 garuda_port_1qmode_get(a_uint32_t dev_id, fal_port_t port_id, 53 fal_pt_1qmode_t * pport_1qmode); 54 55 56 57 HSL_LOCAL sw_error_t 58 garuda_port_egvlanmode_set(a_uint32_t dev_id, fal_port_t port_id, 59 fal_pt_1q_egmode_t port_egvlanmode); 60 61 62 63 HSL_LOCAL sw_error_t 64 garuda_port_egvlanmode_get(a_uint32_t dev_id, fal_port_t port_id, 65 fal_pt_1q_egmode_t * pport_egvlanmode); 66 67 68 69 HSL_LOCAL sw_error_t 70 garuda_portvlan_member_add(a_uint32_t dev_id, fal_port_t port_id, 71 a_uint32_t mem_port_id); 72 73 74 75 HSL_LOCAL sw_error_t 76 garuda_portvlan_member_del(a_uint32_t dev_id, fal_port_t port_id, 77 a_uint32_t mem_port_id); 78 79 80 81 HSL_LOCAL sw_error_t 82 garuda_portvlan_member_update(a_uint32_t dev_id, fal_port_t port_id, 83 fal_pbmp_t mem_port_map); 84 85 86 87 HSL_LOCAL sw_error_t 88 garuda_portvlan_member_get(a_uint32_t dev_id, fal_port_t port_id, 89 fal_pbmp_t * mem_port_map); 90 91 92 93 HSL_LOCAL sw_error_t 94 garuda_port_default_vid_set(a_uint32_t dev_id, fal_port_t port_id, 95 a_uint32_t vid); 96 97 98 99 HSL_LOCAL sw_error_t 100 garuda_port_default_vid_get(a_uint32_t dev_id, fal_port_t port_id, 101 a_uint32_t * vid); 102 103 104 105 HSL_LOCAL sw_error_t 106 garuda_port_force_default_vid_set(a_uint32_t dev_id, fal_port_t port_id, 107 a_bool_t enable); 108 109 110 111 HSL_LOCAL sw_error_t 112 garuda_port_force_default_vid_get(a_uint32_t dev_id, fal_port_t port_id, a_bool_t * enable); 113 114 115 116 HSL_LOCAL sw_error_t 117 garuda_port_force_portvlan_set(a_uint32_t dev_id, fal_port_t port_id, 118 a_bool_t enable); 119 120 121 HSL_LOCAL sw_error_t 122 garuda_port_force_portvlan_get(a_uint32_t dev_id, fal_port_t port_id, a_bool_t * enable); 123 124 125 126 HSL_LOCAL sw_error_t 127 garuda_port_nestvlan_set(a_uint32_t dev_id, fal_port_t port_id, 128 a_bool_t enable); 129 130 131 132 HSL_LOCAL sw_error_t 133 garuda_port_nestvlan_get(a_uint32_t dev_id, fal_port_t port_id, 134 a_bool_t * enable); 135 136 HSL_LOCAL sw_error_t 137 garuda_nestvlan_tpid_set(a_uint32_t dev_id, a_uint32_t tpid); 138 139 140 HSL_LOCAL sw_error_t 141 garuda_nestvlan_tpid_get(a_uint32_t dev_id, a_uint32_t * tpid); 142 143#endif 144 145#ifdef __cplusplus 146} 147#endif /* __cplusplus */ 148#endif /* _ATHENA_PORTVLAN_H */ 149/** 150 * @} 151 */ 152