MCPcopy Create free account
hub / github.com/F-Stack/f-stack / of_get_mac_address

Function of_get_mac_address

dpdk/drivers/common/dpaax/dpaa_of.c:576–589  ·  view source on GitHub ↗

* Search the device tree for the best MAC address to use. 'mac-address' is * checked first, because that is supposed to contain to "most recent" MAC * address. If that isn't set, then 'local-mac-address' is checked next, * because that is the default address. If that isn't set, then the obsolete * 'address' is checked, just in case we're using an old device tree. * * Note that the 'address

Source from the content-addressed store, hash-verified

574 * but is all zeros.
575 */
576const void *of_get_mac_address(const struct device_node *np)
577{
578 const void *addr;
579
580 addr = of_get_mac_addr(np, "mac-address");
581 if (addr)
582 return addr;
583
584 addr = of_get_mac_addr(np, "local-mac-address");
585 if (addr)
586 return addr;
587
588 return of_get_mac_addr(np, "address");
589}

Callers 1

Calls 1

of_get_mac_addrFunction · 0.85

Tested by

no test coverage detected