Marian Buschsieweke
276ad5716a
sys/net/gnrc/netif: allow checking if a netdev is legacy or new API
...
A if `netdev_driver_t::confirm_send()` is provided, it provides the
new netdev API. However, detecting the API at runtime and handling
both API styles comes at a cost. This can be optimized in case only
new or only old style netdevs are in use.
To do so, this adds the pseudo modules `netdev_legacy_api` and
`netdev_new_api`. As right now no netdev actually implements the new
API, all netdevs pull in `netdev_legacy_api`. If `netdev_legacy_api` is
in used but `netdev_new_api` is not, we can safely assume at compile
time that only legacy netdevs are in use. Similar, if only
`netdev_new_api` is used, only support for the new API is needed. Only
when both are in use, run time checks are needed.
This provides two helper function to check for a netif if the
corresponding netdev implements the old or the new API. (With one
being the inverse of the other.) They are suitable for constant folding
when only new or only legacy devices are in use. Consequently, dead
branches should be eliminated by the optimizer.
2022-08-17 12:56:07 +02:00
Leandro Lanzieri
065c27555b
drivers/w5100: model in Kconfig
2022-07-25 11:08:31 +02:00
Leandro Lanzieri
5f7a906b95
drivers/w5100: introduce setup with index
2022-03-24 09:30:42 +01:00
=
6d51ac8622
drivers/w5100/w5100.c: fix TX_WR register's value
2021-05-15 14:34:55 +08:00
=
b0af54f93b
drivers/w5100/w5100.c: correct pointer position
2021-01-09 09:42:42 +08:00
Bas Stottelaar
92b1dfc703
drivers/*: realign ENABLE_DEBUG
2020-10-23 01:26:09 +02:00
Alexandre Abadie
304bce3724
drivers: configure per driver dependency resolution
2020-07-20 14:32:16 +02:00
Alexandre Abadie
490126cfa0
drivers: move USEMODULE_INCLUDES in each driver directories
2020-07-15 20:36:27 +02:00
Jose Alamos
3ad574a822
drivers/netdev: use netdev_trigger_event_isr function
2020-03-06 14:03:43 +01:00
Martine Lenders
82e293a496
Merge pull request #10412 from maribu/w5100
...
drivers/w5100: Fixed netdev_driver_t::recv() API
2019-02-05 16:30:42 +01:00
Marian Buschsieweke
a81d39494f
drivers/w5100: Fix recv() with too small buffer
...
If netdev_driver_t::recv() is called and the provided buffer is smaller than
the frame then `-ENOBUFS` should be returned, the frame should be dropped, and
no data of the frame should be returned.
Addresses: https://github.com/RIOT-OS/RIOT/issues/10413
2019-01-29 20:38:56 +01:00
Marian Buschsieweke
ea3edef5c7
drivers/w5100: Added missing drop implementation
...
The netdev_driver_t::recv implementation of the w5100 does not provide the
drop feature. This commit adds it.
Fixes: https://github.com/RIOT-OS/RIOT/issues/10410
2019-01-29 20:36:37 +01:00
Kees Bakker
811cda15cb
drivers/w5100: do normal assignment instead of memcpy
2019-01-10 19:43:44 +01:00
Marinus Enzinger
9bd15141a3
[w5100] Fixed RX interrupt handling
2018-05-17 18:13:23 +02:00
Martine Lenders
05b5560c26
Merge pull request #8691 from aabadie/pr/drivers/params/w5100
...
drivers/w5100: use new driver params scheme
2018-03-07 15:53:13 +01:00
23b414b732
drivers: net: adapt to iolist-using netdev
2018-03-06 14:00:31 +01:00
Alexandre Abadie
78c0cdd40c
drivers/w5100: use new driver params scheme
2018-03-01 14:13:36 +01:00
smlng
4492396923
driver, w5100: fix sign-compare and add spi as required feature
2017-11-28 23:09:37 +01:00
Hauke Petersen
5fa20d8234
drivers: include board.h in default params files
...
added the board.h include for:
- tsl2561
- jc42
- w5100
2017-11-03 10:12:58 +01:00
Alexandre Abadie
94c753c07a
drivers: doxygen cleanup
2017-09-01 15:12:20 +02:00
Martine Lenders
29842bb5e4
netdev2: rename to netdev and remove gnrc_netdev
...
With some minor hand-edits I used the following chain of commands:
```sh
git rm sys/include/net/gnrc/netdev.h
git grep --name-only -i netdev2 | \
xargs sed -i -e 's/^\(NETDEV\)2\(.*\)\( [("]\)/\1\2 \3/g' \
-e 's/\(netdev\)2\(.*\)\( \/\*\*<\)/\1\2 \3/I' \
-e 's/\(netdev\)2/\1/gI'
git add -p
git commit --amend
git ls-tree --full-tree -r HEAD --name-only | \
grep "netdev2" | xargs -I'{}' dirname '{}' | uniq | \
grep "netdev2" | while read dir; do
new_dir="$(echo "$dir" | sed "s/netdev2/netdev/g")"
git mv -f "$dir" "$new_dir"
done
git commit --amend
git ls-tree --full-tree -r HEAD --name-only | \
grep "netdev2" | while read file; do
new_file="$(echo "$file" | sed "s/netdev2/netdev/g")"
git mv -f "$file" "$new_file"
done
git commit --amend
git grep --name-only "\<drivers_netdev_netdev\>" | \
xargs sed -i "s/\<drivers_netdev_netdev\>/drivers_netdev_api/g"
git add -p
git commit --amend
```
2017-03-15 09:31:20 +01:00
Hauke Petersen
79a113d1ba
sys/drivers: renamed uuid module to luid
2017-02-27 11:01:20 +01:00
Hauke Petersen
ac482fd3e2
drivers/w5100: adapted to SPI API changes
2017-01-25 16:46:46 +01:00
Hauke Petersen
8624456efe
drivers/w5100: use uuid_get() for HW addr gen
2017-01-19 11:09:29 +01:00
Hauke Petersen
efb7e8a3ba
drivers/w5100: set src addr to known state
2016-11-16 17:46:04 +01:00
Hauke Petersen
bf9f1268f2
drivers/w5100: adapted to netdev2 API changes
2016-11-16 09:50:36 +01:00
Hauke Petersen
d7dbac7c61
drivers: added driver for W5100 Ethernet chips
2016-10-26 08:36:58 +02:00