linux/drivers/net/ethernet/ti/davinci_emac.c
/**
 * emac_set_type1addr - Set EMAC Type1 mac address
 * @priv: The DaVinci EMAC private adapter structure
 * @ch: RX channel number
 * @mac_addr: MAC address to set in device
 *
 * Called internally to set Type1 mac address of the adapter (Device)
 *
 * Returns success (0) or appropriate error code (none as of now)
 */
Set EMAC Type1 mac address
@priv: The DaVinci EMAC private adapter structure
@ch: RX channel number
@mac_addr: MAC address to set in device

Called internally to set Type1 mac address of the adapter (Device)

Returns success (0) or appropriate error code (none as of now)
Set EMAC Type1 mac address @priv : The DaVinci EMAC private adapter structure @ch : RX channel number @mac_addr : MAC address to set in device Called internally to set Type1 mac address of the adapter ( Device ) Returns success ( 0 ) or appropriate error code ( none as of now )
static void emac_set_type1addr(struct emac_priv *priv, u32 ch, char *mac_addr)
{
	u32 val;
	emac_write(EMAC_MACINDEX, ch);
	val = ((mac_addr[5] << 8) | mac_addr[4]);
	emac_write(EMAC_MACADDRLO, val);
	val = ((mac_addr[3] << 24) | (mac_addr[2] << 16) | \
	       (mac_addr[1] << 8) | (mac_addr[0]));
	emac_write(EMAC_MACADDRHI, val);
	emac_set_type0addr(priv, ch, mac_addr);
}
static void emac_set_type1addr ( struct emac_priv * priv , u32 ch , char * mac_addr ) { u32 val ; emac_write ( EMAC_MACINDEX , ch ) ; val = ( ( mac_addr [ 5 ] << 8 ) | mac_addr [ 4 ] ) ; emac_write ( EMAC_MACADDRLO , val ) ; val = ( ( mac_addr [ 3 ] << 24 ) | ( mac_addr [ 2 ] << 16 ) | ( mac_addr [ 1 ] << 8 ) | ( mac_addr [ 0 ] ) ) ; emac_write ( EMAC_MACADDRHI , val ) ; emac_set_type0addr ( priv , ch , mac_addr ) ; }
emac_set_type1addr - Set EMAC Type1 mac address
 @priv: The DaVinci EMAC private adapter structure
 @ch: RX channel number
 @mac_addr: MAC address to set in device
emac_set_type1addr - Set EMAC Type1 mac address @priv : The DaVinci EMAC private adapter structure @ch : RX channel number @mac_addr : MAC address to set in device