kernels/linux-2.4.0/drivers/net/tlan.c
/***************************************************************
	 *	TLan_SetMac
	 *
	 *	Returns:
	 *		Nothing
	 *	Parms:
	 *		dev	Pointer to device structure of adapter
	 *			on which to change the AREG.
	 *		areg	The AREG to set the address in (0 - 3).
	 *		mac	A pointer to an array of chars.  Each
	 *			element stores one byte of the address.
	 *			IE, it isn't in ascii.
	 *
	 *	This function transfers a MAC address to one of the
	 *	TLAN AREGs (address registers).  The TLAN chip locks
	 *	the register on writing to offset 0 and unlocks the
	 *	register after writing to offset 5.  If NULL is passed
	 *	in mac, then the AREG is filled with 0's.
	 *
	 **************************************************************/
TLan_SetMac
Returns:
Nothing
Parms:
dev     Pointer to device structure of adapter
on which to change the AREG.
areg    The AREG to set the address in (0 - 3).
mac     A pointer to an array of chars.  Each
element stores one byte of the address.
IE, it isn't in ascii.

This function transfers a MAC address to one of the
TLAN AREGs (address registers).  The TLAN chip locks
the register on writing to offset 0 and unlocks the
register after writing to offset 5.  If NULL is passed
in mac, then the AREG is filled with 0's.
TLan_SetMac Returns : Nothing Parms : dev Pointer to device structure of adapter on which to change the AREG . areg The AREG to set the address in ( 0 - 3 ) . mac A pointer to an array of chars . Each element stores one byte of the address . IE it isn ' t in ascii . This function transfers a MAC address to one of the TLAN AREGs ( address registers ) . The TLAN chip locks the register on writing to offset 0 and unlocks the register after writing to offset 5 . If NULL is passed in mac then the AREG is filled with 0 ' s .
void TLan_SetMac( struct net_device *dev, int areg, char *mac )
{
	int i;
	areg *= 6;
	if ( mac != NULL ) {
		for ( i = 0; i < 6; i++ )
			TLan_DioWrite8( dev->base_addr, TLAN_AREG_0 + areg + i, mac[i] );
	} else {
		for ( i = 0; i < 6; i++ )
			TLan_DioWrite8( dev->base_addr, TLAN_AREG_0 + areg + i, 0 );
	}
}
void TLan_SetMac ( struct net_device * dev , int areg , char * mac ) { int i ; areg *= 6 ; if ( mac != NULL ) { for ( i = 0 ; i < 6 ; i ++ ) TLan_DioWrite8 ( dev -> base_addr , TLAN_AREG_0 + areg + i , mac [ i ] ) ; } else { for ( i = 0 ; i < 6 ; i ++ ) TLan_DioWrite8 ( dev -> base_addr , TLAN_AREG_0 + areg + i , 0 ) ; } }
TLan_SetMac
      Returns:
              Nothing
      Parms:
              dev     Pointer to device structure of adapter
                      on which to change the AREG.
TLan_SetMac Returns : Nothing Parms : dev Pointer to device structure of adapter on which to change the AREG .