From fa01830cad707bc98dc3d28d9ef66d6393bb2018 Mon Sep 17 00:00:00 2001 From: qiyongzhong0 <917768104@qq.com> Date: Thu, 23 Apr 2020 14:06:03 +0800 Subject: [PATCH] fic bc26_netdev_add --- class/bc26/at_device_bc26.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/class/bc26/at_device_bc26.c b/class/bc26/at_device_bc26.c index 16c5f27..f0cb44a 100644 --- a/class/bc26/at_device_bc26.c +++ b/class/bc26/at_device_bc26.c @@ -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) {