Lines Matching refs:mac_addr
156 netdev_dbg(ndev, "Old Ethernet (MAC) address = %pM\n", mac->mac_addr); in spl2sw_ethernet_set_mac_address()
157 if (is_valid_ether_addr(mac->mac_addr)) { in spl2sw_ethernet_set_mac_address()
164 ether_addr_copy(mac->mac_addr, ndev->dev_addr); in spl2sw_ethernet_set_mac_address()
206 static void spl2sw_check_mac_vendor_id_and_convert(u8 *mac_addr) in spl2sw_check_mac_vendor_id_and_convert() argument
212 if (mac_addr[5] == 0xfc && mac_addr[4] == 0x4b && mac_addr[3] == 0xbc && in spl2sw_check_mac_vendor_id_and_convert()
213 (mac_addr[0] != 0xfc || mac_addr[1] != 0x4b || mac_addr[2] != 0xbc)) { in spl2sw_check_mac_vendor_id_and_convert()
215 swap(mac_addr[0], mac_addr[5]); in spl2sw_check_mac_vendor_id_and_convert()
216 swap(mac_addr[1], mac_addr[4]); in spl2sw_check_mac_vendor_id_and_convert()
217 swap(mac_addr[2], mac_addr[3]); in spl2sw_check_mac_vendor_id_and_convert()
262 static u32 spl2sw_init_netdev(struct platform_device *pdev, u8 *mac_addr, in spl2sw_init_netdev() argument
281 ether_addr_copy(mac->mac_addr, mac_addr); in spl2sw_init_netdev()
283 eth_hw_addr_set(ndev, mac_addr); in spl2sw_init_netdev()
284 dev_info(&pdev->dev, "Ethernet (MAC) address = %pM\n", mac_addr); in spl2sw_init_netdev()
329 u8 mac_addr[ETH_ALEN]; in spl2sw_probe() local
442 ret = spl2sw_nvmem_get_mac_address(&pdev->dev, port_np, mac_addr); in spl2sw_probe()
447 eth_random_addr(mac_addr); in spl2sw_probe()
451 ret = spl2sw_init_netdev(pdev, mac_addr, &ndev); in spl2sw_probe()