mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
net/bluetooth: Since the max header is always reported, the max frame size for purposes of allocation is the max header lenght plus the max payload, even though the frames with the max payload never have the max header length.
This commit is contained in:
@@ -74,7 +74,8 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_NET_6LOWPAN) && defined(CONFIG_WIRELESS_PKTRADIO)
|
||||
#if defined(CONFIG_NET_6LOWPAN) && (defined(CONFIG_WIRELESS_PKTRADIO) || \
|
||||
defined(CONFIG_NET_BLUETOOTH))
|
||||
static inline int netdev_pktradio_addrlen(FAR struct net_driver_s *dev)
|
||||
{
|
||||
FAR struct radio_driver_s *radio = (FAR struct radio_driver_s *)dev;
|
||||
@@ -154,14 +155,19 @@ int netdev_dev_lladdrsize(FAR struct net_driver_s *dev)
|
||||
}
|
||||
#endif /* CONFIG_WIRELESS_IEEE802154 */
|
||||
|
||||
#if defined(CONFIG_WIRELESS_PKTRADIO) || defined(CONFIG_NET_BLUETOOTH)
|
||||
#ifdef CONFIG_WIRELESS_PKTRADIO
|
||||
case NET_LL_PKTRADIO:
|
||||
#endif
|
||||
#ifdef CONFIG_NET_BLUETOOTH
|
||||
case NET_LL_BLUETOOTH:
|
||||
#endif
|
||||
{
|
||||
/* Return the size of the packet radio address */
|
||||
|
||||
return netdev_pktradio_addrlen(dev);
|
||||
}
|
||||
#endif /* CONFIG_WIRELESS_PKTRADIO */
|
||||
#endif /* CONFIG_WIRELESS_PKTRADIO || CONFIG_NET_BLUETOOTH */
|
||||
#endif /* CONFIG_NET_6LOWPAN */
|
||||
|
||||
default:
|
||||
|
||||
@@ -221,7 +221,7 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype)
|
||||
|
||||
#ifdef CONFIG_NET_BLUETOOTH
|
||||
case NET_LL_BLUETOOTH: /* Bluetooth */
|
||||
dev->d_llhdrlen = BLUETOOTH_FRAME_HDRLEN;
|
||||
dev->d_llhdrlen = BLUETOOTH_MAX_HDRLEN; /* Determined at runtime */
|
||||
#ifdef CONFIG_NET_6LOWPAN
|
||||
# warning Missing logic
|
||||
dev->d_mtu = CONFIG_NET_6LOWPAN_MTU;
|
||||
@@ -237,7 +237,7 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype)
|
||||
#if defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154)
|
||||
case NET_LL_IEEE802154: /* IEEE 802.15.4 MAC */
|
||||
case NET_LL_PKTRADIO: /* Non-IEEE 802.15.4 packet radio */
|
||||
dev->d_llhdrlen = 0;
|
||||
dev->d_llhdrlen = 0; /* Determined at runtime */
|
||||
#ifdef CONFIG_NET_6LOWPAN
|
||||
dev->d_mtu = CONFIG_NET_6LOWPAN_MTU;
|
||||
#ifdef CONFIG_NET_TCP
|
||||
|
||||
Reference in New Issue
Block a user