1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

365 Commits

Author SHA1 Message Date
Leandro Lanzieri
1acfe7ae19
gnrc/nib: Move GNRC_IPV6_NIB_CONF_6LN to 'CONFIG_' namespace
Also evaluate it using IS_ACTIVE macro.
2020-03-31 18:07:04 +02:00
Jose Alamos
44f7cb712c gnrc_netif: add GNRC_NETIF_SINGLE macro 2020-03-26 14:19:02 +01:00
Jose Alamos
e451570219 gnrc_netif: remove GNRC_NETIF_NUMOF macro 2020-03-26 11:12:23 +01:00
Jose Alamos
67ed9defbe gnrc_netif_xxx_create: use external netif allocation 2020-03-26 11:12:23 +01:00
Francisco
cdbf0b2d69
Merge pull request #13583 from benpicco/at86rf215-minimal
drivers/at86rf215: add basic support for AT86RF215 dual-band radio
2020-03-20 09:33:50 +01:00
benpicco
5435792034
Merge pull request #12277 from benemorius/pr/kw41zrf
drivers: add kw41zrf
2020-03-20 00:49:56 +01:00
Joakim Nohlgård
5bd67d88a8 drivers/kw41zrf: Transceiver driver for the KW41Z radio
This is the radio found in NXP Kinetis KW41Z, KW21Z. Only 802.15.4 mode
is implemented (KW41Z also supports BLE on the same transceiver).

The driver uses vendor supplied initialization code for the low level
XCVR hardware, these files were imported from KSDK 2.2.0 (framework_5.3.5)
2020-03-19 17:00:04 -05:00
Benjamin Valentin
d35511bee7 drivers/at86rf215: Add basic driver for the AT86RF215 radio
This adds a driver for the SPI based AT86RF215 transceiver.
The chip supports the IEEE Std 802.15.4-2015 and IEEE Std 802.15.4g-2012 standard.

This driver supports two versions of the chip:
    - AT86RF215:  dual sub-GHz & 2.4 GHz radio & baseband
    - AT86RF215M: sub-GHz radio & baseband only

Both radios support the following PHY modes:
    - MR-FSK
    - MR-OFDM
    - MR-O-QPKS
    - O-QPSK (legacy)

The driver currently only implements support for legacy O-QPSK.

To use both interfaces, add

    GNRC_NETIF_NUMOF := 2

to your Makefile.

The transceiver is able to send frames of up to 2047 bytes according to
IEEE 802.15.4g-2012 when operating in non-legacy mode.

Known issues:

 - [ ] dBm setting values are bogus
 - [ ] Channel spacing for sub-GHz MR-O-QPSK might be wrong
 - [ ] TX/RX stress test will lock up the driver on openmote-b
2020-03-19 14:39:18 +01:00
Jose Alamos
4393822b0f gnrc_netif: add function to check if device requires 6Lo 2020-03-17 10:54:30 +01:00
Jose Alamos
6ace7b5472 gnrc_netif: use gnrc_netif_single where possible 2020-03-17 10:54:30 +01:00
benpicco
7af046d740
Merge pull request #13548 from benpicco/sys/auto_init/netif-manual
sys/auto_init: allow delayed initialisation of SAUL & gnrc_netif
2020-03-05 17:05:02 +01:00
Benjamin Valentin
4f7d5b105b sys/net/gnrc: Flag esp_now as 6LN
In gnrc_netif_init_6ln() the flag GNRC_NETIF_FLAGS_6LN is accidentally not set
for esp_now devices. This commit fixes this.
2020-03-05 15:18:43 +01:00
Benjamin Valentin
d765098d72 sys/auto_init: allow delayed initialisation of gnrc_netif
Co-authored-by: Martine S. Lenders <m.lenders@fu-berlin.de>
2020-03-04 16:13:40 +01:00
Sebastian Meiling
a4c4c25b3b
Merge pull request #12866 from jia200x/pr/gnrc_lorawan_remove_netdev
net/gnrc_lorawan: remove netdev layer from MAC
2020-01-30 14:02:59 +01:00
Jose Alamos
cc2fd97194 net/gnrc_lorawan: remove netdev abstraction from MAC layer 2020-01-27 10:10:24 +01:00
Francisco
1d206bca24
Merge pull request #12409 from miri64/gnrc_netif/fix/highest-source-scope-wins
gnrc_netif: highest source address scope wins selection
2020-01-14 10:43:24 +01:00
Martine S. Lenders
018e3dd437
gnrc_netif: use scope directly from address for multicast 2020-01-14 09:54:18 +01:00
Martine S. Lenders
85737a0436
gnrc_netif: remove misleading comment
The comment exists since the introduction of the [original
implementation], but its meaning is unclear and misleading, as the code
doesn't do anything with link-local.

