From 2c4800f51188302bcc282a56b2507ff3df5670fe Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 21 Apr 2017 14:17:46 -0600 Subject: [PATCH] Remove the 6loWPAN PANID IOCTLs they are redundant. --- include/nuttx/wireless/wireless.h | 23 +++++++++------------ net/netdev/netdev_ioctl.c | 34 ++++--------------------------- 2 files changed, 14 insertions(+), 43 deletions(-) diff --git a/include/nuttx/wireless/wireless.h b/include/nuttx/wireless/wireless.h index 0b67366e79..a9abf706b6 100644 --- a/include/nuttx/wireless/wireless.h +++ b/include/nuttx/wireless/wireless.h @@ -164,14 +164,11 @@ * 3. To the IEEE802.15.4 radio device layer, as documented in, * include/nuttx/wireless/ieee802154/ioeee802154_radio.h. * - * SIOCSWPANID - Join the specified PAN ID + * This is a placeholder; no 6LoWPAN IOCTL commands have been defined. */ -#define SIOCSWPANID _WLIOC(0x0033) /* Join PAN ID */ -#define SIOCGWPANID _WLIOC(0x0034) /* Return PAN ID */ - -#define WL_FIRSTCHAR 0x0035 -#define WL_NNETCMDS 0x0034 +#define WL_FIRSTCHAR 0x0033 +#define WL_NNETCMDS 0x0032 /* Character Driver IOCTL commands *************************************************/ /* Non-compatible, NuttX only IOCTL definitions for use with low-level wireless @@ -179,23 +176,23 @@ * requires a file descriptor created by the open() interface. */ -#define WLIOC_SETRADIOFREQ _WLIOC(0x0035) /* arg: Pointer to uint32_t, frequency +#define WLIOC_SETRADIOFREQ _WLIOC(0x0033) /* arg: Pointer to uint32_t, frequency * value (in Mhz) */ -#define WLIOC_GETRADIOFREQ _WLIOC(0x0036) /* arg: Pointer to uint32_t, frequency +#define WLIOC_GETRADIOFREQ _WLIOC(0x0034) /* arg: Pointer to uint32_t, frequency * value (in Mhz) */ -#define WLIOC_SETADDR _WLIOC(0x0037) /* arg: Pointer to address value, format +#define WLIOC_SETADDR _WLIOC(0x0035) /* arg: Pointer to address value, format * of the address is driver specific */ -#define WLIOC_GETADDR _WLIOC(0x0038) /* arg: Pointer to address value, format +#define WLIOC_GETADDR _WLIOC(0x0036) /* arg: Pointer to address value, format * of the address is driver specific */ -#define WLIOC_SETTXPOWER _WLIOC(0x0039) /* arg: Pointer to int32_t, output power +#define WLIOC_SETTXPOWER _WLIOC(0x0036) /* arg: Pointer to int32_t, output power * (in dBm) */ -#define WLIOC_GETTXPOWER _WLIOC(0x003a) /* arg: Pointer to int32_t, output power +#define WLIOC_GETTXPOWER _WLIOC(0x0038) /* arg: Pointer to int32_t, output power * (in dBm) */ /* Device-specific IOCTL commands **************************************************/ #define WL_FIRST 0x0001 /* First common command */ -#define WL_NCMDS 0x003a /* Number of common commands */ +#define WL_NCMDS 0x0038 /* Number of common commands */ /* User defined ioctl commands are also supported. These will be forwarded * by the upper-half QE driver to the lower-half QE driver via the ioctl() diff --git a/net/netdev/netdev_ioctl.c b/net/netdev/netdev_ioctl.c index 7f2efbf982..17ac9f51d3 100644 --- a/net/netdev/netdev_ioctl.c +++ b/net/netdev/netdev_ioctl.c @@ -343,6 +343,7 @@ static void ioctl_set_ipv6addr(FAR net_ipv6addr_t outaddr, static int netdev_sixlowpan_ioctl(FAR struct socket *psock, int cmd, FAR struct sixlowpan_req_s *req) { +#if 0 /* None yet defined */ FAR struct ieee802154_driver_s *ieee; int ret = -ENOTTY; @@ -353,42 +354,15 @@ static int netdev_sixlowpan_ioctl(FAR struct socket *psock, int cmd, switch (cmd) { - case SIOCSWPANID: /* Join PAN ID */ - { - ieee = (FAR struct ieee802154_driver_s *)netdev_findbyname(req->ifr_name); - if (ieee == NULL) - { - ret = -ENODEV; - } - else - { - ieee->i_panid = req->u.panid.panid; - ret = OK; - } - } - break; - - case SIOCGWPANID: /* Return PAN ID */ - { - ieee = (FAR struct ieee802154_driver_s *)netdev_findbyname(req->ifr_name); - if (ieee == NULL) - { - ret = -ENODEV; - } - else - { - req->u.panid.panid = ieee->i_panid; - ret = OK; - } - } - break; - default: return -ENOTTY; } } return ret; +#else + return -ENOTTY; +#endif } #endif