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 * @defgroup shiva_misc SHIVA_MISC 18 * @{ 19 */ 20#ifndef _SHIVA_MISC_H_ 21#define _SHIVA_MISC_H_ 22 23#ifdef __cplusplus 24extern "C" { 25#endif /* __cplusplus */ 26 27#include "fal/fal_misc.h" 28 29 sw_error_t shiva_misc_init(a_uint32_t dev_id); 30 31#ifdef IN_MISC 32#define SHIVA_MISC_INIT(rv, dev_id) \ 33 { \ 34 rv = shiva_misc_init(dev_id); \ 35 SW_RTN_ON_ERROR(rv); \ 36 } 37#else 38#define SHIVA_MISC_INIT(rv, dev_id) 39#endif 40 41#ifdef HSL_STANDALONG 42 43 HSL_LOCAL sw_error_t 44 shiva_arp_status_set(a_uint32_t dev_id, a_bool_t enable); 45 46 47 HSL_LOCAL sw_error_t 48 shiva_arp_status_get(a_uint32_t dev_id, a_bool_t * enable); 49 50 51 HSL_LOCAL sw_error_t 52 shiva_frame_max_size_set(a_uint32_t dev_id, a_uint32_t size); 53 54 55 HSL_LOCAL sw_error_t 56 shiva_frame_max_size_get(a_uint32_t dev_id, a_uint32_t * size); 57 58 59 HSL_LOCAL sw_error_t 60 shiva_port_unk_sa_cmd_set(a_uint32_t dev_id, fal_port_t port_id, 61 fal_fwd_cmd_t cmd); 62 63 64 HSL_LOCAL sw_error_t 65 shiva_port_unk_sa_cmd_get(a_uint32_t dev_id, fal_port_t port_id, 66 fal_fwd_cmd_t * cmd); 67 68 69 HSL_LOCAL sw_error_t 70 shiva_port_unk_uc_filter_set(a_uint32_t dev_id, fal_port_t port_id, 71 a_bool_t enable); 72 73 74 HSL_LOCAL sw_error_t 75 shiva_port_unk_uc_filter_get(a_uint32_t dev_id, fal_port_t port_id, 76 a_bool_t * enable); 77 78 79 HSL_LOCAL sw_error_t 80 shiva_port_unk_mc_filter_set(a_uint32_t dev_id, fal_port_t port_id, 81 a_bool_t enable); 82 83 84 HSL_LOCAL sw_error_t 85 shiva_port_unk_mc_filter_get(a_uint32_t dev_id, fal_port_t port_id, 86 a_bool_t * enable); 87 88 89 HSL_LOCAL sw_error_t 90 shiva_port_bc_filter_set(a_uint32_t dev_id, fal_port_t port_id, 91 a_bool_t enable); 92 93 94 HSL_LOCAL sw_error_t 95 shiva_port_bc_filter_get(a_uint32_t dev_id, fal_port_t port_id, 96 a_bool_t * enable); 97 98 99 HSL_LOCAL sw_error_t 100 shiva_cpu_port_status_set(a_uint32_t dev_id, a_bool_t enable); 101 102 103 HSL_LOCAL sw_error_t 104 shiva_cpu_port_status_get(a_uint32_t dev_id, a_bool_t * enable); 105 106 107 HSL_LOCAL sw_error_t 108 shiva_pppoe_cmd_set(a_uint32_t dev_id, fal_fwd_cmd_t cmd); 109 110 111 HSL_LOCAL sw_error_t 112 shiva_pppoe_cmd_get(a_uint32_t dev_id, fal_fwd_cmd_t * cmd); 113 114 115 HSL_LOCAL sw_error_t 116 shiva_pppoe_status_set(a_uint32_t dev_id, a_bool_t enable); 117 118 119 HSL_LOCAL sw_error_t 120 shiva_pppoe_status_get(a_uint32_t dev_id, a_bool_t * enable); 121 122 123 HSL_LOCAL sw_error_t 124 shiva_port_dhcp_set(a_uint32_t dev_id, fal_port_t port_id, a_bool_t enable); 125 126 127 HSL_LOCAL sw_error_t 128 shiva_port_dhcp_get(a_uint32_t dev_id, fal_port_t port_id, a_bool_t * enable); 129 130 131 HSL_LOCAL sw_error_t 132 shiva_arp_cmd_set(a_uint32_t dev_id, fal_fwd_cmd_t cmd); 133 134 135 HSL_LOCAL sw_error_t 136 shiva_arp_cmd_get(a_uint32_t dev_id, fal_fwd_cmd_t * cmd); 137 138 139 HSL_LOCAL sw_error_t 140 shiva_eapol_cmd_set(a_uint32_t dev_id, fal_fwd_cmd_t cmd); 141 142 143 HSL_LOCAL sw_error_t 144 shiva_eapol_cmd_get(a_uint32_t dev_id, fal_fwd_cmd_t * cmd); 145 146 147 HSL_LOCAL sw_error_t 148 shiva_pppoe_session_add(a_uint32_t dev_id, a_uint32_t session_id, a_bool_t strip_hdr); 149 150 151 HSL_LOCAL sw_error_t 152 shiva_pppoe_session_del(a_uint32_t dev_id, a_uint32_t session_id); 153 154 155 HSL_LOCAL sw_error_t 156 shiva_pppoe_session_get(a_uint32_t dev_id, a_uint32_t session_id, a_bool_t * strip_hdr); 157 158 HSL_LOCAL sw_error_t 159 shiva_eapol_status_set(a_uint32_t dev_id, a_uint32_t port_id, a_bool_t enable); 160 161 HSL_LOCAL sw_error_t 162 shiva_eapol_status_get(a_uint32_t dev_id, a_uint32_t port_id, a_bool_t * enable); 163 164 HSL_LOCAL sw_error_t 165 shiva_ripv1_status_set(a_uint32_t dev_id, a_bool_t enable); 166 167 HSL_LOCAL sw_error_t 168 shiva_ripv1_status_get(a_uint32_t dev_id, a_bool_t * enable); 169 170 HSL_LOCAL sw_error_t 171 shiva_loop_check_status_set(a_uint32_t dev_id, fal_loop_check_time_t time, a_bool_t enable); 172 173 HSL_LOCAL sw_error_t 174 shiva_loop_check_status_get(a_uint32_t dev_id, fal_loop_check_time_t * time, a_bool_t * enable); 175 176 HSL_LOCAL sw_error_t 177 shiva_loop_check_info_get(a_uint32_t dev_id, a_uint32_t * old_port_id, a_uint32_t * new_port_id); 178 179 180#endif 181 182#ifdef __cplusplus 183} 184#endif /* __cplusplus */ 185#endif /* _SHIVA_GEN_H_ */ 186/** 187 * @} 188 */ 189