fic bc26_netdev_add
This commit is contained in:
parent
6ddf4d8afc
commit
fa01830cad
|
@ -631,6 +631,12 @@ static struct netdev *bc26_netdev_add(const char *netdev_name)
|
||||||
#define HWADDR_LEN 8
|
#define HWADDR_LEN 8
|
||||||
struct netdev *netdev = RT_NULL;
|
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));
|
netdev = (struct netdev *)rt_calloc(1, sizeof(struct netdev));
|
||||||
if (netdev == RT_NULL)
|
if (netdev == RT_NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue