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
+3 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* include/nuttx/net/net.h * include/nuttx/net/net.h
* *
* Copyright (C) 2007, 2009-2014, 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009-2014, 2016-2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -75,7 +75,8 @@ enum net_lltype_e
NET_LL_LOOPBACK, /* Local loopback */ NET_LL_LOOPBACK, /* Local loopback */
NET_LL_SLIP, /* Serial Line Internet Protocol (SLIP) */ NET_LL_SLIP, /* Serial Line Internet Protocol (SLIP) */
NET_LL_TUN, /* TUN Virtual Network Device */ NET_LL_TUN, /* TUN Virtual Network Device */
NET_LL_6LOWPAN /* IEEE 802.15.4 6LoWPAN*/ NET_LL_IEEE80211 /* IEEE 802.11 */
NET_LL_6LOWPAN /* IEEE 802.15.4 6LoWPAN */
}; };
/* This defines a bitmap big enough for one bit for each socket option */ /* This defines a bitmap big enough for one bit for each socket option */
+16 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* net/netdev/netdev_register.c * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -63,14 +63,17 @@
#define NETDEV_ETH_FORMAT "eth%d" #define NETDEV_ETH_FORMAT "eth%d"
#define NETDEV_LO_FORMAT "lo" #define NETDEV_LO_FORMAT "lo"
#define NETDEV_WPAN_FORMAT "wpan%d"
#define NETDEV_SLIP_FORMAT "sl%d" #define NETDEV_SLIP_FORMAT "sl%d"
#define NETDEV_TUN_FORMAT "tun%d" #define NETDEV_TUN_FORMAT "tun%d"
#define NETDEV_WLAN_FORMAT "wlan%d"
#define NETDEV_WPAN_FORMAT "wpan%d"
#if defined(CONFIG_NET_SLIP) #if defined(CONFIG_NET_SLIP)
# define NETDEV_DEFAULT_FORMAT NETDEV_SLIP_FORMAT # define NETDEV_DEFAULT_FORMAT NETDEV_SLIP_FORMAT
#elif defined(CONFIG_NET_ETHERNET) #elif defined(CONFIG_NET_ETHERNET)
# define NETDEV_DEFAULT_FORMAT NETDEV_ETH_FORMAT # define NETDEV_DEFAULT_FORMAT NETDEV_ETH_FORMAT
#elif defined(CONFIG_DRIVERS_IEEE80211)
# define NETDEV_DEFAULT_FORMAT NETDEV_WLAN_FORMAT
#elif defined(CONFIG_NET_6LOWPAN) #elif defined(CONFIG_NET_6LOWPAN)
# define NETDEV_DEFAULT_FORMAT NETDEV_WPAN_FORMAT # define NETDEV_DEFAULT_FORMAT NETDEV_WPAN_FORMAT
#else /* if defined(CONFIG_NET_LOOPBACK) */ #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; break;
#endif #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 #ifdef CONFIG_NET_6LOWPAN
case NET_LL_6LOWPAN: /* IEEE 802.15.4 */ case NET_LL_6LOWPAN: /* IEEE 802.15.4 */
dev->d_llhdrlen = 0; /* REVISIT */ dev->d_llhdrlen = 0; /* REVISIT */
+2 -2
View File
@@ -3,12 +3,12 @@
# see the file kconfig-language.txt in the NuttX tools repository. # see the file kconfig-language.txt in the NuttX tools repository.
# #
config IEEE802154 config WIRELESS_IEEE802154
bool "IEEE 802.15.4 Wireless Support" bool "IEEE 802.15.4 Wireless Support"
default n default n
depends on EXPERIMENTAL depends on EXPERIMENTAL
---help--- ---help---
Enables support for the IEEE 802.14.5Wireless library. Enables support for the IEEE 802.14.5 Wireless library.
if IEEE802154 if IEEE802154
+2 -2
View File
@@ -33,7 +33,7 @@
# #
############################################################################ ############################################################################
ifeq ($(CONFIG_IEEE802154),y) ifeq ($(CONFIG_WIRELESS_IEEE802154),y)
# Include IEEE 802.15.4 support # Include IEEE 802.15.4 support
@@ -43,4 +43,4 @@ DEPPATH += --dep-path wireless/ieee802154
VPATH += :wireless/ieee802154 VPATH += :wireless/ieee802154
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)wireless$(DELIM)ieee802154} CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)wireless$(DELIM)ieee802154}
endif # CONFIG_IEEE802154 endif # CONFIG_WIRELESS_IEEE802154