Lines Matching refs:mac_addr
313 char mac_addr[6]; member
613 static int emac_hash_add(struct emac_priv *priv, u8 *mac_addr) in emac_hash_add() argument
618 u32 hash_value = hash_get(mac_addr); in emac_hash_add()
655 static int emac_hash_del(struct emac_priv *priv, u8 *mac_addr) in emac_hash_del() argument
660 hash_value = hash_get(mac_addr); in emac_hash_del()
698 static void emac_add_mcast(struct emac_priv *priv, u32 action, u8 *mac_addr) in emac_add_mcast() argument
705 update = emac_hash_add(priv, mac_addr); in emac_add_mcast()
708 update = emac_hash_del(priv, mac_addr); in emac_add_mcast()
1032 static void emac_set_type0addr(struct emac_priv *priv, u32 ch, char *mac_addr) in emac_set_type0addr() argument
1035 val = ((mac_addr[5] << 8) | (mac_addr[4])); in emac_set_type0addr()
1038 val = ((mac_addr[3] << 24) | (mac_addr[2] << 16) | \ in emac_set_type0addr()
1039 (mac_addr[1] << 8) | (mac_addr[0])); in emac_set_type0addr()
1059 static void emac_set_type1addr(struct emac_priv *priv, u32 ch, char *mac_addr) in emac_set_type1addr() argument
1063 val = ((mac_addr[5] << 8) | mac_addr[4]); in emac_set_type1addr()
1065 val = ((mac_addr[3] << 24) | (mac_addr[2] << 16) | \ in emac_set_type1addr()
1066 (mac_addr[1] << 8) | (mac_addr[0])); in emac_set_type1addr()
1068 emac_set_type0addr(priv, ch, mac_addr); in emac_set_type1addr()
1084 char *mac_addr, int index, int match) in emac_set_type2addr() argument
1088 val = ((mac_addr[3] << 24) | (mac_addr[2] << 16) | \ in emac_set_type2addr()
1089 (mac_addr[1] << 8) | (mac_addr[0])); in emac_set_type2addr()
1091 val = ((mac_addr[5] << 8) | mac_addr[4] | ((ch & 0x7) << 16) | \ in emac_set_type2addr()
1094 emac_set_type0addr(priv, ch, mac_addr); in emac_set_type2addr()
1107 static void emac_setmac(struct emac_priv *priv, u32 ch, char *mac_addr) in emac_setmac() argument
1112 emac_set_type0addr(priv, ch, mac_addr); in emac_setmac()
1116 emac_set_type1addr(priv, ch, mac_addr); in emac_setmac()
1118 emac_set_type2addr(priv, ch, mac_addr, ch, 1); in emac_setmac()
1119 emac_set_type0addr(priv, ch, mac_addr); in emac_setmac()
1145 memcpy(priv->mac_addr, sa->sa_data, ndev->addr_len); in emac_dev_setmac_addr()
1150 emac_setmac(priv, EMAC_DEF_RX_CH, priv->mac_addr); in emac_dev_setmac_addr()
1155 priv->mac_addr); in emac_dev_setmac_addr()
1216 emac_setmac(priv, EMAC_DEF_RX_CH, priv->mac_addr); in emac_hw_enable()
1432 eth_hw_addr_set(ndev, priv->mac_addr); in emac_dev_open()
1749 if (!is_valid_ether_addr(pdata->mac_addr)) in davinci_emac_of_get_pdata()
1750 of_get_mac_address(np, pdata->mac_addr); in davinci_emac_of_get_pdata()
1793 int instance, u8 *mac_addr) in davinci_emac_try_get_mac() argument
1798 return ti_cm_get_macid(&pdev->dev, instance, mac_addr); in davinci_emac_try_get_mac()
1854 memcpy(priv->mac_addr, pdata->mac_addr, ETH_ALEN); in davinci_emac_probe()
1937 rc = davinci_emac_try_get_mac(pdev, res_ctrl ? 0 : 1, priv->mac_addr); in davinci_emac_probe()
1939 eth_hw_addr_set(ndev, priv->mac_addr); in davinci_emac_probe()
1941 if (!is_valid_ether_addr(priv->mac_addr)) { in davinci_emac_probe()
1944 memcpy(priv->mac_addr, ndev->dev_addr, ndev->addr_len); in davinci_emac_probe()
1946 priv->mac_addr); in davinci_emac_probe()