Lines Matching refs:mac_addr
311 char mac_addr[6]; member
611 static int emac_hash_add(struct emac_priv *priv, u8 *mac_addr) in emac_hash_add() argument
616 u32 hash_value = hash_get(mac_addr); in emac_hash_add()
653 static int emac_hash_del(struct emac_priv *priv, u8 *mac_addr) in emac_hash_del() argument
658 hash_value = hash_get(mac_addr); in emac_hash_del()
696 static void emac_add_mcast(struct emac_priv *priv, u32 action, u8 *mac_addr) in emac_add_mcast() argument
703 update = emac_hash_add(priv, mac_addr); in emac_add_mcast()
706 update = emac_hash_del(priv, mac_addr); in emac_add_mcast()
1030 static void emac_set_type0addr(struct emac_priv *priv, u32 ch, char *mac_addr) in emac_set_type0addr() argument
1033 val = ((mac_addr[5] << 8) | (mac_addr[4])); in emac_set_type0addr()
1036 val = ((mac_addr[3] << 24) | (mac_addr[2] << 16) | \ in emac_set_type0addr()
1037 (mac_addr[1] << 8) | (mac_addr[0])); in emac_set_type0addr()
1057 static void emac_set_type1addr(struct emac_priv *priv, u32 ch, char *mac_addr) in emac_set_type1addr() argument
1061 val = ((mac_addr[5] << 8) | mac_addr[4]); in emac_set_type1addr()
1063 val = ((mac_addr[3] << 24) | (mac_addr[2] << 16) | \ in emac_set_type1addr()
1064 (mac_addr[1] << 8) | (mac_addr[0])); in emac_set_type1addr()
1066 emac_set_type0addr(priv, ch, mac_addr); in emac_set_type1addr()
1082 char *mac_addr, int index, int match) in emac_set_type2addr() argument
1086 val = ((mac_addr[3] << 24) | (mac_addr[2] << 16) | \ in emac_set_type2addr()
1087 (mac_addr[1] << 8) | (mac_addr[0])); in emac_set_type2addr()
1089 val = ((mac_addr[5] << 8) | mac_addr[4] | ((ch & 0x7) << 16) | \ in emac_set_type2addr()
1092 emac_set_type0addr(priv, ch, mac_addr); in emac_set_type2addr()
1105 static void emac_setmac(struct emac_priv *priv, u32 ch, char *mac_addr) in emac_setmac() argument
1110 emac_set_type0addr(priv, ch, mac_addr); in emac_setmac()
1114 emac_set_type1addr(priv, ch, mac_addr); in emac_setmac()
1116 emac_set_type2addr(priv, ch, mac_addr, ch, 1); in emac_setmac()
1117 emac_set_type0addr(priv, ch, mac_addr); in emac_setmac()
1143 memcpy(priv->mac_addr, sa->sa_data, ndev->addr_len); in emac_dev_setmac_addr()
1148 emac_setmac(priv, EMAC_DEF_RX_CH, priv->mac_addr); in emac_dev_setmac_addr()
1153 priv->mac_addr); in emac_dev_setmac_addr()
1214 emac_setmac(priv, EMAC_DEF_RX_CH, priv->mac_addr); in emac_hw_enable()
1430 eth_hw_addr_set(ndev, priv->mac_addr); in emac_dev_open()
1744 if (!is_valid_ether_addr(pdata->mac_addr)) in davinci_emac_of_get_pdata()
1745 of_get_mac_address(np, pdata->mac_addr); in davinci_emac_of_get_pdata()
1787 int instance, u8 *mac_addr) in davinci_emac_try_get_mac() argument
1792 return ti_cm_get_macid(&pdev->dev, instance, mac_addr); in davinci_emac_try_get_mac()
1848 memcpy(priv->mac_addr, pdata->mac_addr, ETH_ALEN); in davinci_emac_probe()
1932 if (!is_valid_ether_addr(priv->mac_addr)) { in davinci_emac_probe()
1933 rc = davinci_emac_try_get_mac(pdev, res_ctrl ? 0 : 1, priv->mac_addr); in davinci_emac_probe()
1935 eth_hw_addr_set(ndev, priv->mac_addr); in davinci_emac_probe()
1937 if (!is_valid_ether_addr(priv->mac_addr)) { in davinci_emac_probe()
1940 memcpy(priv->mac_addr, ndev->dev_addr, ndev->addr_len); in davinci_emac_probe()
1942 priv->mac_addr); in davinci_emac_probe()