Ejemplo n.º 1
0
GT_STATUS gatuGetIntStatus
(
    IN GT_QD_DEV          *dev,
    OUT GT_ATU_INT_STATUS *atuIntStatus
)
{
    GT_STATUS       retVal;

    DBG_INFO(("gatuGetIntStatus Called.\n"));

    /* check if device supports this feature */
    if (!IS_IN_DEV_GROUP(dev,DEV_GIGABIT_MANAGED_SWITCH|DEV_ENHANCED_FE_SWITCH))
    {
        DBG_INFO(("GT_NOT_SUPPORTED\n"));
        return GT_NOT_SUPPORTED;
    }

    retVal = gatuGetViolation(dev,atuIntStatus);
    if(retVal != GT_OK)
    {
        DBG_INFO(("Failed.\n"));
    }
    else
    {
        DBG_INFO(("OK.\n"));
    }

    return retVal;
}
Ejemplo n.º 2
0
int get_violation_source_macaddr(u8 mac[6], u16 *portid)
{
	int  ret = LR_ERR_NONE;
#ifdef MARVELL_SWITCH
	GT_STATUS retVal;
	GT_ATU_INT_STATUS  atuIntEntry;
	memset(&atuIntEntry, 0, sizeof(GT_ATU_INT_STATUS));

	retVal = gatuGetViolation(dev, &atuIntEntry);

	if(retVal == GT_NOT_SUPPORTED)
		return LR_NOT_SUPPORT;

	if(retVal != GT_OK){
		return LR_OPR_FAILD;
	}

	memcpy(mac, atuIntEntry.macAddr.arEther, 6);

	*portid = atuIntEntry.spid;

#else
#endif
	return LR_ERR_NONE;
}