2 * BCM44XX Ethernet Windows device driver custom OID definitions.
4 * Copyright (C) 2009, Broadcom Corporation
7 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
11 * $Id: etioctl.h,v 13.14.2.2 2009/05/14 02:06:08 Exp $
19 * Duplicate a few definitions that irelay requires from epiioctl.h here
20 * so caller doesn't have to include this file and epiioctl.h .
21 * If this grows any more, it would be time to move these irelay-specific
22 * definitions out of the epiioctl.h and into a separate driver common file.
24 #ifndef EPICTRL_COOKIE
25 #define EPICTRL_COOKIE 0xABADCEDE
28 /* common ioctl definitions */
33 #define ETCSETMSGLEVEL 4
46 * A set of iovars defined for ET set/get
48 #define IOV_ET_POWER_SAVE_MODE 1
51 #define SIOCSETCUP (SIOCDEVPRIVATE + ETCUP)
52 #define SIOCSETCDOWN (SIOCDEVPRIVATE + ETCDOWN)
53 #define SIOCSETCLOOP (SIOCDEVPRIVATE + ETCLOOP)
54 #define SIOCGETCDUMP (SIOCDEVPRIVATE + ETCDUMP)
55 #define SIOCSETCSETMSGLEVEL (SIOCDEVPRIVATE + ETCSETMSGLEVEL)
56 #define SIOCSETCPROMISC (SIOCDEVPRIVATE + ETCPROMISC)
57 #define SIOCSETGETVAR (SIOCDEVPRIVATE + ETCVAR)
58 #define SIOCSETCSPEED (SIOCDEVPRIVATE + ETCSPEED)
59 #define SIOCTXGEN (SIOCDEVPRIVATE + 8)
60 #define SIOCGETCPHYRD (SIOCDEVPRIVATE + ETCPHYRD)
61 #define SIOCSETCPHYWR (SIOCDEVPRIVATE + ETCPHYWR)
62 #define SIOCSETCQOS (SIOCDEVPRIVATE + ETCQOS)
63 #define SIOCGETCPHYRD2 (SIOCDEVPRIVATE + ETCPHYRD2)
64 #define SIOCSETCPHYWR2 (SIOCDEVPRIVATE + ETCPHYWR2)
65 #define SIOCGETCROBORD (SIOCDEVPRIVATE + ETCROBORD)
66 #define SIOCSETCROBOWR (SIOCDEVPRIVATE + ETCROBOWR)
68 /* structure to send a generic var set/get */
69 typedef struct et_var_s
{
76 /* arg to SIOCTXGEN */
78 uint32 num
; /* number of frames to send */
79 uint32 delay
; /* delay in microseconds between sending each */
80 uint32 size
; /* size of ether frame to send */
81 uchar buf
[1514]; /* starting ether frame data */
89 * 0xFF - implementation specific OID
90 * 0xE4 - first byte of Broadcom PCI vendor ID
91 * 0x14 - second byte of Broadcom PCI vendor ID
92 * 0xXX - the custom OID number
94 #define ET_OID_BASE 0xFFE41400 /* OID Base for ET */
96 #define OID_ET_UP (ET_OID_BASE + ETCUP)
97 #define OID_ET_DOWN (ET_OID_BASE + ETCDOWN)
98 #define OID_ET_LOOP (ET_OID_BASE + ETCLOOP)
99 #define OID_ET_DUMP (ET_OID_BASE + ETCDUMP)
100 #define OID_ET_SETMSGLEVEL (ET_OID_BASE + ETCSETMSGLEVEL)
101 #define OID_ET_PROMISC (ET_OID_BASE + ETCPROMISC)
102 #define OID_ET_TXDOWN (ET_OID_BASE + 6)
103 #define OID_ET_SPEED (ET_OID_BASE + ETCSPEED)
104 #define OID_ET_GETINSTANCE (ET_OID_BASE + 8)
105 #define OID_ET_SETCALLBACK (ET_OID_BASE + 9)
106 #define OID_ET_UNSETCALLBACK (ET_OID_BASE + 10)
108 #define IS_ET_OID(oid) (((oid) & 0xFFFFFF00) == 0xFFE41400)
110 #define ET_ISQUERYOID(oid) ((oid == OID_ET_DUMP) || (oid == OID_ET_GETINSTANCE))
112 /* OID_ET_SETCALLBACK data type */
113 typedef struct et_cb
{
114 void (*fn
)(void *, int); /* Callback function */
115 void *context
; /* Passed to callback function */
118 #endif /* _etioctl_h_ */