fic bc26_netdev_add

This commit is contained in:
qiyongzhong0 2020-04-23 14:06:03 +08:00
parent 6ddf4d8afc
commit fa01830cad
1 changed files with 6 additions and 0 deletions

View File

@ -631,6 +631,12 @@ static struct netdev *bc26_netdev_add(const char *netdev_name)
#define HWADDR_LEN 8
struct netdev *netdev = RT_NULL;
netdev = netdev_get_by_name(netdev_name);
if(netdev != RT_NULL)
{
return(netdev);
}
netdev = (struct netdev *)rt_calloc(1, sizeof(struct netdev));
if (netdev == RT_NULL)
{