| 67 | } |
| 68 | |
| 69 | rt_err_t rt_ofw_get_interface(struct rt_ofw_node *np, rt_phy_interface *interface) |
| 70 | { |
| 71 | const char *phy_mode = RT_NULL; |
| 72 | |
| 73 | if (rt_ofw_prop_read_string(np, "phy-mode", &phy_mode)) |
| 74 | rt_ofw_prop_read_string(np, "phy-connection-type", &phy_mode); |
| 75 | if (!phy_mode) |
| 76 | return -RT_ERROR; |
| 77 | |
| 78 | return _get_interface_by_name(phy_mode, interface); |
| 79 | } |
| 80 | |
| 81 | rt_err_t rt_ofw_get_mac_addr_by_name(struct rt_ofw_node *np, const char *name, rt_uint8_t *addr) |
| 82 | { |
nothing calls this directly
no test coverage detected