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#ifndef _ATHENA_PORTVLAN_H 18#define _ATHENA_PORTVLAN_H 19 20#ifdef __cplusplus 21extern "C" { 22#endif /* __cplusplus */ 23 24#include "fal/fal_portvlan.h" 25 26 sw_error_t 27 athena_portvlan_init(a_uint32_t dev_id); 28 29#ifdef IN_PORTVLAN 30#define ATHENA_PORTVLAN_INIT(rv, dev_id) \ 31 { \ 32 rv = athena_portvlan_init(dev_id); \ 33 SW_RTN_ON_ERROR(rv); \ 34 } 35#else 36#define ATHENA_PORTVLAN_INIT(rv, dev_id) 37#endif 38 39#ifdef HSL_STANDALONG 40 41 42 HSL_LOCAL sw_error_t 43 athena_port_1qmode_set(a_uint32_t dev_id, fal_port_t port_id, 44 fal_pt_1qmode_t port_1qmode); 45 46 47 48 HSL_LOCAL sw_error_t 49 athena_port_1qmode_get(a_uint32_t dev_id, fal_port_t port_id, 50 fal_pt_1qmode_t * pport_1qmode); 51 52 53 54 HSL_LOCAL sw_error_t 55 athena_port_egvlanmode_set(a_uint32_t dev_id, fal_port_t port_id, 56 fal_pt_1q_egmode_t port_egvlanmode); 57 58 59 60 HSL_LOCAL sw_error_t 61 athena_port_egvlanmode_get(a_uint32_t dev_id, fal_port_t port_id, 62 fal_pt_1q_egmode_t * pport_egvlanmode); 63 64 65 66 HSL_LOCAL sw_error_t 67 athena_portvlan_member_add(a_uint32_t dev_id, fal_port_t port_id, 68 a_uint32_t mem_port_id); 69 70 71 72 HSL_LOCAL sw_error_t 73 athena_portvlan_member_del(a_uint32_t dev_id, fal_port_t port_id, 74 a_uint32_t mem_port_id); 75 76 77 78 HSL_LOCAL sw_error_t 79 athena_portvlan_member_update(a_uint32_t dev_id, fal_port_t port_id, 80 fal_pbmp_t mem_port_map); 81 82 83 84 HSL_LOCAL sw_error_t 85 athena_portvlan_member_get(a_uint32_t dev_id, fal_port_t port_id, 86 fal_pbmp_t *mem_port_map); 87 88#endif 89 90#ifdef __cplusplus 91} 92#endif /* __cplusplus */ 93 94#endif /* _ATHENA_PORTVLAN_H */ 95