[original implementation]: https://github.com/RIOT-OS/RIOT/pull/3561
2020-01-14 09:54:18 +01:00
Martine S. Lenders
46fd632e91
gnrc_netif: highest source address scope wins selection
Rule 2 of the source address algorithm outlined in [RFC6724] states the
possible source addresses must also be compared among each other:

>     Rule 2: Prefer appropriate scope.
>     If Scope(SA) < Scope(SB): If Scope(SA) < Scope(D), then prefer SB and
>     otherwise prefer SA.  Similarly, if Scope(SB) < Scope(SA): If
>     Scope(SB) < Scope(D), then prefer SA and otherwise prefer SB.

Our current implementation doesn't do that. It just checks if the scope
of a possible source is lesser than the scope of the destination
(which involves the second "If" in the rule).

This fix grants points according to the scope of an address. If the
scope matches, they get the highest points, ensuring that the selected
source will always be reachable from the destination.

[RFC6724]: https://tools.ietf.org/html/rfc6724
2020-01-14 09:54:17 +01:00
PeterKietzmann
fb71ccc098 net/gnrc/netif:GNRC_NETIF_MIN_WAIT_AFTER_SEND_US to 'CONFIG_' namespace 2020-01-13 12:28:37 +01:00
PeterKietzmann
9e83d12bc0 net/gnrc/netif: Move GNRC_NETIF_IPV6_ADDRS_NUMOF to 'CONFIG_' namespace 2020-01-13 12:28:37 +01:00
PeterKietzmann
724d58b074 net/gnrc/netif: Move GNRC_NETIF_MSG_QUEUE_SIZE to 'CONFIG_' namespace 2020-01-13 12:28:37 +01:00
PeterKietzmann
b28a586702 net/gnrc/netif: Move GNRC_NETIF_DEFAULT_HL to 'CONFIG_' namespace 2020-01-13 12:28:37 +01:00
PeterKietzmann
c654d1fc8b Kconfig: Expose gnrc/netif configurations 2020-01-13 12:28:31 +01:00
Francisco
dcc5299682
Merge pull request #10667 from miri64/gnrc_sixloenc/enh/6lo-config
gnrc_netif: make 6LoENC dynamically configurable
2020-01-06 13:19:24 +01:00
Jose Alamos
8999528390 net/gnrc_lorawan: add MIB for setting RX2 datarate 2019-12-03 14:48:29 +01:00
Jose Alamos
1e9bb7c175 net/gnrc_lorawan: add MIB for setting L2 address 2019-12-03 14:27:56 +01:00
Jose Alamos
99dbcecc3a net/gnrc_lorawan: remove netdev SAP interface 2019-12-03 14:08:35 +01:00
Leandro Lanzieri
8aa66e94ea net/gnrc/netif: Remove 'if' prefix from interface names 2019-11-29 10:22:00 +01:00
MichelRottleuthner
bf676d4728
Merge pull request #11022 from jia200x/pr/gnrc_lorawan
gnrc_lorawan: add support for GNRC based LoRaWAN stack
2019-11-27 09:25:20 +01:00
Jose Alamos
2edaead13e gnrc_netif: add gnrc_lorawan adaption layer 2019-11-26 21:52:06 +01:00
Marian Buschsieweke
bd8c4b36aa
sys/net/gnrc: Flag cc110x as 6LN
In gnrc_netif_init_6ln() the flag GNRC_NETIF_FLAGS_6LN is accidentally not set
for cc110x devices. This commit fixes this.
2019-11-11 09:24:01 +01:00
Martine Lenders
6493a9e69f gnrc_netif: assume netif->ops->init() to be set 2019-11-07 11:00:36 +01:00
Martine Lenders
14a2f6bc18 gnrc: use gnrc_netif_default_init() for all implementations 2019-11-07 11:00:36 +01:00
Martine Lenders
09b5db28f1 gnrc_netif: expose common init function as default 2019-11-06 18:45:16 +01:00
Martine Lenders
4b82a56c89 gnrc_netif: introduce common init function 2019-11-06 18:45:15 +01:00
Martine Lenders
5d11cf26f0 gnrc_netif: use 6LoENC only when 6Lo flag is set 2019-10-30 17:10:34 +01:00
Martine Lenders
e04a190511 gnrc_netif_ethernet: make 6LO configurable for 6LoEnc 2019-10-30 17:10:34 +01:00
Francisco
0364c39694
Merge pull request #12408 from miri64/gnrc_netif/fix/src-addr-selection
gnrc_netif: only use prefix matching as tie-breaker in source selection
2019-10-24 17:14:17 +02:00
Martine S. Lenders
e9d75f5655 gnrc_netif: remove filter parameter from _match_to_idx()
`_match_to_idx()` was removed from source address selection (which was
the only one setting the filter parameter to a non-NULL value), so it
is the parameter is not needed anymore.
2019-10-24 16:04:41 +02:00
Martine S. Lenders
e787f6b60d gnrc_netif: only use prefix matching as tie-breaker in source selection
When source address selection is done, both RFC and comments in the code
state, that a longest prefix match should *only* be used as a
tie-breaker between more than one viable candidate. If there is only one
address, there is

