#ifndef CHELSIO_T1_COMPAT_H
#define CHELSIO_T1_COMPAT_H
#ifndef ETH_ALEN
#define ETH_ALEN 6
#endif
enum { SPEED_10, SPEED_100, SPEED_1000, SPEED_10000 };
enum { DUPLEX_HALF, DUPLEX_FULL };
enum { AUTONEG_DISABLE, AUTONEG_ENABLE };
#ifndef MII_BMCR
#define MII_BMCR 0x00
#define MII_BMSR 0x01
#define MII_PHYSID1 0x02
#define MII_PHYSID2 0x03
#define MII_ADVERTISE 0x04
#define MII_LPA 0x05
#define BMCR_RESV 0x007f
#define BMCR_CTST 0x0080
#define BMCR_FULLDPLX 0x0100
#define BMCR_ANRESTART 0x0200
#define BMCR_ISOLATE 0x0400
#define BMCR_PDOWN 0x0800
#define BMCR_ANENABLE 0x1000
#define BMCR_SPEED100 0x2000
#define BMCR_LOOPBACK 0x4000
#define BMCR_RESET 0x8000
#define BMSR_ERCAP 0x0001
#define BMSR_JCD 0x0002
#define BMSR_LSTATUS 0x0004
#define BMSR_ANEGCAPABLE 0x0008
#define BMSR_RFAULT 0x0010
#define BMSR_ANEGCOMPLETE 0x0020
#define BMSR_RESV 0x07c0
#define BMSR_10HALF 0x0800
#define BMSR_10FULL 0x1000
#define BMSR_100HALF 0x2000
#define BMSR_100FULL 0x4000
#define BMSR_100BASE4 0x8000
#define ADVERTISE_SLCT 0x001f
#define ADVERTISE_CSMA 0x0001
#define ADVERTISE_10HALF 0x0020
#define ADVERTISE_10FULL 0x0040
#define ADVERTISE_100HALF 0x0080
#define ADVERTISE_100FULL 0x0100
#define ADVERTISE_100BASE4 0x0200
#define ADVERTISE_RESV 0x1c00
#define ADVERTISE_RFAULT 0x2000
#define ADVERTISE_LPACK 0x4000
#define ADVERTISE_NPAGE 0x8000
#endif
#define SUPPORTED_10baseT_Half (1 << 0)
#define SUPPORTED_10baseT_Full (1 << 1)
#define SUPPORTED_100baseT_Half (1 << 2)
#define SUPPORTED_100baseT_Full (1 << 3)
#define SUPPORTED_1000baseT_Half (1 << 4)
#define SUPPORTED_1000baseT_Full (1 << 5)
#define SUPPORTED_10000baseT_Full (1 << 6)
#define SUPPORTED_Autoneg (1 << 7)
#define SUPPORTED_TP (1 << 8)
#define SUPPORTED_FIBRE (1 << 9)
#define SUPPORTED_PAUSE (1 << 10)
#define SUPPORTED_LOOPBACK (1 << 11)
#define ADVERTISED_10baseT_Half (1 << 0)
#define ADVERTISED_10baseT_Full (1 << 1)
#define ADVERTISED_100baseT_Half (1 << 2)
#define ADVERTISED_100baseT_Full (1 << 3)
#define ADVERTISED_1000baseT_Half (1 << 4)
#define ADVERTISED_1000baseT_Full (1 << 5)
#define ADVERTISED_10000baseT_Full (1 << 6)
#define ADVERTISED_Autoneg (1 << 7)
#define ADVERTISED_PAUSE (1 << 10)
#define ADVERTISED_ASYM_PAUSE (1 << 12)
enum { LINK = 1, INTR = 2, HW = 4 };
#ifndef __devinit
#define __devinit
#endif
#ifndef CH_DEVICE
struct pci_device_id {
unsigned short devid;
unsigned short ssid;
unsigned short board_info_index;
};
#define CH_DEVICE_COMMON(devid, ssid, idx) { devid, ssid, idx }
#define CH_DEVICE(devid, ssid, idx) CH_DEVICE_COMMON(devid, ssid, idx)
#endif
#endif