Lines Matching refs:addr
289 struct sockaddr *addr = p;
293 if (!is_valid_ether_addr(addr->sa_data))
306 struct sockaddr *addr = p;
308 eth_hw_addr_set(dev, addr->sa_data);
399 ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len)
401 return sysfs_emit(buf, "%*phC\n", len, addr);
501 unsigned char *addr;
508 addr = arch_get_platform_mac_address();
509 if (!addr)
512 ether_addr_copy(mac_addr, addr);
528 u8 addr[ETH_ALEN] __aligned(2);
531 ret = eth_platform_get_mac_address(dev, addr);
533 eth_hw_addr_set(netdev, addr);
575 const char *name, char *addr)
579 ret = fwnode_property_read_u8_array(fwnode, name, addr, ETH_ALEN);
583 if (!is_valid_ether_addr(addr))
591 * @addr: Address of buffer to store the MAC in
610 int fwnode_get_mac_address(struct fwnode_handle *fwnode, char *addr)
612 if (!fwnode_get_mac_addr(fwnode, "mac-address", addr) ||
613 !fwnode_get_mac_addr(fwnode, "local-mac-address", addr) ||
614 !fwnode_get_mac_addr(fwnode, "address", addr))
624 * @addr: Address of buffer to store the MAC in
626 int device_get_mac_address(struct device *dev, char *addr)
628 return fwnode_get_mac_address(dev_fwnode(dev), addr);
642 u8 addr[ETH_ALEN];
645 ret = device_get_mac_address(dev, addr);
647 eth_hw_addr_set(netdev, addr);