mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
Remove CONFIG_NET_MULTILINK. This increases code size by a little, but greatly reduces the complexity of the network code.
This commit is contained in:
+1
-30
@@ -47,31 +47,6 @@
|
||||
|
||||
#include <nuttx/net/ip.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/* If there is only one supported link layer, then the size of the link
|
||||
* layer address is a constant.
|
||||
*
|
||||
* NOTE: Literal constants are used here to avoid bringing in all of the
|
||||
* header files where they are correctly defined.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_NET_MULTILINK
|
||||
# if defined(CONFIG_NET_ETHERNET)
|
||||
# define NETDEV_LLADDRSIZE 6 /* IFHWADDRLEN */
|
||||
# elif defined(CONFIG_NET_6LOWPAN)
|
||||
# ifdef CONFIG_NET_6LOWPAN_EXTENDEDADDR
|
||||
# define NETDEV_LLADDRSIZE 10 /* NET_6LOWPAN_EADDRSIZE */
|
||||
# else
|
||||
# define NETDEV_LLADDRSIZE 2 /* NET_6LOWPAN_SADDRSIZE */
|
||||
# endif
|
||||
# else
|
||||
# define NETDEV_LLADDRSIZE 0 /* No link layer address */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
@@ -458,11 +433,7 @@ int netdev_type_lladdrsize(uint8_t lltype);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
# define netdev_dev_lladdrsize(dev) netdev_type_lladdrsize((dev)->d_lltype)
|
||||
#else
|
||||
# define netdev_dev_lladdrsize(dev) NETDEV_LLADDRSIZE
|
||||
#endif
|
||||
#define netdev_dev_lladdrsize(dev) netdev_type_lladdrsize((dev)->d_lltype)
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user