This makes the user interface a little hostile. People thing of an MTU of 1500 bytes, but the corresponding packet is really 1514 bytes (including the 14 byte Ethernet header). A more friendly solution would configure the MTU (as before), but then derive the packet buffer size by adding the MAC header length. Instead, we define the packet buffer size then derive the MTU.
The MTU is not common currency in networking. On the wire, the only real issue is the MSS which is derived from MTU by subtracting the IP header and TCP header sizes (for the case of TCP). Now it is derived for the PKTSIZE by subtracting the IP header, the TCP header, and the MAC header sizes. So we should be all good and without the recurring 14 byte error in MTU's and MSS's.
Squashed commit of the following:
Trivial update to fix some spacing issues.
net/: Rename several macros containing _MTU to _PKTSIZE.
net/: Rename CONFIG_NET_SLIP_MTU to CONFIG_NET_SLIP_PKTSIZE and similarly for CONFIG_NET_TUN_MTU. These are not the MTU which does not include the size of the link layer header. These are the full size of the packet buffer memory (minus any GUARD bytes).
net/: Rename CONFIG_NET_6LOWPAN_MTU to CONFIG_NET_6LOWPAN_PKTSIZE and similarly for CONFIG_NET_TUN_MTU. These are not the MTU which does not include the size of the link layer header. These are the full size of the packet buffer memory (minus any GUARD bytes).
net/: Rename CONFIG_NET_ETH_MTU to CONFIG_NET_ETH_PKTSIZE. This is not the MTU which does not include the size of the link layer header. This is the full size of the packet buffer memory (minus any GUARD bytes).
net/: Rename the file d_mtu in the network driver structure to d_pktsize. That value saved there is not the MTU. The packetsize is the memory large enough to hold the maximum packet PLUS the size of the link layer header. The MTU does not include the link layer header.
Squashed commit of the following:
sched: Rename all use of system_t to clock_t.
syscall: Rename all use of system_t to clock_t.
net: Rename all use of system_t to clock_t.
libs: Rename all use of system_t to clock_t.
fs: Rename all use of system_t to clock_t.
drivers: Rename all use of system_t to clock_t.
arch: Rename all use of system_t to clock_t.
include: Remove definition of systime_t; rename all use of system_t to clock_t.
drivers/xbee: Fixes issue with timeouts. Timeouts were in ticks but should have been in ms. This caused false triggers of timeout causing redundant packets, etc.
Approved-by: GregoryN <gnutt@nuttx.org>
Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>
include/nuttx/wireless/ieee80211: Cosmetic, coding standard changes from review of last merge.
drivers/wireless/ieee80211: Cosmetic, coding standard changes from review of last merge.
configs/photon: Cosmetic, coding standard changes from review of last merge.
arch/arm/src/stm32: SDIO changes from last review: Fix a few long lines and other coding standard issues; Make additions for SDIO card support dependent on a configuration option.
Author: hhuysqt <hyq9606@126.com>
Return IEEE 802.11 MAC address just as ethernet does
Modifyed bcmf_board_setup_oob_irq declaration
Modified OOB ISR function types
Add some logic according to WICED SDK
Bug fixed: data_offset counts in 4-bytes
Add BCM43438 logic for future developement
Add tips on using telnet
Use SDIO in-band interrupt instead of OOB interrupt, because Photon seems to unconnect the OOB interrupt line...
add SDIO in-band interrupt logic
Xbee: Adds a timeout to send logic to handle case where XBee module fails to respond to a Transmit request with a Transmit Status
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Squashed commit of the following:
arch/arm/src/stm32: Add Kconfig options needed by the HCI UART. Various fixes to finally get a clean error free compile with no unexpected warnings.
arch/arm/src/stm32: In HCI UART, use spin_lock_irqsave() instead of enter_critical_section() whenever possible.
arch/arm/src/stm32: In HCI UART, fix up naming of configurations so that they are unique. Still needs Kconfig settings. Modify logic so that there can be multiple HCI UARTs, some supporting DMA and some not.
arch/arm/src/stm32: Integrate watermarks and software Rx flow control into the HCI UART driver.
arch/arm/src/stm32: Eliminate some HCI UART UART configuration options. Per the HCI UART spec, the link will b 8 data bits, no parity, 1 stop bit... Always.
arch/arm/src/stm32: Trivial cleanup
arch/arm/src/stm32: Fixes most initial compilation issues STM32 HCI UART driver. Still need to set up USART configuration parmeters for HCI UART
arch/arm/src/stm32: Completes first cut at STM32 HCI UART driver.
arch/arm/src/stm32: Completes most of read logic for HCI UART. Still needs to be able to block if no read data is available. Still missing write and flush logic.
drivers/wireless: Remove txenable from HCI UART methods. arch/arm/src/stm32: Reorganize some structures in HCI UART.
arch/arm/src/stm32: Still messaging the HCI uart driver.
arch/arm/src/stm32: Some trivial renaming.
arch/arm/src/stm32: A little more HCI-UART logic.
arch/arm/src/stm32: Initial setup to support HCI-UART. Little more than the serial driver with some name changes and a few things removed.
Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>
Fix a few remaining refereces to cc3000.
Author: Alan Carvalho de Assis <acassis@gmail.com>
drivers/wireless/cc3000: emove the driver to support CC3000 because it doesn't use the USRSOCKET
Author: Alan Carvalho de Assis <acassis@gmail.com>
configs: Remove board support to CC3000 from all relevant configurations.
Author: Gregory Nutt <gnutt@nuttx.org>
configs/spark: Removes Spark board configuration. Still available in the Obsoleted repository. This is preparation for removal of CC3000 support by Alan Carvalho de Assis. If there is no CC3000 support, then there is no purpose in supporting the Spark either.
wireless/bluetooth: This completes the basic logic path that gets frames from the Bluetooth stack and into the network layer.
wireless/bluetooth: Fleshes out some of the network packet receive logic.
wireless/bluetooth: Replace buffer allocated with primitive allocator from ieee 802.15.4.
wireless/ieee802154: Fix a few typos.
wireless/bluetooth: More renaming in preparation for some real work.
wireless/bluetooth: Some trivial renaming; update comments
Squashed commit of the following:
wireless/bluetooth: Some small changes that gets to a clean compile by just eliminating some incorrect implementations (still with a lot of warnings. The logic is still incomplete but now not so lethal.
wireless/bluetooth: Restructuring: Connection interfaces should internal to wireless/bluetooth. include/nuttx/wireless/bt_conn.h removed and merged with wireless/bluetooth/bt_conn.h. Several fix to get closer to bt_netdev.c compiling. Need to design some not interfaces and use some existing interfaces to send and receiv packets.
wireless/bluetooth: Some organization with some network device compile errors fixed. Still not even close to compiling.
net/bluetooth: Fix numerous compile issues; Still open design issues with regard to the interface with the Bluetooth stack.
wireless/bluetooth: Create bt_netdev.c with a crude copy of mac802154_netdev.c. Does not not even compile yet.
include/nuttx/net: Add bluetooth.h. Content is not yet correct.
net/netpackets: Add bluetooth.h. Update net/bluetooth to use new socket address definition.
net/bluetooth: Some fixes for initial build.
net/bluetooth: Add initial support for Bluetooth sockets. The initial cut is just the a clone of the IEEE 802.15.4 socket support with name changes.
net/ieee802154: Fix some typos noted when cloning to create net/bluetooth.
Squashed commit of the following:
drivers/bluetooth: Re-architect Bluetooth UART driver to follow upper/lower half model. Completely untested.
drivers/bluetooth: Grr.. Another band-aid commit to stay in sync with master. Why is this so difficult
drivers/bluetooth: Band-aid commit to stay in sync with master. Lost it somehow.
drivers/wireless/bluetooth: A few changes, mostly thought experiments.
drivers/wireless/bluetooth: UART-based Bluetooth driver ported from the Intel/Zephyr arduino101_firmware_source-v1.tar package. This initial commit is the original files in the NuttX build environment with changes to conform with the coding standard. It should not even build.
cc1101: Changes from review of last PR.
remove gpio
remove cc1101 frame len
remove FLAGS_RXONLY flags
add cc1101 function
remove some waring
add cc1101 poll function
add cc1101 register
add cc1101 isr read data
add cc1101 spi deviceId
add cc1101 init2
add wait cc1101 chip ready
raw init cc1101
ieee802154: Simplifies notify() and rxframe() calls to a single notify() call. dataind's and all other "notifs" are now "primitives" which aligns with standard terminology
* mac802154: Adds missing breaks from case statement
* sixlowpan: Fixes bad logic where ACK is not requested if address is not a broadcast
* ieee802154: Simplification of "notifs" and "datainds" to generic primitives passed via a single notify call to the layer above the MAC
* Directories.mk should reference CONFIG_WIRELESS instead of CONFIG_DRIVERS_WIRELESS
* xbee_netdev: Network must be locked when calling sixlowpan_input
* sixlowpan: Reassembly buffer can't be freed if provided by radio driver
* sixlowpan: Don't free IOB if there is an error processing it as the MAC will try to pass it along to another receiver
* ieee802154: Adds basic logging to ieee802154_primitive.c
* Minor fixes after rebase
* xbee: Adds AT query timeout to retry if XBee doesn't respond to request
* same70-xplained: Adds Xbee support. Makes mikroBus slot Kconfig 'choice'
* mac802154: Removes unused function declaration
* drivers/mrf24j40: Fixes compilation error using . operator rather than -> operator
* mac802154_device: Changes a few mac802154_primtive_free's to ieee802154_primitive_free() and changes notif to primitive in a couple places.
* mac802154: Adds promiscous mode logic to bypass parsing of incoming frames. MAC char device also checks for promiscous mode and passes whole frames including header and FCS to the application if promiscous mode is enabled.
* sixlowpan: Fixes logic to correctly check if packet is large enough to include header. This would cause packets to be considered too small when they are sufficiently sized.
* sixlowpan: Fixes forwarding logic to use forwarding device rather than received device to look up destination link layer address
* net/ipforward: Fixes typo that caused build error when IP forwarding was enabled with CONFIG_NET_ICMPv6_NEIGHBOR enabled as well.
* configs/same70-xplained: Simple spelling fix
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Change all calls to mq_receive() and mq_timedreceive() in the OS to calls to nxmq_receive() and nxmq_timedreceive(), making appropriate changes for differences in return values.
sched/mqueue: Add nxmq_receive() and mxmq_timedreceive() which are functionally equivalent to the standard mq_receive and mq_timedreceive() except that (1) they do not create cancellation points, and (2) the do not modify the application's errno variable.
Change all calls to mq_send() and mq_timedsend() in the OS to calls to nxmq_send() and nxmq_timedsend(), making appropriate changes for differences in return values.
sched/mqueue: Add internal function nxmq_send() and nxmq_timedsend() that are equivalent to mq_send() and mq_timedsend() except that they do not create cancellation points and do to not modify the errno variable.
Replace all calls to sigqueue() in the OS proper with calls to nxsig_queue() to avoid accessing the errno variable.
sched/signal: Add nxsig_queue() which is functionally equivalent to sigqueue() except that it does not modify the errno variable.
Squashed commit of the following:
Change all calls to usleep() in the OS proper to calls to nxsig_usleep()
sched/signal: Add a new OS internal function nxsig_usleep() that is functionally equivalent to usleep() but does not cause a cancellaption point and does not modify the errno variable.
sched/signal: Add a new OS internal function nxsig_sleep() that is functionally equivalent to sleep() but does not cause a cancellaption point.