require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&MOS_MCAST_TABLE)) {
    sub MOS_MCAST_TABLE () {	0x;}
}
unless(defined(&MOS_IPG0)) {
    sub MOS_IPG0 () {	0x8;}
}
unless(defined(&MOS_IPG1)) {
    sub MOS_IPG1 () {	0x9;}
}
unless(defined(&MOS_PHY_DATA0)) {
    sub MOS_PHY_DATA0 () {	0xa;}
}
unless(defined(&MOS_PHY_DATA1)) {
    sub MOS_PHY_DATA1 () {	0xb;}
}
unless(defined(&MOS_PHY_CTL)) {
    sub MOS_PHY_CTL () {	0xc;}
}
unless(defined(&MOS_PHY_STS)) {
    sub MOS_PHY_STS () {	0xd;}
}
unless(defined(&MOS_PHY_DATA)) {
    sub MOS_PHY_DATA () {	 &MOS_PHY_DATA0;}
}
unless(defined(&MOS_CTL)) {
    sub MOS_CTL () {	0xe;}
}
unless(defined(&MOS_MAC0)) {
    sub MOS_MAC0 () {	0xf;}
}
unless(defined(&MOS_MAC1)) {
    sub MOS_MAC1 () {	0x10;}
}
unless(defined(&MOS_MAC2)) {
    sub MOS_MAC2 () {	0x11;}
}
unless(defined(&MOS_MAC3)) {
    sub MOS_MAC3 () {	0x12;}
}
unless(defined(&MOS_MAC4)) {
    sub MOS_MAC4 () {	0x13;}
}
unless(defined(&MOS_MAC5)) {
    sub MOS_MAC5 () {	0x14;}
}
unless(defined(&MOS_MAC)) {
    sub MOS_MAC () {	 &MOS_MAC0;}
}
unless(defined(&MOS_FRAME_DROP_CNT)) {
    sub MOS_FRAME_DROP_CNT () {	0x15;}
}
unless(defined(&MOS_PAUSE_TRHD)) {
    sub MOS_PAUSE_TRHD () {	0x16;}
}
unless(defined(&MOS_PHYCTL_PHYADDR)) {
    sub MOS_PHYCTL_PHYADDR () {	0x1f;}
}
unless(defined(&MOS_PHYCTL_WRITE)) {
    sub MOS_PHYCTL_WRITE () {	0x20;}
}
unless(defined(&MOS_PHYCTL_READ)) {
    sub MOS_PHYCTL_READ () {	0x40;}
}
unless(defined(&MOS_PHYSTS_PHYREG)) {
    sub MOS_PHYSTS_PHYREG () {	0x1f;}
}
unless(defined(&MOS_PHYSTS_READY)) {
    sub MOS_PHYSTS_READY () {	0x40;}
}
unless(defined(&MOS_PHYSTS_PENDING)) {
    sub MOS_PHYSTS_PENDING () {	0x80;}
}
unless(defined(&MOS_CTL_RX_PROMISC)) {
    sub MOS_CTL_RX_PROMISC () {	0x1;}
}
unless(defined(&MOS_CTL_ALLMULTI)) {
    sub MOS_CTL_ALLMULTI () {	0x2;}
}
unless(defined(&MOS_CTL_SLEEP)) {
    sub MOS_CTL_SLEEP () {	0x4;}
}
unless(defined(&MOS_CTL_TX_ENB)) {
    sub MOS_CTL_TX_ENB () {	0x8;}
}
unless(defined(&MOS_CTL_RX_ENB)) {
    sub MOS_CTL_RX_ENB () {	0x10;}
}
unless(defined(&MOS_CTL_FDX_ENB)) {
    sub MOS_CTL_FDX_ENB () {	0x20;}
}
unless(defined(&MOS_CTL_SPEEDSEL)) {
    sub MOS_CTL_SPEEDSEL () {	0x40;}
}
unless(defined(&MOS_CTL_BS_ENB)) {
    sub MOS_CTL_BS_ENB () {	0x80;}
}
unless(defined(&MOS_RXSTS_SHORT_FRAME)) {
    sub MOS_RXSTS_SHORT_FRAME () {	0x1;}
}
unless(defined(&MOS_RXSTS_LENGTH_ERROR)) {
    sub MOS_RXSTS_LENGTH_ERROR () {	0x2;}
}
unless(defined(&MOS_RXSTS_ALIGN_ERROR)) {
    sub MOS_RXSTS_ALIGN_ERROR () {	0x4;}
}
unless(defined(&MOS_RXSTS_CRC_ERROR)) {
    sub MOS_RXSTS_CRC_ERROR () {	0x8;}
}
unless(defined(&MOS_RXSTS_LARGE_FRAME)) {
    sub MOS_RXSTS_LARGE_FRAME () {	0x10;}
}
unless(defined(&MOS_RXSTS_VALID)) {
    sub MOS_RXSTS_VALID () {	0x20;}
}
unless(defined(&MOS_RXSTS_MASK)) {
    sub MOS_RXSTS_MASK () {	0x3d;}
}
unless(defined(&MOS_PAUSE_TRHD_DEFAULT)) {
    sub MOS_PAUSE_TRHD_DEFAULT () {	0;}
}
unless(defined(&MOS_PAUSE_REWRITES)) {
    sub MOS_PAUSE_REWRITES () {	3;}
}
unless(defined(&MOS_TIMEOUT)) {
    sub MOS_TIMEOUT () {	1000;}
}
unless(defined(&MOS_RX_LIST_CNT)) {
    sub MOS_RX_LIST_CNT () {	1;}
}
unless(defined(&MOS_TX_LIST_CNT)) {
    sub MOS_TX_LIST_CNT () {	1;}
}
unless(defined(&MOS_BUFSZ)) {
    sub MOS_BUFSZ () {	( &ETHER_MAX_LEN+1);}
}
unless(defined(&MOS_ENDPT_RX)) {
    sub MOS_ENDPT_RX () {	0;}
}
unless(defined(&MOS_ENDPT_TX)) {
    sub MOS_ENDPT_TX () {	1;}
}
unless(defined(&MOS_ENDPT_INTR)) {
    sub MOS_ENDPT_INTR () {	2;}
}
unless(defined(&MOS_ENDPT_MAX)) {
    sub MOS_ENDPT_MAX () {	3;}
}
unless(defined(&MOS_UR_READREG)) {
    sub MOS_UR_READREG () {	0xe;}
}
unless(defined(&MOS_UR_WRITEREG)) {
    sub MOS_UR_WRITEREG () {	0xd;}
}
unless(defined(&MOS_CONFIG_NO)) {
    sub MOS_CONFIG_NO () {	1;}
}
unless(defined(&MOS_IFACE_IDX)) {
    sub MOS_IFACE_IDX () {	0;}
}
unless(defined(&MCS7730)) {
    sub MCS7730 () {	0x1;}
}
unless(defined(&MCS7830)) {
    sub MCS7830 () {	0x2;}
}
unless(defined(&MOS_INC)) {
    sub MOS_INC {
	my($x, $y) = @_;
	eval q(($x) = ($x + 1) % $y);
    }
}
unless(defined(&GET_MII)) {
    sub GET_MII {
	my($sc) = @_;
	eval q((($sc)-> &mos_mii));
    }
}
unless(defined(&GET_IFP)) {
    sub GET_IFP {
	my($sc) = @_;
	eval q((($sc)-> ($arpcom->{ac_if})));
    }
}
1;
