Skip to content

Commit

Permalink
net_ofw
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuzhuzhus committed Sep 26, 2024
1 parent 31fd200 commit 90eea18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/net/ofw/ofw.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <rtthread.h>
#include "ofw.h"

static const char *rt_phy_modes[] =
static const char* const rt_phy_modes[] =
{
[RT_PHY_INTERFACE_MODE_NA] = "",
[RT_PHY_INTERFACE_MODE_INTERNAL] = "internal",
Expand Down Expand Up @@ -48,7 +48,7 @@ static const char *rt_phy_modes[] =
[RT_PHY_INTERFACE_MODE_MAX] = "",
};

static rt_err_t rt_get_interface_by_name(const char *name, rt_phy_interface *interface)
static rt_err_t _get_interface_by_name(const char *name, rt_phy_interface *interface)
{
for (int i = 0; i < RT_PHY_INTERFACE_MODE_MAX; i++)
{
Expand All @@ -70,7 +70,7 @@ rt_err_t rt_ofw_get_interface(struct rt_ofw_node *np, rt_phy_interface *interfac
if (!phy_mode)
return -RT_ERROR;

return rt_get_interface_by_name(phy_mode, interface);
return _get_interface_by_name(phy_mode, interface);
}

rt_err_t rt_ofw_get_mac_addr_by_name(struct rt_ofw_node *np, const char *name, rt_uint8_t *addr)
Expand Down

0 comments on commit 90eea18

Please sign in to comment.