Commit graph

64 commits

Author SHA1 Message Date
Eduardo Montoya 5767998d4f drivers: ieee802154: nrf: make selective tx power the default
Remove `IEEE802154_SELECTIVE_TXPOWER` option.

Cache the tx power value in nRF5 driver and make use of it on each
operation.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-01-05 09:04:17 +01:00
Eduardo Montoya 574a533cb6 net: openthread: allow to configure CSL debugging
Add new `IEEE802154_CSL_DEBUG` Kconfig option that, when enabled,
prevents the radio to sleep after a delayed reception is finished.

This allows to debug CSL timing issues due to accuracy drifts in
communications between receiver and transmitter.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2023-06-17 07:48:25 -04:00
Robert Lubos f3bdac91b2 net: ieee802154: Remove IEEE802154_2015 option usage
The IEEE802154_2015 option is misleading, as it does not introduce full
802.15.4-2015 standard compliance but only random bits, plus it's
defined at the radio driver level, which brings yet another confusion.
Because of that, the option will be deprecated, and respective parts of
code that made use of it converted to use more specific configurations:

* nRF driver will now use CONFIG_NRF_802154_ENCRYPTION to specify
  whether to compile in TX security
* net_pkt will only add extra 802.15.4 control block fields if
  OpenThread is used, as they were solely used by this L2
* OpenThread radio layer will now use the OpenThread version to
  determine whether to compile in TX security.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-06-01 04:53:02 -04:00
Florian Grandel 32e1213b0c net: l2: ieee802154: improve inline documentation
Over time, some non-standard concepts and extensions were introduced
into the stack (in KConfig, in drivers, in the internal API and into the
implementation) which makes introduction of additional standard-
compliant extensions like TSCH (and others) unnecessarily difficult.

To introduce extensions like TSCH it is required for the IEEE 802.15.4
stack to become more structurally aligned with the standard again which
will be the focus of some of the upcoming preparatory changes.

One way to check and prove standard compliance is to reference the
standard from within the source code. This change therefore introduces
inline references to the IEEE 802.15.4-2020 standard wherever possible.
Deviations from the standard are documented with TODO or deprecation
labels to be addressed in future changes.

In the future, new code introduced to the IEEE 802.15.4 stack should
be documented and reviewed for standard-compliance to avoid further
divergence. Most importantly:
* MAC/PHY configuration (via net mgmt, radio API, devicetree or
  KConfig) should always be directly linked to well-defined MAC/PHY
  PIB attributes if visible to the MAC API or the end user.
* Net management/shell/radio API commands should have a documented
  reference to the corresponding MLME action from the standard.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-05-24 16:41:57 +02:00
