src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
s32 txgbe_get_mac_addr(struct txgbe_hw *hw, u8 *mac_addr)
{
	u32 rar_high;
	u32 rar_low;
	u16 i;

	DEBUGFUNC("txgbe_get_mac_addr");

	wr32(hw, TXGBE_ETHADDRIDX, 0);
	rar_high = rd32(hw, TXGBE_ETHADDRH);
	rar_low = rd32(hw, TXGBE_ETHADDRL);

	for (i = 0; i < 2; i++)
		mac_addr[i] = (u8)(rar_high >> (1 - i) * 8);

	for (i = 0; i < 4; i++)
		mac_addr[i + 2] = (u8)(rar_low >> (3 - i) * 8);

	return 0;
}
/**
 *  txgbe_get_mac_addr - Generic get MAC address
 *  @hw: pointer to hardware structure
 *  @mac_addr: Adapter MAC address
 *
 *  Reads the adapter's MAC address from first Receive Address Register (RAR0)
 *  A reset of the adapter must be performed prior to calling this function
 *  in order for the MAC address to have been loaded from the EEPROM into RAR0
 **/
Generic get MAC address
@hw: pointer to hardware structure
@mac_addr: Adapter MAC address

Reads the adapter's MAC address from first Receive Address Register (RAR0)
A reset of the adapter must be performed prior to calling this function
in order for the MAC address to have been loaded from the EEPROM into RAR0
Generic get MAC address @hw : pointer to hardware structure @mac_addr : Adapter MAC address Reads the adapter ' s MAC address from first Receive Address Register ( RAR0 ) A reset of the adapter must be performed prior to calling this function in order for the MAC address to have been loaded from the EEPROM into RAR0
s32 txgbe_get_mac_addr(struct txgbe_hw *hw, u8 *mac_addr)
{
	u32 rar_high;
	u32 rar_low;
	u16 i;
	DEBUGFUNC("txgbe_get_mac_addr");
	wr32(hw, TXGBE_ETHADDRIDX, 0);
	rar_high = rd32(hw, TXGBE_ETHADDRH);
	rar_low = rd32(hw, TXGBE_ETHADDRL);
	for (i = 0; i < 2; i++)
		mac_addr[i] = (u8)(rar_high >> (1 - i) * 8);
	for (i = 0; i < 4; i++)
		mac_addr[i + 2] = (u8)(rar_low >> (3 - i) * 8);
	return 0;
}
s32 txgbe_get_mac_addr ( struct txgbe_hw * hw , u8 * mac_addr ) { u32 rar_high ; u32 rar_low ; u16 i ; DEBUGFUNC ( " " ) ; wr32 ( hw , TXGBE_ETHADDRIDX , 0 ) ; rar_high = rd32 ( hw , TXGBE_ETHADDRH ) ; rar_low = rd32 ( hw , TXGBE_ETHADDRL ) ; for ( i = 0 ; i < 2 ; i ++ ) mac_addr [ i ] = ( u8 ) ( rar_high >> ( 1 - i ) * 8 ) ; for ( i = 0 ; i < 4 ; i ++ ) mac_addr [ i + 2 ] = ( u8 ) ( rar_low >> ( 3 - i ) * 8 ) ; return 0 ; }
txgbe_get_mac_addr - Generic get MAC address
  @hw: pointer to hardware structure
  @mac_addr: Adapter MAC address
txgbe_get_mac_addr - Generic get MAC address @hw : pointer to hardware structure @mac_addr : Adapter MAC address