kernels/linux-2.4.0/drivers/net/tokenring/tms380tr.c
/*
 * Check if it is a frame of myself. Compare source address with my current
 * address in reverse direction, and mask out the TR_RII.
 */
Check if it is a frame of myself. Compare source address with my current
address in reverse direction, and mask out the TR_RII.
Check if it is a frame of myself . Compare source address with my current address in reverse direction and mask out the TR_RII .
static unsigned char tms380tr_chk_frame(struct net_device *dev, unsigned char *Addr)
{
	int i;
	for(i = 5; i > 0; i--)
	{
		if(Addr[8 + i] != dev->dev_addr[i])
			return (0);
	}
	if((Addr[8] & ~TR_RII) != (unsigned char)(dev->dev_addr[0]))
		return (0);
	return (1);  
}
static unsigned char tms380tr_chk_frame ( struct net_device * dev , unsigned char * Addr ) { int i ; for ( i = 5 ; i > 0 ; i -- ) { if ( Addr [ 8 + i ] != dev -> dev_addr [ i ] ) return ( 0 ) ; } if ( ( Addr [ 8 ] & ~ TR_RII ) != ( unsigned char ) ( dev -> dev_addr [ 0 ] ) ) return ( 0 ) ; return ( 1 ) ; }
Check if it is a frame of myself.
Check if it is a frame of myself .
/* Mask out RIF bit. */ /* It is my frame. */