a) no need for a tie-breaker
b) in the case of either the destination address or the single remaining
   address being ULAs ([which are considered to be of global scope]
   [RFC4193]) possibly not matching, as `fd00::/7` and e.g. `2001::/8`
   do not have a common prefix.

(b) in fact causes the match function to return -1, causing the source
address selection to return -1, causing the outer function to return the
first address it found (which most often is the link-local address),
causing e.g. a ping to an ULA to fail, even is there is a global
address.

[RFC4193]: https://tools.ietf.org/html/rfc4193
2019-10-24 16:04:41 +02:00
Martine Lenders
88090bc0f6 gnrc_netif: warn when not joining solicited-nodes from non-6LN netif
Similar as with #12513, when the NIB is compiled in 6LN mode (but not
6LR mode), the address-resolution state-machine (ARSM) functionality is
disabled in favor of the more simpler address resolution proposed in RFC
6775.

However, if a non-6LN interface is also compiled in (without making it
a router or border router) it will never join the solicited-nodes
multicast address of addresses added to it, resulting in address
resolution to that interface to fail.

If the interface is not a 6LN (which in case 6LN mode is disabled is
always false), a warning is now printed, encouraging the user to
activate the ARSM functionality if needed.
2019-10-22 22:14:03 +02:00
Martine S. Lenders
2458a612b6 gnrc_netif: reduce code duplication 2019-10-21 16:09:37 +02:00
Martine S. Lenders
e96faca739 gnrc_netif: add code comments on source candidate set selection 2019-10-21 16:09:37 +02:00
f8de22a985 gnrc/netif: _match_to_idx(): don't treat link local differently
Cherry-picked from 811c1ee70e (#12404)
2019-10-21 16:09:37 +02:00
Martine Lenders
6ad62b01a4 gnrc_netif: distinct is_6lo() and is_6ln()
The functions now are semantic distinct:

- gnrc_netif_is_6lo(): the interface is a 6Lo interface
- gnrc_netif_is_6ln(): the interface is using Neighbor Discovery
  according to RFC 6775
2019-10-20 15:38:14 +02:00
Martine Lenders
363afa62ee gnrc_netif: introduce 6LN flag
This makes it dynamically configurable if an interface actually want's
to use 6Lo ND (according to RFC 6775) or not.
2019-10-20 15:38:13 +02:00
Martine Lenders
8bcce5615e gnrc_netif: use is_6lo() instead of is_6ln() 2019-10-20 15:38:13 +02:00
Jose Alamos
8fd0c2b60f gnrc_netif: adapt to new netif_t abstraction 2019-10-11 10:59:14 +02:00
Martine S. Lenders
ada7c0b7db gnrc_netif: avoid deprecated addresses, don't prefer them! 2019-10-09 15:18:14 +02:00
Martine S. Lenders
1ca05f0c08 gnrc_netif_ethernet: fix debug output for received packet
A received packet is outputted in DEBUG _after_ it was already parsed,
but with a reference to the already parsed header. The result is that
there can be some garbage in the output and the packet is not dumped in
total. As without parsing we do not have access to the header yet, we
use the `gnrc_netif_addr_to_str()` helper function instead of parsing
the destination address by hand.
2019-09-16 14:01:16 +02:00
Hauke Petersen
504acc5097 net/l2util: add nimble opt for addr resolution 2019-08-28 16:48:03 +02:00
Francisco
fde50372c3
Merge pull request #11837 from miri64/gnrc_netif/enh/inter-tx-wait
gnrc_netif: allow for wait of minimum time between sends
2019-08-09 10:53:26 +02:00
Martine Lenders
488c47cbf3 gnrc_netif: allow for wait of minimum time between sends 2019-08-09 10:21:42 +02:00
Martine S. Lenders
4a38dabc70 gnrc_netif_ieee802154: use gnrc_netif_hdr_set_netif() 2019-07-25 14:56:47 +02:00
Martine S. Lenders
006f10c2af gnrc_netif_ethernet: use gnrc_netif_hdr_set_netif() 2019-07-25 14:15:37 +02:00
Martine Lenders
3c19aa7dfc gnrc_netif_ieee802154: check if mhr_len is lesser than nread 2019-04-15 16:36:31 +02:00
Martine Lenders
768a117ade gnrc_netif: fix fall-through comment
gcc 8.2.1 has problems with the comment being within the `#ifdef`
2019-03-27 19:45:40 +01:00
Martine Lenders
39fe2a30e4 gnrc_netif: use l2util for some functions
The following functions can now be wrapped around the more generalized
approach:

- gnrc_netif_ipv6_iid_from_addr()
- gnrc_netif_ipv6_iid_to_addr()
- gnrc_netif_ndp_addr_len_from_l2ao()
- gnrc_netif_eui64_from_addr()
2019-03-26 21:37:20 +01:00
Martine Lenders
05bca5b2cf gnrc_netif: fix DEBUG output on error
`res` is an integer that is always negative in the given case, so using
`%u` here might be a little bit confusing.
2019-03-26 18:23:56 +01:00
Martine Lenders
bcb6b921d3
Merge pull request #11255 from aabadie/pr/gnrc_netif_nrfmin_fix
net/gnrc_netif/nrfmin: put NETOPT_PROTO assert at the right place
2019-03-24 15:01:50 +01:00
5fa2528185
net/gnrc_netif/nrfmin: put NETOPT assert at the right place
NETOPT depends on GNRC_SIXLOWPAN and should be moved inside the corresponding preprocessor conditional code
2019-03-24 14:34:12 +01:00
Jose Alamos
83ba971412
gnrc_netif: add NETDEV_TYPE_LORA to L2ADDR check 2019-03-24 11:10:41 +01:00
ccc09d9ed4
Merge pull request #11023 from miri64/gnrc_netif_ieee802154/enh/propagate-pend-frames
gnrc_netif_ieee802154: propagate pend. frame flag to stack
2019-03-15 12:51:50 +01:00
Martine Lenders
7d8f6abd45 gnrc_netif: check all required options on initialization
With `DEVELHELP` activated all required options required by GNRC are
now checked at interface initialization, so that developers of new
link-layer protocols or device drivers notice as soon as possible that
something is missing.
2019-02-26 16:45:21 +01:00
Martine Lenders
0f1bfad15b gnrc_netif: provide addr_len_from_l2ao for nordic_softdevice_ble 2019-02-26 15:43:39 +01:00
Martine Lenders
13030d5a35 gnrc_netif: expose message queue size configurable 2019-02-26 13:26:20 +01:00
Martine Lenders
727a843ce4
Merge pull request #10905 from maribu/packet_size_l2_pdu
net: NETOPT_MAX_{PACKET_SIZE -> PDU_SIZE}
2019-02-22 15:23:00 +01:00
Martine Lenders
998b9ed0d4 gnrc_netif_hdr: make in parameters const 2019-02-21 12:43:08 +01:00
Marian Buschsieweke
4672368d5a
sys/net: NETOPT_MAX_{PACKET_SIZE -> PDU_SIZE}
Updated code to use NETOPT_MAX_PDU_SIZE instead of deprecated
NETOPT_MAX_PACKET_SIZE.
2019-02-18 20:15:08 +01:00
Martine Lenders
eac066a1e5 gnrc_netif_ieee802154: propagate pend. frame flag to stack
This way we can re-use the flag e.g. for forwarding
2019-02-15 14:46:43 +01:00
Peter Kietzmann
63fd8bc89b
Merge pull request #7577 from miri64/gnrc_netif2/feat/ieee802154-dup-bcast
gnrc_netif_ieee802154: drop duplicate broadcast packets (optionally)
2019-02-11 09:42:06 +01:00
Martine Lenders
985d98073f gnrc_netif_ieee802154: drop duplicate broadcast packets (optionally) 2019-02-04 16:19:48 +01:00
Peter Kietzmann
2c5d1b013e
Merge pull request #10918 from maribu/cc110x_mtu
drivers/cc110x: Fixed MTU calculation
2019-02-04 09:44:10 +01:00
Marian Buschsieweke
dae680dcb2
sys/net: Added NETDEV_TYPE_CC110X to MTU init 2019-02-04 09:16:29 +01:00
smlng
6d0384f068 netstats: collect layer 2 netstats in gnrc_netif
This the first step in moving the collection of layer 2 netstats from
the low level driver to a central location, ie. gnrc_netif, to avoid
code duplication.
2019-02-01 10:35:03 +02:00
Martine Lenders
0fa8419c4a gnrc_netif: wrap _ipv6_iid_from_addr() around _eui64_from_addr() 2019-01-29 21:52:53 +01:00
Martine Lenders
16e7fc8336 gnrc_netif: introduce L2 address to EUI-64 conversion 2019-01-29 21:52:53 +01:00
Martine Lenders
a2b2f96fe3 gnrc_netif: rename _create_iid_from_short() to emphesize EUI-64 2019-01-29 21:52:53 +01:00
Cenk Gündoğan
82f30fd8c4
Merge pull request #10514 from miri64/pkg/enh/nordic-softdevice-ble-mac48
pkg/nordic_softdevice_ble: Use MAC48 as hardware address
2019-01-17 19:22:36 +01:00
Martine Lenders
7f7bc8fc20 pkg/nordic_softdevice_ble: Use MAC48 as hardware address
This is just a compatibility issue waiting to happen as soon as there
is support for a more standard-compliant implementation of BLE (like
e.g. NimBLE ;-)).
2019-01-17 18:08:55 +01:00
Martine Lenders
55b9757044 gnrc_netif: centralize function to init IPv6 MTU 2019-01-16 15:52:54 +01:00
Martine Lenders
ea9bbd72b8 gnrc_netif: centralize function to get l2addr NETOPT 2019-01-16 15:52:54 +01:00
Martine Lenders
8f763535ac gnrc_netif: centralize S/TLLAO length to address length function
The function to infer the link-layer address length from the length of
a S/TLLAO is very dependent on the IPv6 over X specification and thus
should be grouped with the other IP over X functions.
2019-01-16 15:52:53 +01:00
Cenk Gündoğan
6a4c764c95
Merge pull request #10569 from miri64/gnrc_netif/enh/rm-get-NETOPT_IPV6_IID
gnrc_netif: make _get_iid() just wrapper around _iid_from_addr()
2019-01-14 14:09:34 +01:00
Martine Lenders
7ae90564d9 gnrc_netif: make _get_iid() just wrapper around _iid_from_addr()
This way the IID generation gets much simplified and code duplication
is avoided since it removes GNRC's requirement for NETOPT_IPV6_IID.
2019-01-14 13:42:58 +01:00
Gunar Schorcht
dbb5e886e5 gnrc_netif_ieee802154: use pid member in netif header
Use the `gnrc_netif_t::pid` member instead of the pid of the current thread when generating the the `gnrc_netif_hdr` in `gnrc_netif_ieee802154::_recv` function.
2019-01-10 00:09:52 +01:00
Gunar Schorcht
3876dd4bb9 gnrc_netif_ethernet: use pid member in netif header
Use the `gnrc_netif_t::pid` member instead of the pid of the current thread when generating the the `gnrc_netif_hdr` in `gnrc_netif_ethernet::_recv` function.
2019-01-10 00:09:24 +01:00
Martine Lenders
481f742c71 gnrc_netif: interface configuration for 6LoENC 2019-01-04 13:32:24 +01:00
b77c802f9b
Merge pull request #10666 from miri64/netopt/new/6lo
netopt: provide option to (de-)activate 6Lo
2019-01-03 18:50:31 +01:00
Martine Lenders
45b9dd6f50 gnrc_netif: implement get NETOPT_6LO 2019-01-03 16:21:52 +01:00
Timo Rothenpieler
814e4ecbbe gnrc_netif: ESP-NOW talks 6Lo now 2018-12-29 13:15:44 +01:00
Hauke Petersen
ec37ff5825 gnrc/netif: use eui48_x() for IID handling 2018-12-06 22:02:01 +01:00
Hauke Petersen
92fcb4de6a
Merge pull request #10513 from miri64/gnrc_netif/enh/iid-conversion
gnrc_netif: add general IID to/from l2addr conversion functions
2018-12-06 15:57:06 +01:00
Martine Lenders
a44f7f7b38 gnrc_netif: use general IID conversion function for netif-based 2018-12-06 14:41:30 +01:00
Martine Lenders
5ca30b9b03 gnrc_netif: add general IID to/from l2addr conversion functions
They are required to make GNRC's 6Lo IPHC implementation ready for
hardware addresses other than IEEE 802.15.4's.
2018-12-06 14:41:30 +01:00
Martine Lenders
08524ca1d2 gnrc_netif_hdr: move path resolve to gnrc_netif submodule resolution
No that we introduced sub-modules to `gnrc_netif` we can move that here
as well.
2018-12-05 15:04:45 +01:00
Martine Lenders
72c5fd06b4 gnrc_netif: make link-layer specific operations proper submodules 2018-12-05 15:04:04 +01:00
Martine Lenders
6547b2185b gnrc_netif: remove ESP-Now related code-duplication 2018-11-29 15:32:09 +01:00
Martine Lenders
03b91cbcb8 esp_now: use NETDEV_TYPE_ESP_NOW as device type 2018-11-29 13:35:20 +01:00
Hauke Petersen
ace5db70e8 net/gnrc_netif: opt of _ipv6_get_iid() 2018-11-22 15:30:11 +01:00
Joakim Nohlgård
52ac53b4d9 gnrc_netif_ieee802154: Provide LQI, RSSI in raw mode via netif_hdr
Useful in sniffer situations to see the signal strength of a received
packet. Also avoids the crash described in
https://github.com/RIOT-OS/applications/pull/54
2018-10-27 00:22:51 +02:00
Gaëtan Harter
c5deac4865
Merge pull request #10023 from miri64/gnrc_netif/fix/no-addr-but-addr-len
gnrc_netif: Fix l2addr_len > 0, but no l2addr edge-case
2018-10-25 14:31:32 +02:00
Kevin "Bear Puncher" Weiss
7187bbf8cf
Merge pull request #9426 from gschorcht/esp32
ESP32 port
2018-10-16 15:24:25 +02:00
Schorcht
3ac99877ac cpu: add esp32 2018-10-08 12:20:49 +02:00
Peter Kietzmann
ed24d3622a
Merge pull request #9621 from bergzand/pr/netif/use_fmt
gnrc_netif: Use fmt for bytes to hex string
2018-10-04 14:34:37 +02:00
0d71c1ccf7
gnrc_netif: Use fmt for bytes to hex string 2018-10-04 13:34:18 +02:00
90ad1a0782
gnrc_netif_ieee802154: remove state access in recv
This replaces the netif->state accesses in netif::recv with a netdev call
and the new netif RAWMODE flag
2018-10-03 21:00:35 +02:00
3c032e5688
gnrc_netif: add rawmode flag
Adds a gnrc_netif specific rawmode flag to indicate that the netdev
device is configured in raw mode. This flag is kept in sync with a
possible flag in the netdev device and should only be modified via the
setter call.
2018-10-03 20:59:03 +02:00
Martine Lenders
05aa8ab66b gnrc_netif: assert that l2addr_len is 0 without address
If the device provides an address length, but no address it is
obviously faulty.
2018-09-25 18:45:32 +02:00
05b6af466c sys: add missig <string.h> includes 2018-09-20 23:47:40 +02:00
Joakim Nohlgård
6d6a6efac7 gnrc_netif: Check return value of netdev init during thread start 2018-08-24 12:11:12 +02:00
Joakim Nohlgård
a247d8bfa5 gnrc_netif_ieee802154: set Frame Pending bit sometimes
Set frame pending bit in IEEE 802.15.4 FCF when
GNRC_NETIF_HDR_FLAGS_MORE_DATA is set on the netif header on outbound
frames.
2018-08-13 09:27:18 +02:00
smlng
d4e8c57621 gnrc_netif: generalise address search functions
Reduce code duplication by combining internal helper functions
    that either loop over interface addresses or multicast groups.
