Lines Matching full:mac
52 * Search the device tree for the best MAC address to use. 'mac-address' is
53 * checked first, because that is supposed to contain to "most recent" MAC
54 * address. If that isn't set, then 'local-mac-address' is checked next,
60 * MAC address.
62 * All-zero MAC addresses are rejected, because those could be properties that
64 * DTS could define 'mac-address' and 'local-mac-address', with zero MAC
65 * addresses. Some older U-Boots only initialized 'local-mac-address'. In
66 * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
73 addr = of_get_mac_addr(np, "mac-address"); in of_get_mac_address()
77 addr = of_get_mac_addr(np, "local-mac-address"); in of_get_mac_address()
86 * Obtain the MAC address from an nvmem provider named 'mac-address' through
91 * @addr: Pointer to receive the MAC address using ether_addr_copy()
96 const void *mac; in of_get_nvmem_mac_address() local
100 cell = of_nvmem_cell_get(np, "mac-address"); in of_get_nvmem_mac_address()
104 mac = nvmem_cell_read(cell, &len); in of_get_nvmem_mac_address()
108 if (IS_ERR(mac)) in of_get_nvmem_mac_address()
109 return PTR_ERR(mac); in of_get_nvmem_mac_address()
111 if (len < ETH_ALEN || !is_valid_ether_addr(mac)) { in of_get_nvmem_mac_address()
114 ether_addr_copy(addr, mac); in of_get_nvmem_mac_address()
118 kfree(mac); in of_get_nvmem_mac_address()