www.usr.com/support/gpl/USR9107_release.1.4.tar.gz
[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 #if __cplusplus
30 extern "C" {
31 #endif
32
33 #define LINKSTATE_DOWN      0
34 #define LINKSTATE_UP        1
35 /*
36 *  Note, we need CHIP_6348 so that user application can also use this.
37 */
38 #if defined(CHIP_6348) || defined(CONFIG_BCM96348)
39 #define NR_RX_BDS              120 
40 #else
41 #define NR_RX_BDS               80
42 #endif
43 #define NR_TX_BDS               200
44 /*---------------------------------------------------------------------*/
45 /* Ethernet Switch Type                                                */
46 /*---------------------------------------------------------------------*/
47 #define ESW_TYPE_UNDEFINED                  0
48 #define ESW_TYPE_BCM5325M                   1
49 #define ESW_TYPE_BCM5325E                   2
50 #define ESW_TYPE_BCM5325F                   3
51
52 /*
53  * Ioctl definitions.
54  */
55 /* reserved SIOCDEVPRIVATE */
56 enum {
57     SIOCGLINKSTATE = SIOCDEVPRIVATE + 1,
58     SIOCSCLEARMIBCNTR,
59     SIOCGIFTRANSSTART,
60     SIOCMIBINFO,
61     SIOCSDUPLEX,        /* 0: auto 1: full 2: half */
62     SIOCSSPEED,         /* 0: auto 1: 100mbps 2: 10mbps */
63     SIOCCIFSTATS,
64     SIOCGENABLEVLAN,
65     SIOCGDISABLEVLAN,
66     SIOCGQUERYNUMVLANPORTS,
67     SIOCGSWITCHTYPE,
68     SIOCGQUERYNUMPORTS,
69     SIOCGMACTOPORT,
70     SIOCGLINKSTATUS,
71     SIOCLAST
72 };
73
74 #define SPEED_10MBIT        10000000
75 #define SPEED_100MBIT       100000000
76
77 typedef struct IoctlMibInfo
78 {
79     unsigned long ulIfLastChange;
80     unsigned long ulIfSpeed;
81 } IOCTL_MIB_INFO, *PIOCTL_MIB_INFO;
82
83
84 #if __cplusplus
85 }
86 #endif
87
88 #endif /* _IF_NET_H_ */