2018-08-06 16:28:48 +02:00
smlng
7cb41ba829 gnrc_netif: cleanup debug output
Correct typos and wording in debug output.
2018-08-06 16:28:48 +02:00
smlng
8e3953cd6c gnrc_netif: cleanup address matching
Cleanup of internal helper functions for IPv6 address matching.
2018-08-06 16:28:48 +02:00
30e683ccfe
gnrc_netif: reapply event flags on device reset
On a NETOPT_STATE set call with NETOPT_STATE_RESET the netdev device
resets the callback event flags. This requires that after the netdev
device resets, the network stack also reapplies these callback event
flags
2018-07-19 14:51:14 +02:00
ea6a2ef494
gnrc_netif_ieee802154: drop frame on buffer error
This adds a netdev recv call to indicate that the received frame should be
dropped when there is no buffer space available to store the frame.
2018-07-12 16:15:00 +02:00
Martine Lenders
8d47210228 gnrc_netif: don't spam user if dev doesn't support NETOPT_RX/TX_END_IRQ 2018-07-09 17:23:31 +02:00
Joakim Nohlgård
bbf4f1e453 gnrc_netif: Enable RX and TX complete events after netdev init 2018-06-29 21:53:23 +02:00
Martine Lenders
55adbee488 gnrc_ipv6_nib: add full RFC4862 DAD support
Parts of [RFC4862] were already implemented when NDP via the NIB was
first implemented. This change just includes the DAD portion of
[RFC4862]. This should be enough to make RIOT fully RFC4862 compliant.

