FreeBSD/sys/dev/etherswitch/arswitch/arswitch_7240.c
/*
 * Initialise other global values for the AR7240.
 */
Initialise other global values for the AR7240.
Initialise other global values for the AR7240 .
static int
ar7240_hw_global_setup(struct arswitch_softc *sc)
{
	arswitch_writereg(sc->sc_dev, AR8X16_REG_CPU_PORT,
	    AR8X16_CPU_PORT_EN | AR8X16_CPU_MIRROR_DIS);
	arswitch_writereg(sc->sc_dev, AR8X16_REG_TAG_PRIO, 0xfa50);
	arswitch_writereg(sc->sc_dev, AR8X16_REG_FLOOD_MASK,
	    AR8X16_FLOOD_MASK_BCAST_TO_CPU | 0x003f003f);
	arswitch_modifyreg(sc->sc_dev, AR8X16_REG_GLOBAL_CTRL,
	    AR7240_GLOBAL_CTRL_MTU_MASK,
	    SM(1536, AR7240_GLOBAL_CTRL_MTU_MASK));
	arswitch_modifyreg(sc->sc_dev, AR8X16_REG_SERVICE_TAG,
	    AR8X16_SERVICE_TAG_MASK, 0);
	return (0);
}
static int ar7240_hw_global_setup ( struct arswitch_softc * sc ) { arswitch_writereg ( sc -> sc_dev , AR8X16_REG_CPU_PORT , AR8X16_CPU_PORT_EN | AR8X16_CPU_MIRROR_DIS ) ; arswitch_writereg ( sc -> sc_dev , AR8X16_REG_TAG_PRIO , 0xfa50 ) ; arswitch_writereg ( sc -> sc_dev , AR8X16_REG_FLOOD_MASK , AR8X16_FLOOD_MASK_BCAST_TO_CPU | 0x003f003f ) ; arswitch_modifyreg ( sc -> sc_dev , AR8X16_REG_GLOBAL_CTRL , AR7240_GLOBAL_CTRL_MTU_MASK , SM ( 1536 , AR7240_GLOBAL_CTRL_MTU_MASK ) ) ; arswitch_modifyreg ( sc -> sc_dev , AR8X16_REG_SERVICE_TAG , AR8X16_SERVICE_TAG_MASK , 0 ) ; return ( 0 ) ; }
Initialise other global values for the AR7240.
Initialise other global values for the AR7240 .
/* Enable CPU port; disable mirror port */ /* Setup TAG priority mapping */ /* Enable broadcast frames transmitted to the CPU */ /* Setup MTU */ /* Service Tag */