Henrik Brix Andersen c41dd36de2 drivers: kconfig: unify menuconfig title strings
Unify the drivers/*/Kconfig menuconfig title strings to the format
"<class> [(acronym)] [bus] drivers".

Including both the full name of the driver class and an acronym makes
menuconfig more user friendly as some of the acronyms are less well-known
than others. It also improves Kconfig search, both via menuconfig and via
the generated Kconfig documentation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-28 15:06:06 +02:00
Florian Grandel 4f8c952c4a drivers: ieee802154: Make raw mode and l2 mutually exclusive
Activating both, the IEEE 802.15.4 raw mode /and/ the L2 mode is not
possible and in fact leads to a build error.

It should therefore not be possible to activate both options at the same
time. This is achieved by only offering the (rather exotic) raw mode
once the L2-support for the IEEE 802.15.4 has been switched off.

Fixes: #48715

Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
2022-08-05 15:04:43 +02:00
Gerard Marull-Paretas a6058dc4b1 drivers: ieee802154: IEEE802154 depends on NETWORKING
Previous to this change, each individual driver option depended on
NETWORKING. Instead, move dependency one level up.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-05 12:56:47 +02:00
Gerard Marull-Paretas e6a345f967 drivers: ieee802154: uart_pipe: make driver DT-based
Use Devicetree to describe the UART UPIPE IEEE 802.15.4 driver. This
allows to remove usage of IEEE802154_UPIPE_DRV_NAME in preparation for
the removal of NET_CONFIG_IEEE802154_DEV_NAME.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Gerard Marull-Paretas d904b5d908 drivers: ieee802154: uart_pipe: split Kconfig
As all other drivers, keep uart_pipe driver Kconfig settings into its
own file.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Jedrzej Ciupis 644da741f4 net: pkt: add IEEE 802.15.4 TX power field
This commit extends the `struct net_pkt` structure with
`ieee802154_txpwr` field that contains signed value of the desired
transmission power of a IEEE 802.15.4 frame in dBm.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2022-06-14 09:30:43 +02:00
Lukasz Maciejonczyk 8c6f49c845 drivers: ieee802154_nrf5: fix delayed operation accuracy
Align clock accuracy used in CSL calculations to the value in platform.
This is recomended setting for devices working in wide range
temperature. Nevertheless it can be profiled in end product to decrease
CSL window duration and finally the power consumption.

Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
2022-03-31 10:30:31 +02:00
Gerard Marull-Paretas dffaf5375c kconfig: tweak Kconfig prompts
Tweak some Kconfig prompts after the removal of "Enable...".

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-09 15:35:54 +01:00
Gerard Marull-Paretas 95fb0ded6b kconfig: remove Enable from boolean prompts
According to Kconfig guidelines, boolean prompts must not start with
"Enable...". The following command has been used to automate the changes
in this patch:

sed -i "s/bool \"[Ee]nables\? \(\w\)/bool \"\U\1/g" **/Kconfig*

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-09 15:35:54 +01:00
Robert Lubos 9a319226f8 net: ieee802154: Add common config for all 802154 L2s
Introduce a common config for all 802.15.4 based L2 implementations.
This way, any custom 15.4 L2 implementation will be able to
automatically enable use 15.4 driver, w/o a need to modify the actual
Kconfig.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-11-23 13:25:01 -05:00
Yuriy Vynnychek 1c0ed94601 drivers: ieee802154: introduce new Telink B91 IEEE802154 driver
IEEE802154 driver basic support for Telink B91 platform.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2021-08-04 11:58:02 +02:00
Eduardo Montoya 0f73fbdbfe drivers: ieee802154: add CSL receiver for nRF5
Implement CSL receiver functionality in nRF5 radio driver.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2021-06-24 11:31:24 -04:00
Eduardo Montoya a47677da06 net: openthread: add CSL transmitter API
This commit implements the OpenThread APIs to pass MAC keys and
frame counter to the radio layer in order to process the
transmission security. This is needed for the correct functioning
of a CSL transmitter.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2021-05-05 14:33:47 +02:00
Kamil Kasperczyk e4d20caee9 drivers: nrf: Added config option for OUI.
Support for defining vendor specific OUI (Organizationally
Unique Identifier) was added.

Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
2020-08-10 08:42:21 +03:00
Markus Becker 2115b575a4 net: ieee802154: Allow to disable auto-start of 802.15.4 interfaces
Some radio drivers need configuration before start-up. Up to now only
the RF2XX drivers allowed this, but other radio drivers need this as
well. In particular for setting EUI64 addresses.

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
2020-06-08 19:55:19 +03:00
Johann Fischer 8f983c3654 drivers: ieee802154: add Decawave DW1000 driver
Add initial support for Decawave DW1000
IEEE 802.15.4-2011 UWB transceiver.

Driver has basic functionality. Additional functions such
as reading out timestamps and delayed TX were implemented
for test purposes, but also require support in the 802154
subsystem.

Register, sub-register, and defaults defines in the file
ieee802154_dw1000_regs.h are taken from the Decawave's
DW1000 driver for the Mynewt OS.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-05-07 23:30:58 -05:00
Gerson Fernando Budke 67289d07fe drivers: ieee802154: rf2xx: Add initial driver
Add initial Atmel at86rf2xx transceiver driver. This driver uses device
tree to configure the physical interface. The driver had capability to
use multiple transceiver and systems with multiple bands can be used.
With this, 2.4GHz ISM and Sub-Giga can be used simultaneous.

Below a valid DT example. This samples assume same SPI port with two
transceivers.

&spi0 {
    status = "okay";
    label = "SPI_RF2XX";
    cs-gpios = <&porta 31 0 &porta 30 0>;

    rf2xx@0 {
        compatible = "atmel,rf2xx";
        reg = <0x0>;
        label = "RF2XX_0";
        spi-max-frequency = <7800000>;
        irq-gpios = <&portb 2 0>;
        reset-gpios = <&porta 3 0>;
        slptr-gpios = <&portb 3 0>;
        status = "okay";
    };

    rf2xx@1 {
        compatible = "atmel,rf2xx";
        reg = <0x1>;
        label = "RF2XX_1";
        spi-max-frequency = <7800000>;
        irq-gpios = <&portb 4 0>;
        reset-gpios = <&porta 4 0>;
        slptr-gpios = <&portb 4 0>;
        status = "okay";
    };
};