[RFC4862]: https://tools.ietf.org/html/rfc4862
2018-05-31 17:11:25 +02:00
Martine Lenders
fce5c758f7
Merge pull request #8841 from miri64/netif/api/initial2
netif: Initial import of a common network interface API (second try)
2018-05-29 22:10:50 +02:00
Martine Lenders
a082e10157 gnrc_netif: add GNRC specific implementation of netif.h 2018-05-29 19:49:29 +02:00
Martine Lenders
ea64d39e21 gnrc_netif: fail IPv6 address addition if no space for solicited nodes 2018-05-29 19:30:30 +02:00
Martine Lenders
53c30eef4b gnrc_netif: check if input for address search is :: 2018-04-03 17:38:26 +02:00
2f179f26bb sys/net/gnrc/netif: adapt to netdev with iolist 2018-03-06 14:00:31 +01:00
Daniel Krebs
cbc9121ad4 gnrc/netif: fix source address selection for non-matching prefixes
According to RFC 6724 ch. 5 rule 8, the source address candidate with
the longest matching prefix has to be selected. The current
implementation discards source addresses that have no matching prefix
(`match = 0`) which is perfectly fine for any global address.
2018-02-08 13:46:46 +01:00
Martine Lenders
d4661af4c8 gnrc: 6Lo fixes for BLE 2018-02-05 22:34:31 +01:00
Martine Lenders
51ae9d9c87 nordic_softdevice_ble: fixes for gnrc_netif usage 2018-02-05 22:34:11 +01:00
Sören Tempel
cfe0143eec gnrc_netif: Fix out-of-bounds buffer access in ieee802154 netif 2018-02-03 13:08:59 +01:00
Martine Lenders
c40a05b6a8 gnrc: fix link-layer/IPv6 address conversion for XBee 2018-01-31 10:54:28 +01:00
Martine Lenders
d0140a9ec8
Merge pull request #8380 from miri64/gnrc_netif/enh/6lo-nrfmin
gnrc_netif: set-up 6Lo for NRFmin
2018-01-23 11:17:29 +01:00
Martine Lenders
851eb767be gnrc_netif: set-up 6Lo for NRFmin 2018-01-18 13:00:25 +01:00
smlng
026bc281ae gnrc/netif: fix format error in debug output 2018-01-17 15:25:15 +01:00
7b72f623d2 gnrc: netif2: DEBUG fixes 2018-01-15 14:37:05 +01:00
Martine Lenders
c6833704dc gnrc_netif: add nrfmin IID support
Adds a `nrfmin` case to IID generation, so an IID can be generated
from a `nrfmin` device's (short) address (the long address is just
4-time repetition of the short address).
2018-01-05 13:06:35 +01:00
Martine Lenders
3a493436ba gnrc_netif: generalize IID generation for short addresses
Moves setting of addresses of length lesser than 3 to a function that
initializes the first 5 byte of the IID with `00:00:00:ff:fe` and then
fills up the rest with zeroes and the given short address.
2018-01-05 13:06:35 +01:00
17ac0fa3a7
Merge pull request #8101 from miri64/gnrc_netif2/opt/flag-checkers
gnrc_netif: assume flag settings on compile time
2017-12-19 12:10:25 +01:00
Martine Lenders
7b5a42ba58
gnrc_netif: assume flag settings on compile time 2017-12-19 12:04:36 +01:00
Martine Lenders
8a058d32f9
gnrc_netif: pass up returned error of internal function
If there is no space left on the interface, a user should be notified
about that when using `gnrc_netapi_set()`
2017-12-18 17:01:17 +01:00
3a572d82cd
Merge pull request #8252 from miri64/gnrc_netif/api/rename-ipv6_addr
gnrc_netif: rename IPv6 address "setters"
2017-12-18 17:00:31 +01:00
PeterKietzmann
70810ae697 sys/netif: include release of iovec in gnrc_netif_raw 2017-12-13 17:29:10 +01:00
PeterKietzmann
6295e4a7c9 sys/netif: add missig pkt release in gnrc_netif_raw 2017-12-13 15:44:39 +01:00
Martine Lenders
2ae30cf582 gnrc_netif: rename IPv6 address "setters"
This renames the following functions

