summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-12-03 12:51:54 +0000
committerhselasky <hselasky@FreeBSD.org>2015-12-03 12:51:54 +0000
commit26e5f8b61896cf7cfe4ba4a9e160b344398c9c12 (patch)
tree36c738cf6ab1eaf41ba6165a185bcf98f5923f4b /sys/compat
parent7e478f47e9fcf4393708e1111c3c84ad230b6cbc (diff)
downloadFreeBSD-src-26e5f8b61896cf7cfe4ba4a9e160b344398c9c12.zip
FreeBSD-src-26e5f8b61896cf7cfe4ba4a9e160b344398c9c12.tar.gz
Add some structures and defines which will be used when decoding small
form factor, SFF, standards compliant ethernet EEPROMs. MFC after: 1 week Obtained from: Linux Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/etherdevice.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/etherdevice.h b/sys/compat/linuxkpi/common/include/linux/etherdevice.h
index 12ea345..c7a6ebe 100644
--- a/sys/compat/linuxkpi/common/include/linux/etherdevice.h
+++ b/sys/compat/linuxkpi/common/include/linux/etherdevice.h
@@ -29,6 +29,25 @@
#include <linux/types.h>
+#define ETH_MODULE_SFF_8079 1
+#define ETH_MODULE_SFF_8079_LEN 256
+#define ETH_MODULE_SFF_8472 2
+#define ETH_MODULE_SFF_8472_LEN 512
+#define ETH_MODULE_SFF_8636 3
+#define ETH_MODULE_SFF_8636_LEN 256
+#define ETH_MODULE_SFF_8436 4
+#define ETH_MODULE_SFF_8436_LEN 256
+
+struct ethtool_eeprom {
+ u32 offset;
+ u32 len;
+};
+
+struct ethtool_modinfo {
+ u32 type;
+ u32 eeprom_len;
+};
+
static inline bool
is_zero_ether_addr(const u8 * addr)
{
OpenPOWER on IntegriCloud