18c2ecf20Sopenharmony_ci/******************************************************************************
28c2ecf20Sopenharmony_ci * This software may be used and distributed according to the terms of
38c2ecf20Sopenharmony_ci * the GNU General Public License (GPL), incorporated herein by reference.
48c2ecf20Sopenharmony_ci * Drivers based on or derived from this code fall under the GPL and must
58c2ecf20Sopenharmony_ci * retain the authorship, copyright and license notice.  This file is not
68c2ecf20Sopenharmony_ci * a complete program and may only be used when the entire operating
78c2ecf20Sopenharmony_ci * system is licensed under the GPL.
88c2ecf20Sopenharmony_ci * See the file COPYING in this distribution for more information.
98c2ecf20Sopenharmony_ci *
108c2ecf20Sopenharmony_ci * vxge-ethtool.h: Driver for Exar Corp's X3100 Series 10GbE PCIe I/O
118c2ecf20Sopenharmony_ci *                 Virtualized Server Adapter.
128c2ecf20Sopenharmony_ci * Copyright(c) 2002-2010 Exar Corp.
138c2ecf20Sopenharmony_ci ******************************************************************************/
148c2ecf20Sopenharmony_ci#ifndef _VXGE_ETHTOOL_H
158c2ecf20Sopenharmony_ci#define _VXGE_ETHTOOL_H
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#include "vxge-main.h"
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci/* Ethtool related variables and Macros. */
208c2ecf20Sopenharmony_cistatic int vxge_ethtool_get_sset_count(struct net_device *dev, int sset);
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci#define VXGE_TITLE_LEN			5
238c2ecf20Sopenharmony_ci#define VXGE_HW_VPATH_STATS_LEN 	27
248c2ecf20Sopenharmony_ci#define VXGE_HW_AGGR_STATS_LEN  	13
258c2ecf20Sopenharmony_ci#define VXGE_HW_PORT_STATS_LEN  	94
268c2ecf20Sopenharmony_ci#define VXGE_HW_VPATH_TX_STATS_LEN	19
278c2ecf20Sopenharmony_ci#define VXGE_HW_VPATH_RX_STATS_LEN	42
288c2ecf20Sopenharmony_ci#define VXGE_SW_STATS_LEN		60
298c2ecf20Sopenharmony_ci#define VXGE_HW_STATS_LEN	(VXGE_HW_VPATH_STATS_LEN +\
308c2ecf20Sopenharmony_ci				VXGE_HW_AGGR_STATS_LEN +\
318c2ecf20Sopenharmony_ci				VXGE_HW_PORT_STATS_LEN +\
328c2ecf20Sopenharmony_ci				VXGE_HW_VPATH_TX_STATS_LEN +\
338c2ecf20Sopenharmony_ci				VXGE_HW_VPATH_RX_STATS_LEN)
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#define DRIVER_STAT_LEN (sizeof(ethtool_driver_stats_keys)/ETH_GSTRING_LEN)
368c2ecf20Sopenharmony_ci#define STAT_LEN (VXGE_HW_STATS_LEN + DRIVER_STAT_LEN + VXGE_SW_STATS_LEN)
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci/* Maximum flicker time of adapter LED */
398c2ecf20Sopenharmony_ci#define VXGE_MAX_FLICKER_TIME (60 * HZ) /* 60 seconds */
408c2ecf20Sopenharmony_ci#define VXGE_FLICKER_ON		1
418c2ecf20Sopenharmony_ci#define VXGE_FLICKER_OFF	0
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci#define vxge_add_string(fmt, size, buf, ...) {\
448c2ecf20Sopenharmony_ci	snprintf(buf + *size, ETH_GSTRING_LEN, fmt, __VA_ARGS__); \
458c2ecf20Sopenharmony_ci	*size += ETH_GSTRING_LEN; \
468c2ecf20Sopenharmony_ci}
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci#endif /*_VXGE_ETHTOOL_H*/
49