* `gnrc_netif_ipv6_addr_add()`
* `gnrc_netif_ipv6_addr_remove()`
* `gnrc_netif_ipv6_group_join()`
* `gnrc_netif_ipv6_group_leave()`

by appending the suffix `_internal`.

\## Reasoning

I'd like to provide a helper function for the *public* equivalent using
`gnrc_netapi_set()`, and those names are to nice to not be taken for
those.

\## Procedure
I used a combination of `git grep` and `sed` to do this and fixed the
alignment in the result of some cases by hand.

```sh
git grep --name-only "\<gnrc_netif_ipv6_\(addr\|group\)_\(add\|remove\|join\|leave\)\>" | \
        xargs sed -i 's/\<gnrc_netif_ipv6_\(addr\|group\)_\(add\|remove\|join\|leave\)/\0_internal/g'
```
2017-12-13 13:50:39 +01:00
039bdf2aa6
gnrc_netif: Fix debug printing in ieee802154 2017-12-05 14:49:48 +01:00
ef8222e4bd
gnrc_netif: Include od when debugging 2017-12-05 14:48:02 +01:00
smlng
b283b7784c make: fix various compile errors with Wextra
pkg, nordic_softdevice_ble: disable CFLAGS to omit compiler error
        sys, pm_layered: fix casting nonscalar to the same type
        cpu, stm32_common: fix type-limits, remove always true assert
        cpu, stm32f4: fix pointer arithmetic in periph/i2c
        drivers, at86rf2xx: fix type-limits where condition always true
        saul, gpio: fix if no gpio configured for saul
        cpu, saml21: add frequency check to periph/timer
        driver, cc110x: fix unused param and type-limts errors
        boards, wsn430-common: fix old-style-declaration
        make: fix old style definition
        drivers, sdcard_spi: fix old style typedef
        driver, at30tse: remove unnecessary check
        driver, nrf24: fix type-limit
        driver, pn532: change buffer from char to uint8_t
        tests/driver_sdcard: fix type limits
        boards, feather-m0: add missing field inits
        driver, tcs37727: fix type limits
        pkg, emb6: disable some compiler warnings
        tests/emb6: disable some compiler warings
        pkg, openthread: fix sign compare and unused params
        tests/trickle: fix struct init
        tests/pthread_cooperation: fix type limits
        board, mips-malta: remove feature periph_uart
        shell: fix var size for netif command
        gnrc, netif: fix sign-compare
        gnrc, nib: fix sign-compare
        shell: fix output in netif command
        posix: fix type-limits in pthread_cond
