/* Routine: cl_eeprom_read_mac_addr Description: read mac address and store it in buf.  */
int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus)
/* Routine: cl_eeprom_read_mac_addr Description: read mac address and store it in buf.  */
int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus)
{
	uint offset;
	int err;
	err = cl_eeprom_setup(eeprom_bus);
	if (err)
		return err;
	offset = (cl_eeprom_layout != LAYOUT_LEGACY) ?
			MAC_ADDR_OFFSET : MAC_ADDR_OFFSET_LEGACY;
	return cl_eeprom_read(offset, buf, 6);
}