xref: /freebsd/sys/compat/linuxkpi/common/include/linux/ethtool.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
10c37ffdaSBjoern A. Zeeb /*-
20c37ffdaSBjoern A. Zeeb  * SPDX-License-Identifier: BSD-2-Clause
30c37ffdaSBjoern A. Zeeb  *
40c37ffdaSBjoern A. Zeeb  * Copyright (c) 2022 Bjoern A. Zeeb
50c37ffdaSBjoern A. Zeeb  *
60c37ffdaSBjoern A. Zeeb  * Redistribution and use in source and binary forms, with or without
70c37ffdaSBjoern A. Zeeb  * modification, are permitted provided that the following conditions
80c37ffdaSBjoern A. Zeeb  * are met:
90c37ffdaSBjoern A. Zeeb  * 1. Redistributions of source code must retain the above copyright
100c37ffdaSBjoern A. Zeeb  *    notice, this list of conditions and the following disclaimer.
110c37ffdaSBjoern A. Zeeb  * 2. Redistributions in binary form must reproduce the above copyright
120c37ffdaSBjoern A. Zeeb  *    notice, this list of conditions and the following disclaimer in the
130c37ffdaSBjoern A. Zeeb  *    documentation and/or other materials provided with the distribution.
140c37ffdaSBjoern A. Zeeb  *
150c37ffdaSBjoern A. Zeeb  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
160c37ffdaSBjoern A. Zeeb  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
170c37ffdaSBjoern A. Zeeb  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
180c37ffdaSBjoern A. Zeeb  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
190c37ffdaSBjoern A. Zeeb  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
200c37ffdaSBjoern A. Zeeb  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
210c37ffdaSBjoern A. Zeeb  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
220c37ffdaSBjoern A. Zeeb  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
230c37ffdaSBjoern A. Zeeb  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
240c37ffdaSBjoern A. Zeeb  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
250c37ffdaSBjoern A. Zeeb  * SUCH DAMAGE.
260c37ffdaSBjoern A. Zeeb  */
270c37ffdaSBjoern A. Zeeb 
280c37ffdaSBjoern A. Zeeb #ifndef _LINUXKPI_LINUX_ETHTOOL_H_
290c37ffdaSBjoern A. Zeeb #define	_LINUXKPI_LINUX_ETHTOOL_H_
300c37ffdaSBjoern A. Zeeb 
310c37ffdaSBjoern A. Zeeb #include <linux/types.h>
320c37ffdaSBjoern A. Zeeb 
33*1b91eba3SBjoern A. Zeeb #define	ETH_GSTRING_LEN	(2 * IF_NAMESIZE)	/* Increase if not large enough */
34*1b91eba3SBjoern A. Zeeb 
35*1b91eba3SBjoern A. Zeeb #define	ETHTOOL_FWVERS_LEN	32
360c37ffdaSBjoern A. Zeeb 
370c37ffdaSBjoern A. Zeeb struct ethtool_stats {
380c37ffdaSBjoern A. Zeeb 	uint8_t __dummy[0];
390c37ffdaSBjoern A. Zeeb };
400c37ffdaSBjoern A. Zeeb 
41*1b91eba3SBjoern A. Zeeb enum ethtool_ss {
42*1b91eba3SBjoern A. Zeeb 	ETH_SS_STATS,
43*1b91eba3SBjoern A. Zeeb };
44*1b91eba3SBjoern A. Zeeb 
45*1b91eba3SBjoern A. Zeeb struct ethtool_drvinfo {
46*1b91eba3SBjoern A. Zeeb 	char			driver[32];
47*1b91eba3SBjoern A. Zeeb 	char			version[32];
48*1b91eba3SBjoern A. Zeeb 	char			fw_version[ETHTOOL_FWVERS_LEN];
49*1b91eba3SBjoern A. Zeeb 	char			bus_info[32];
50*1b91eba3SBjoern A. Zeeb };
51*1b91eba3SBjoern A. Zeeb 
52*1b91eba3SBjoern A. Zeeb struct net_device;
53*1b91eba3SBjoern A. Zeeb struct ethtool_ops {
54*1b91eba3SBjoern A. Zeeb 	void(*get_drvinfo)(struct net_device *, struct ethtool_drvinfo *);
55*1b91eba3SBjoern A. Zeeb };
56*1b91eba3SBjoern A. Zeeb 
570c37ffdaSBjoern A. Zeeb #endif	/* _LINUXKPI_LINUX_ETHTOOL_H_ */
58