Add Cellular link layer support

1.Add cellular link layer enum definition and register flow
2.Add ioctl flow to set cellular NICs parameters

Signed-off-by: luojun1 <luojun1@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
luojun1
2022-07-28 15:46:49 +08:00
committed by Xiang Xiao
parent 18ce70c1e7
commit ec4af00538
6 changed files with 53 additions and 5 deletions
+10
View File
@@ -58,6 +58,7 @@
#define NETDEV_WPAN_FORMAT "wpan%d"
#define NETDEV_WWAN_FORMAT "wwan%d"
#define NETDEV_CAN_FORMAT "can%d"
#define NETDEV_CELL_FORMAT "cell%d"
#if defined(CONFIG_DRIVERS_IEEE80211) /* Usually also has CONFIG_NET_ETHERNET */
# define NETDEV_DEFAULT_FORMAT NETDEV_WLAN_FORMAT
@@ -346,6 +347,15 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype)
break;
#endif
#ifdef CONFIG_NET_CELLULAR
case NET_LL_CELL:
llhdrlen = 0;
pktsize = CONFIG_NET_ETH_PKTSIZE;
devfmt = NETDEV_CELL_FORMAT;
flags = IFF_NOARP;
break;
#endif
default:
nerr("ERROR: Unrecognized link type: %d\n", lltype);
return -EINVAL;