At the moment driver assume two transceiver are enouth for majority of
appications. Sub-Giga band will be enabled in future.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2019-12-13 11:23:23 +02:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Brett Witherspoon 48533751e0 drivers: ieee802154: add CC13xx / CC26xx driver
Add IEEE 802.15.4 suuport for TI CC13xx / CC26xx devices.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-09-25 08:49:55 +03:00
Brett Witherspoon cdc29175cc drivers: ieee802154: Make upipe configuration options depend on driver
The upipe specific configuration options are selectable unconditionally.
This commit makes them depend on the upipe driver being enabled.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-04-28 12:21:12 -04:00
Andrei Emeltchenko 13b02d620c ieee802154: Allow to set debug for RAW_CHANNEL
Allow to set debug also for RAW_CHANNEL and set general debug template
instead of networking one.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-11-15 08:42:52 -05:00
Krzysztof Chruscinski 0df41da4e9 drivers: ieee802154: Fix log configuration in kconfig
Log configuration was included only in case NET_L2_IEEE802154 was
enabled. In case of open thread this is not the case.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-11-10 12:38:29 -05:00
Jukka Rissanen 009e4dafa7 net: Make Kconfig template variables prettier
Adding spaces around "=" when definining Kconfig template so
that is more consistent with overall style of these template
variables.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-05 09:01:37 -04:00
Jukka Rissanen 90dc38f8c9 drivers: ieee802154: Convert to use new logging
Convert the IEEE 802.15.4 drivers to use the new logging system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-04 14:13:57 +03:00
Ulf Magnusson a81bc32677 drivers: ieee802154: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though, and is
inconsistent.

This will make the auto-generated Kconfig documentation have "No
defaults. Implicitly defaults to n." as well, which is clearer than
'default n if ...'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-03 17:11:31 -04:00
Ulf Magnusson 8df42eb4dc drivers: Replace ff hex constants with 0xff
This makes it easier to distinguish them from "true" undefined symbols.

Internally, all int/hex literals are treated as undefined symbols, which
always get their name as their value. The C tools work the same way.

The plan is to turn references to undefined Kconfig symbols into an
error later.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-13 13:35:56 -04:00
Pedro Martucci ede5b8ffc3 drivers/ieee802154: Add hw filtering support for upipe driver
Implements HW filtering for IEEE802.15.4 UART Pipe driver.

Signed-off-by: Pedro Martucci <pedropaulomartucci@gmail.com>
2018-02-20 14:47:14 +02:00
Kamil Sroka 32907813b9 drivers: 15.4: nrf5: Add OpenThread support to 802.15.4 driver
Initially add support for OpenThread only for nRF 802.15.4 radio driver.

Signed-off-by: Kamil Sroka <kamil.sroka@nordicsemi.no>
2018-01-29 22:42:03 -05:00
Tomasz Bursztyka 8ded57d3a2 drivers/ieee802154: Add support for Sub-GHz TI CC1200 chip
CC1200 is a sub-ghz chip supporting 6 ISM & SRD bands: 169, 433, 470,
868, 915 and 920 MHz, with features dedicated to IEEE 802.15.4(g).

Current driver enables CC1200 against actual IEEE 802.15.4 Soft-MAC. 'g'
version support in the Soft-MAC will follow later.

The chip itself is closer to a bare metal radio modem than to a usual
15.4 chip: up to the user to provide the right RF settings for the
carrier band. Such settings can be generaten through TI's SmartRF tool.

Hopefully, for channel selection, this driver will be clever enough to
compute the proper register change without any special input from the
user. This will work for all the bands supported by the chip.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-01-15 15:15:38 +02:00
Tomasz Bursztyka 5195ddf472 drivers/ieee802154: Cleanup Kconfig
A very old reference to former net stack was still lurking around.
Removing it.

Taking the opportunity to clear up dependencies.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-01-10 21:53:01 -05:00
Anas Nashif 429c2a4d9d kconfig: fix help syntax and add spaces
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-13 17:43:28 -06:00
Tomasz Bursztyka b52c0f24a6 net/ieee802154: Make RAW mode generic
- Renaming NET_L2_RAW_CHANNEL to NET_RAW_MODE
- Create a generic IEEE 802.15.4 raw mode for drivers
- Modify the IEEE 802.15.4 drivers so it passes the packet unmodified,
up to code using that mode to apply the necessary changes on the
received net_pkt according to their needs
- Modify wpanusb/wpan_serial relevantly

