Networking: Add registration support for integrated ieee80211 wireless drivers. Rename CONFIG_IEEE802154 to CONFIG_WIRELESS_IEEE8021514 following the convention of including the location of the configuration variable as a part of its name.

This commit is contained in:
Gregory Nutt
2017-03-12 12:50:41 -06:00
parent 939ea7461b
commit 430b52c977
4 changed files with 23 additions and 8 deletions
+16 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* net/netdev/netdev_register.c
*
* Copyright (C) 2007-2012, 2014-2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2012, 2014-2015, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -63,14 +63,17 @@
#define NETDEV_ETH_FORMAT "eth%d"
#define NETDEV_LO_FORMAT "lo"
#define NETDEV_WPAN_FORMAT "wpan%d"
#define NETDEV_SLIP_FORMAT "sl%d"
#define NETDEV_TUN_FORMAT "tun%d"
#define NETDEV_WLAN_FORMAT "wlan%d"
#define NETDEV_WPAN_FORMAT "wpan%d"
#if defined(CONFIG_NET_SLIP)
# define NETDEV_DEFAULT_FORMAT NETDEV_SLIP_FORMAT
#elif defined(CONFIG_NET_ETHERNET)
# define NETDEV_DEFAULT_FORMAT NETDEV_ETH_FORMAT
#elif defined(CONFIG_DRIVERS_IEEE80211)
# define NETDEV_DEFAULT_FORMAT NETDEV_WLAN_FORMAT
#elif defined(CONFIG_NET_6LOWPAN)
# define NETDEV_DEFAULT_FORMAT NETDEV_WPAN_FORMAT
#else /* if defined(CONFIG_NET_LOOPBACK) */
@@ -213,6 +216,17 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype)
break;
#endif
#ifdef CONFIG_DRIVERS_IEEE80211
case NET_LL_IEEE80211: /* IEEE 802.11 */
dev->d_llhdrlen = ETH_HDRLEN;
dev->d_mtu = CONFIG_NET_ETH_MTU;
#ifdef CONFIG_NET_TCP
dev->d_recvwndo = CONFIG_NET_ETH_TCP_RECVWNDO;
#endif
devfmt = NETDEV_LPAN_FORMAT;
break;
#endif
#ifdef CONFIG_NET_6LOWPAN
case NET_LL_6LOWPAN: /* IEEE 802.15.4 */
dev->d_llhdrlen = 0; /* REVISIT */