* 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
| 574 | * but is all zeros. |
| 575 | */ |
| 576 | const 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 | } |
no test coverage detected