http://downloads.netgear.com/files/GPL/GPL_Source_V361j_DM111PSP_series_consumer_rele...
[bcm963xx.git] / bcmdrivers / broadcom / include / bcm963xx / bcmnet.h
1 /*
2 <:copyright-gpl
3  Copyright 2002 Broadcom Corp. All Rights Reserved.
4
5  This program is free software; you can distribute it and/or modify it
6  under the terms of the GNU General Public License (Version 2) as
7  published by the Free Software Foundation.
8
9  This program is distributed in the hope it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  for more details.
13
14  You should have received a copy of the GNU General Public License along
15  with this program; if not, write to the Free Software Foundation, Inc.,
16  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 :>
18 */
19 /***********************************************************************/
20 /*                                                                     */
21 /*   MODULE:  bcmnet.h                                                 */
22 /*   DATE:    05/16/02                                                 */
23 /*   PURPOSE: network interface ioctl definition                       */
24 /*                                                                     */
25 /***********************************************************************/
26 #ifndef _IF_NET_H_
27 #define _IF_NET_H_
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #define LINKSTATE_DOWN      0
34 #define LINKSTATE_UP        1
35
36 #ifdef SDRAM_8M
37 #define NR_RX_BDS               48
38 #else
39 #define NR_RX_BDS               120 
40 #endif
41 #define NR_TX_BDS               200
42 /*---------------------------------------------------------------------*/
43 /* Ethernet Switch Type                                                */
44 /*---------------------------------------------------------------------*/
45 #define ESW_TYPE_UNDEFINED                  0
46 #define ESW_TYPE_BCM5325M                   1
47 #define ESW_TYPE_BCM5325E                   2
48 #define ESW_TYPE_BCM5325F                   3
49
50 /*
51  * Ioctl definitions.
52  */
53 /* reserved SIOCDEVPRIVATE */
54 enum {
55     SIOCGLINKSTATE = SIOCDEVPRIVATE + 1,
56     SIOCSCLEARMIBCNTR,
57     SIOCMIBINFO,
58     SIOCSDUPLEX,        /* 0: auto 1: full 2: half */
59     SIOCSSPEED,         /* 0: auto 1: 100mbps 2: 10mbps */
60     SIOCGENABLEVLAN,
61     SIOCGDISABLEVLAN,
62     SIOCGQUERYNUMVLANPORTS,
63     SIOCGSWITCHTYPE,
64     SIOCGQUERYNUMPORTS,
65     SIOCGMACTOPORT,
66     SIOCGLINKSTATUS,
67     SIOCLAST,
68         SIOCGENETSTATE
69 };
70
71 #define SPEED_10MBIT        10000000
72 #define SPEED_100MBIT       100000000
73
74 typedef struct IoctlMibInfo
75 {
76     unsigned long ulIfLastChange;
77     unsigned long ulIfSpeed;
78 } IOCTL_MIB_INFO, *PIOCTL_MIB_INFO;
79
80
81 #ifdef __cplusplus
82 }
83 #endif
84
85 #endif /* _IF_NET_H_ */