Merge remote-tracking branch 'origin/master' into ieee802154
This commit is contained in:
commit
be415489f2
@ -164,14 +164,11 @@
|
|||||||
* 3. To the IEEE802.15.4 radio device layer, as documented in,
|
* 3. To the IEEE802.15.4 radio device layer, as documented in,
|
||||||
* include/nuttx/wireless/ieee802154/ioeee802154_radio.h.
|
* 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 WL_FIRSTCHAR 0x0033
|
||||||
#define SIOCGWPANID _WLIOC(0x0034) /* Return PAN ID */
|
#define WL_NNETCMDS 0x0032
|
||||||
|
|
||||||
#define WL_FIRSTCHAR 0x0035
|
|
||||||
#define WL_NNETCMDS 0x0034
|
|
||||||
|
|
||||||
/* Character Driver IOCTL commands *************************************************/
|
/* Character Driver IOCTL commands *************************************************/
|
||||||
/* Non-compatible, NuttX only IOCTL definitions for use with low-level wireless
|
/* 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.
|
* 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) */
|
* 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) */
|
* 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 */
|
* 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 */
|
* 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) */
|
* (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) */
|
* (in dBm) */
|
||||||
|
|
||||||
/* Device-specific IOCTL commands **************************************************/
|
/* Device-specific IOCTL commands **************************************************/
|
||||||
|
|
||||||
#define WL_FIRST 0x0001 /* First common command */
|
#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
|
/* 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()
|
* by the upper-half QE driver to the lower-half QE driver via the ioctl()
|
||||||
|
@ -348,6 +348,7 @@ static void ioctl_set_ipv6addr(FAR net_ipv6addr_t outaddr,
|
|||||||
static int netdev_sixlowpan_ioctl(FAR struct socket *psock, int cmd,
|
static int netdev_sixlowpan_ioctl(FAR struct socket *psock, int cmd,
|
||||||
FAR struct sixlowpan_req_s *req)
|
FAR struct sixlowpan_req_s *req)
|
||||||
{
|
{
|
||||||
|
#if 0 /* None yet defined */
|
||||||
FAR struct ieee802154_driver_s *ieee;
|
FAR struct ieee802154_driver_s *ieee;
|
||||||
int ret = -ENOTTY;
|
int ret = -ENOTTY;
|
||||||
|
|
||||||
@ -358,42 +359,15 @@ static int netdev_sixlowpan_ioctl(FAR struct socket *psock, int cmd,
|
|||||||
switch (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:
|
default:
|
||||||
return -ENOTTY;
|
return -ENOTTY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
#else
|
||||||
|
return -ENOTTY;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user