arm: codestyle fixes 1
* arm: a1x: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* arm: am335x: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* arm: c5471: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* arm: cxd56xx: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* arm: dm320: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* arm: efm32: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* arm: imx6: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* arm: imxrt: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* arm: kinetis: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
mac802154: Fixes issue where the txdesc's ackreq flag was not being set, despite the frame containing a Frame Control field with ACKREQ bit set.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
mac802154: Fixes issues with extended address. 1) Extended address should be read-only. 2) Extended address should be placed in frame in "reverse-canonical" order.
The extended address is a read-only attribute and thus an attempt to write the extended address should be denied. Instead, the extended address should really be either set by the PHY/radio itself, or provided at board bring-up time to the radio layer. The MAC layer now pulls in the extended address from the radio any time the MAC is reset.
The extended address is also supposed to be sent in the frame in reverse-canonical order. This is very confusing in the standard and it wasn't until I realized it was backwards in Wireshark that I researched this further. Searching online I find documents from the committee for suggestions/feedback on the future standard. It isn't in the 2015 standard but a newer version of the standard will presumably clarify this. It says that the extended address should be written in reverse-canonical form, meaning the OUI comes last, not first inside the frame.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
wireless network devices: Attach radio to d_buf before registering device to handle forwarding case.
When CONFIG_NET_IPFORWARD is enabled, and CONFIG_NET_6LOWPAN is being used, a packet that attempts to get forwarded on the 6LoWPAN interface will require that the radio's buffer be attached to d_buf. Otherwise the below exception will be hit.
~line 542 of sixlowpan_framelist.c
```
/* Recover the reassembly buffer from the driver d_buf. */
reass = (FAR struct sixlowpan_reassbuf_s *)radio->r_dev.d_buf;
DEBUGASSERT(reass != NULL);
```
The underlying "radio" in this case is the mac802154_netdev.
This behavior has probably not been observed because the buffer is normally attached in the periodic txpoll worker. However, in my case, the 6LoWPAN interace was not UP yet, and therefore the worker hadn't run yet.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
ieee802154: Support dynamic FCS length. Adds IEEE802154_ATTR_PHY_FCSLEN.
This change introduces IEEE802154_ATTR_PHY_FCSLEN which the radio layer can support to set/get the FCS length that's added to the end of the frame. One use case, in promiscuous mode, is to add back in the FCS of the received frame by increasing the iob->io_len by the FCS length.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
net/ipforward: Check if interface is up early on when forwarding to avoid extra work.
As noticed in a previous wireless commit, when forwarding is enabled and a packet comes in, the packet is attempted to be sent on each other netdev without regard for whether it is in the UP state. Of course this is eventually caught, but it can be caught earlier to avoid unnecessary work, especially in the 6LoWPAN case where a useless packet conversion will occur.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Mac attributes
* wirelesss/ieee802154/mac802154: Makes comment more clear that it's related to an outbound frame, not an incoming frame.
* wireless/ieee802154: Adds support for getting/setting macMaxFrameRetries via IOCTL
* wireless/.ieee802154/mac802154: Add get support for rxonidle attribute
Approved-by: Gregory Nutt <gnutt@nuttx.org>
wireless/ieee8021254: Adds support for energy detect.
Adds support for energy detect by introducing a new radio call/callback, as the PHY layer is required to perform the energy detect.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
mac802154_netdev: Allow 64-bit prefix to be configurable when auto-configuring the IPv6 address during bring-up.
Previously, the link-local prefix fe80::/64 was used. Also, put the network in the DOWN state at the end of initialization.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Master
* Revert "Merged in yanqil-br/feature-multi_chan_pwm (pull request #973)"
This reverts commit aef0e0b538.
* arch/arm/src/{stm32/stm32f7/stm32h7/stm32l4}/stm32_pwm.c: configure multi-channel duty only if channel specified. This allows you to update duty cycle for a single channel
* nucleo-f303re/configs: add basic NSH configuration
* nucleo-f303re/configs/pwm: enable console on UART2 and set entry point to nsh_main
Approved-by: Gregory Nutt <gnutt@nuttx.org>
stm32f7: USART1_RXDMA is dependent on STM32F7_DMA2 not STM32F7_DMA1
Approved-by: David Sidrane <david.sidrane@nscdg.com>
Approved-by: Alan Carvalho de Assis <acassis@gmail.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
arch/arm/src/tiva/Kconfig:
Remove EXPERIMENTAL dependency on TIVA_TIMER16_PWM.
arch/arm/src/tiva/common/tiva_timerlib.c:
Fix wrong 32/16-bit ifdef checks.
Add tiva_pwm16_sel_event() to choose GPTMCTL.TnEVENT value.
Implement tiva_pwm_mode16().
tiva_timer16_setinterval(): Fix wrong check for TIMER16_MODE_ONESHOT
and TIMER16_MODE_PERIODIC. Was comparing to config->cmn.mode
which can never have those values. This prevented interrupts being
enabled. Compare to timer->mode instead.
Add tiva_timer16pwm_setperiodduty() to set initial period, duty cycle,
and enable interrupts if requested in GPTM peripheral. Interrupts
are not enabled in NVIC until tiva_timer16_start() is called.
Add tiva_timer16pwm_setduty() to update duty cycle at any time.
arch/arm/src/tiva/hardware/lm/lm3s_timer.h,
arch/arm/src/tiva/hardware/lm/lm4f_timer.h,
arch/arm/src/tiva/hardware/tm4c/tm4c123_timer.h,
arch/arm/src/tiva/hardware/tm4c/tm4c129_timer.h:
Add missing defines; make surrounding defines consistent.
arch/arm/src/tiva/tiva_timer.h:
Add new TIMER_FLAG_* configuration flags to enable configuring the
16-bit PWM feature. Extend type of "flags" in tiva_timer32config_s
and tiva_timer16config_s from 8- to 32-bits to allow more flags.
If we are using the BASEPRI register to disable interrupts, then the answer is that we must disable ONLY the "normal interrupts". That is because we cannot disable SVCALL interrupts and we cannot permit SVCAll interrupts running at a higher priority than the high priority interrupts (otherwise, they will introduce jitter in the high priority interrupt response time.)
Hence, if you need to disable the high priority interrupt, you will have to disable the interrupt either at the peripheral that generates the interrupt or at the NVIC. Disabling global interrupts via the BASEPRI register cannot effect high priority interrupts.
codestyle fixes
* misoc: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* or1k: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* renesas: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* risc-v: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sim: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* x86: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* xtensa: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* z16: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* z80: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
avr: hc: mips: codestyle fixes
* avr: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* hc: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* mips: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>