2017-11-28 18:31:43 +01:00
Martine Lenders
a63bb6d47b
Merge pull request #6895 from bergzand/drivers/radio-rssi-conv
drivers/radios Apply register to rssi dBm conversion to all radios
2017-11-27 23:52:15 +01:00
fa64e93313 netdev: Represent RSSI as int16_t 2017-11-27 21:49:15 +01:00
e5cf4a5396
Merge pull request #8089 from miri64/gnrc_netif/fix/add-sol-nodes
gnrc_netif: join/leave solicited nodes IPv6 address add/remove
2017-11-20 14:35:49 +01:00
Martine Lenders
d4e60dae2e
gnrc_netif: join/leave solicited nodes IPv6 address add/remove 2017-11-20 14:22:55 +01:00
Martine Lenders
10b74740eb
gnrc_netif: fix GNRC_NETAPI_GET of arrays
The target array currently moves with the loop instead of with the
results. This fixes that.
2017-11-20 14:18:09 +01:00
Cenk Gündoğan
de5e0c677f gnrc_netif: fix DEBUG output 2017-11-20 00:35:17 +01:00
Martine Lenders
f90a9a875f
gnrc_ndp2: rename to gnrc_ndp 2017-11-17 10:41:54 +01:00
Martine Lenders
31b1ceb440
gnrc_netif2: rename to gnrc_netif 2017-11-17 10:41:54 +01:00
Martine Lenders
71a7dbf918
gnrc: remove legacy network interface structures 2017-11-17 09:20:29 +01:00
Martine Lenders
861035f22d gnrc: integrate gnrc_netif2
Not link-able, since NDP and NC are missing (intentionally)
2017-11-07 19:08:44 +01:00
smlng
645ea902dd cppcheck: grnc/netif/hdr fix cppcheck warnings 2016-12-20 16:49:10 +01:00
zhuoshuguo
d749962134 gnrc_netif: add fetch-address and fetch-netif-flag functionalities. 2016-12-02 13:22:47 +01:00
Dennis Kirsch
8c25ffeba8 gnrc_netif_hdr: Fix debug output format of if_pid, rssi and lqi 2016-10-17 10:11:08 +02:00
Martine Lenders
f844008a12 gnrc_netif_hdr: print flags 2016-07-26 21:06:36 +02:00
kYc0o
6df58ac767 gnrc: use correct l2addr print len 2016-04-10 16:31:38 +02:00
Oleg Hahm
9f7be0a2e5 gnrc netif: add a check for interface existence 2015-12-03 18:35:23 +01:00
Martine Lenders
74722888f6 gnrc_netif_hdr: un-inline build function 2015-11-27 13:19:50 +01:00
Martine Lenders
58ff31bfe9 gnrc: make all gnrc modules sub-modules of gnrc 2015-08-18 23:00:07 +02:00