diff --git a/drivers/wireless/ieee802154/xbee/xbee_netdev.c b/drivers/wireless/ieee802154/xbee/xbee_netdev.c index be01ea7b9a..67943cb9a7 100644 --- a/drivers/wireless/ieee802154/xbee/xbee_netdev.c +++ b/drivers/wireless/ieee802154/xbee/xbee_netdev.c @@ -1433,6 +1433,15 @@ int xbee_netdev_register(XBEEHANDLE xbee) xbeenet_ifdown(dev); +#ifdef CONFIG_NET_6LOWPAN + /* Make sure the our single packet buffer is attached. We must do this before + * registering the device since, once the device is registered, a packet may + * be attempted to be forwarded and require the buffer. + */ + + priv->xd_dev.r_dev.d_buf = g_iobuffer.rb_buf; +#endif + /* Register the device with the OS so that socket IOCTLs can be performed */ (void)netdev_register(&priv->xd_dev.r_dev, NET_LL_IEEE802154); diff --git a/drivers/wireless/spirit/drivers/spirit_netdev.c b/drivers/wireless/spirit/drivers/spirit_netdev.c index 0cb2f0e8be..3766af4c59 100644 --- a/drivers/wireless/spirit/drivers/spirit_netdev.c +++ b/drivers/wireless/spirit/drivers/spirit_netdev.c @@ -2857,6 +2857,15 @@ int spirit_netdev_initialize(FAR struct spi_dev_s *spi, goto errout_with_attach; } +#ifdef CONFIG_NET_6LOWPAN + /* Make sure the our single packet buffer is attached. We must do this before + * registering the device since, once the device is registered, a packet may + * be attempted to be forwarded and require the buffer. + */ + + priv->radio.r_dev.d_buf = g_iobuffer.rb_buf; +#endif + /* Register the device with the OS so that socket IOCTLs can be performed. */ ret = netdev_register(dev, NET_LL_PKTRADIO); diff --git a/wireless/bluetooth/bt_netdev.c b/wireless/bluetooth/bt_netdev.c index 2b7e314d1e..6ba24f42f6 100644 --- a/wireless/bluetooth/bt_netdev.c +++ b/wireless/bluetooth/bt_netdev.c @@ -1110,6 +1110,15 @@ int bt_netdev_register(FAR const struct bt_driver_s *btdev) btnet_ifdown(netdev); +#ifdef CONFIG_NET_6LOWPAN + /* Make sure the our single packet buffer is attached. We must do this before + * registering the device since, once the device is registered, a packet may + * be attempted to be forwarded and require the buffer. + */ + + priv->bd_dev.r_dev.d_buf = g_iobuffer.rb_buf; +#endif + /* Register the network device with the OS so that socket IOCTLs can be * performed */ diff --git a/wireless/ieee802154/mac802154_loopback.c b/wireless/ieee802154/mac802154_loopback.c index 981fdb250f..08e38e2d5f 100644 --- a/wireless/ieee802154/mac802154_loopback.c +++ b/wireless/ieee802154/mac802154_loopback.c @@ -1104,6 +1104,15 @@ int ieee8021514_loopback(void) priv->lo_polldog = wd_create(); /* Create periodic poll timer */ +#ifdef CONFIG_NET_6LOWPAN + /* Make sure the our single packet buffer is attached. We must do this before + * registering the device since, once the device is registered, a packet may + * be attempted to be forwarded and require the buffer. + */ + + priv->lo_radio.r_dev.d_buf = g_iobuffer.rb_buf; +#endif + /* Register the loopabck device with the OS so that socket IOCTLs can be * performed. */ diff --git a/wireless/ieee802154/mac802154_netdev.c b/wireless/ieee802154/mac802154_netdev.c index 6dde5c0f3e..ed99eadd5f 100644 --- a/wireless/ieee802154/mac802154_netdev.c +++ b/wireless/ieee802154/mac802154_netdev.c @@ -1429,6 +1429,15 @@ int mac802154netdev_register(MACHANDLE mac) goto errout; } +#ifdef CONFIG_NET_6LOWPAN + /* Make sure the our single packet buffer is attached. We must do this before + * registering the device since, once the device is registered, a packet may + * be attempted to be forwarded and require the buffer. + */ + + priv->md_dev.r_dev.d_buf = priv->md_iobuffer.rb_buf; +#endif + /* Register the device with the OS so that socket IOCTLs can be performed */ (void)netdev_register(&priv->md_dev.r_dev, NET_LL_IEEE802154); diff --git a/wireless/pktradio/pktradio_loopback.c b/wireless/pktradio/pktradio_loopback.c index d7b5ca66c0..79b5b51e1d 100644 --- a/wireless/pktradio/pktradio_loopback.c +++ b/wireless/pktradio/pktradio_loopback.c @@ -1048,6 +1048,15 @@ int pktradio_loopback(void) priv->lo_polldog = wd_create(); /* Create periodic poll timer */ +#ifdef CONFIG_NET_6LOWPAN + /* Make sure the our single packet buffer is attached. We must do this before + * registering the device since, once the device is registered, a packet may + * be attempted to be forwarded and require the buffer. + */ + + priv->lo_radio.r_dev.d_buf = g_iobuffer.rb_buf; +#endif + /* Register the loopabck device with the OS so that socket IOCTLs can be * performed. */