Fixes #5004

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-11-22 10:10:09 -05:00
Tomasz Bursztyka 05890b32b4 drivers/ieee802154: Fix licence headers in Kconfig files
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-08-16 11:44:39 -04:00
Anas Nashif 09bcd8ee74 Kconfig: make all syslog variables depend on SYS_LOG
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-04 14:34:54 -05:00
Bogdan Davidoaia 90e0665190 net: ieee802154: add native IEEE 802.15.4 driver for KW41Z
The driver uses KW41Z's IEEE 802.15.4 hardware registers (ZLL).

Origin: Original

Jira: ZEP-2026
Change-Id: I8eb82a7c16c8ca3e3003f8318f74a3651eb24f68
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-04-28 15:01:10 +03:00
David B. Kinder 93e4d7258d spell: fix Kconfig help typos: /boards /drivers
Fix misspellings in Kconfig help text

Change-Id: I3ae28a5d23d8e266612114bc0eb8a6e158129dc7
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-21 21:31:30 +00:00
Wojciech Bober f810a202c8 drivers/net/ieee802154: nRF5 802.15.4 radio driver
This commit adds a driver for nRF5 802.15.4 radio. This driver
is a wrapper for the driver provided by ext/hal/nordic/drivers.

Change-Id: I20ee4aff3d1b994c621ba8eaab208d15d85e4c01
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-02-22 17:28:24 +02:00
Wojciech Bober 573774a9bf drivers/net/ieee802154: Change configuration prefix
This commit changes Kconfig prefix for ieee802154 drivers to
IEEE802154_*. This is done for consistency with config prefixes
used in other subsystems.

Change-Id: Ibbb4d96d2b748f4f13135bde85304ec34c5a90a6
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-02-08 10:12:35 +02:00
Wojciech Bober c84b765fdd drivers/ieee802154: Split drivers Kconfig
This commit splits 802.15.4 drivers configuration into separate files.

Change-Id: Ie1bed862e8f4248240fef18bc211d0ee8ca1493c
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-02-08 10:12:34 +02:00
Andrei Emeltchenko 404a83a482 drivers: cc2520: Remove unused TI_CC2520 Kconfig option
Instead of TI_CC2520_CHANNEL option NET_L2_IEEE802154_ORFD_CHANNEL is
used.

Change-Id: I9b0c0ff6b2c42070d05c5cf3e4dc33c364be9a5c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-01-27 12:35:52 +02:00
Johann Fischer fa8d9c9d10 drivers: ieee802154: add MCR20A driver
Add driver and configuration for the MCR20A 802.15.4
transceiver.

Jira: ZEP-1429

Change-Id: I0b17b688220a47c2f0e5cde269064bbd0dec824a
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-01-27 12:35:51 +02:00
Johann Fischer ce189f84a9 ieee802154: conf: add common log level
Add common log level for all IEEE802154 drivers.

Change-Id: If92c96b14e630d4482aadf9cacb25662d6663399
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-01-13 10:29:00 +01:00
Tomasz Bursztyka 589a361e53 drivers: ieee802154: cc2520: Rename RX stack Kconfig option
Fibers do not exist anymore in unified kernel.
Also, let's just use that option directly so removing the internal
define which is then useless.

Change-Id: I1179d84401934b339d3a9ccd12f6145a120bcb2f
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:41:21 +02:00
Jukka Rissanen 68ea9377e6 net: Make native IP stack the default
As the native IP stack is now the default, there is no need
for corresponding Kconfig option.

Change-Id: I08e4992f540f928a2b7378e8803e634e38725348
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:17 +02:00
Jukka Rissanen 6b43821f20 net: Remove legacy Contiki based uIP stack
This commit removes the legacy Contiki based uIP stack.
The new native IP stack must be used after this commit.

The commit also removes following things:
- legacy cc2520 driver
- legacy ethernet drivers
- legacy IP stack samples

and changes these things:
- disabled tests that only work for legacy IP stack
- select new IP stack by default
- enable random number generator by default as it is needed
  by the new IP stack

Change-Id: I1229f9960a4c6654e9ccc6dac14a7efb9394e45d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:17 +02:00
Tomasz Bursztyka ed6ccead1e drivers: ieee802154: Let the initialization priority be done via Kconfig
Since the whole init level changes: all drivers and most of subsystems
are initialized at level POST_KERNEL. Unfortunately that broke legacy
tweaks on what to start first and after.

Let's raise cc2520 priority, still below net_init.

Jira: ZEP-1261

Change-Id: I0d91aa87a893584b3f5b39a193c823127961402f
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:41:07 +02:00