kernels/linux-2.4.0/drivers/net/macmace.c
/*
 *	Load the address on a mace controller.
 */
Load the address on a mace controller.
Load the address on a mace controller .
static int mace68k_set_address(struct net_device *dev, void *addr)
{
	unsigned char *p = addr;
	struct mace68k_data *mp = (struct mace68k_data *) dev->priv;
	volatile struct mace *mb = mp->mace;
	int i;
	unsigned long flags;
	save_flags(flags);
	cli();
	mb->iac = ADDRCHG | PHYADDR;
	while ((mb->iac & ADDRCHG) != 0);
	for (i = 0; i < 6; ++i)
		mb->padr = dev->dev_addr[i] = p[i];
	mb->maccc = mp->maccc;
	restore_flags(flags);
	return 0;
}
static int mace68k_set_address ( struct net_device * dev , void * addr ) { unsigned char * p = addr ; struct mace68k_data * mp = ( struct mace68k_data * ) dev -> priv ; volatile struct mace * mb = mp -> mace ; int i ; unsigned long flags ; save_flags ( flags ) ; cli ( ) ; mb -> iac = ADDRCHG | PHYADDR ; while ( ( mb -> iac & ADDRCHG ) != 0 ) ; for ( i = 0 ; i < 6 ; ++ i ) mb -> padr = dev -> dev_addr [ i ] = p [ i ] ; mb -> maccc = mp -> maccc ; restore_flags ( flags ) ; return 0 ; }
Load the address on a mace controller.
Load the address on a mace controller .
/* load up the hardware address */ /* note: setting ADDRCHG clears ENRCV */