/* Returns success (0) or appropriate error code (none as of now)  */
static void emac_set_type1addr(struct emac_priv *priv, rt_uint32_t ch, char *mac_addr)
/* Returns success (0) or appropriate error code (none as of now)  */
static void emac_set_type1addr(struct emac_priv *priv, rt_uint32_t ch, char *mac_addr)
{
    rt_uint32_t 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);
}