mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user