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

50 Commits

Author SHA1 Message Date
Benjamin Valentin
fc72c76054 drivers/ethos: port to netdev_new_api 2024-11-21 00:14:16 +01:00
MrKevinWeiss
7a68fb0d5e
*Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
Benjamin Valentin
fcd734e10e drivers/ethos: add STDIO_UART_RX_BUFSIZE compat define 2024-02-03 13:09:10 +01:00
Benjamin Valentin
59f067171f core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
Felix
b1dff296db drivers/ethos: Fix off-by-one in ETHOS driver 2022-10-31 12:13:41 +01:00
Benjamin Valentin
838a5e4bd3 netdev_drivers: make sure to signal LINK_UP at least once 2022-09-16 22:57:28 +02:00
Karl Fessel
05f114d0af doc: fix unbalaced grouping
- most were trivial
    - missing group close or open
    - extra space
    - no doxygen comment
- name commad might open an implicit group
    this hould also be implicit cosed but does not happen somtimes
- crazy: internal declared groups have to be closed internal
2022-09-14 15:05:25 +02:00
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
96de3ce511
drivers/ethos: model in Kconfig 2022-07-22 16:06:36 +02:00
Francisco Molina
9473f88e3a drivers/ethos: add missing vfs include 2022-04-14 08:36:27 +02:00
Benjamin Valentin
c460c0eb77 drivers/ethos: fix build without ethos_stdio 2022-02-03 11:03:31 +01:00
380b2468e3
drivers/ethos: remove deprecated USE_ETHOS_FOR_STDIO define 2022-01-11 12:41:24 +01:00
Martine Lenders
820a3976ad
ethos: move bulk of state machine out of ISR context
This moves the following parts of ethos' state machine out of ISR
context:

- Sending and replying to HELLO messages
- Byte-unstuffing

Some escape handling is still needed in the ISR handler, due to ethos'
protocol design, to determine if a received byte must go into the
netdev queue (tsrb) or the STDIO queue (isrpipe), but the actual
unstuffing is now done in the STDIO and netdev handler threads,
respectively.
2021-12-15 16:15:30 +01:00
Martine Lenders
568be105f2
stdio_ethos: move to ethos_stdio 2021-12-15 16:15:29 +01:00
Jose Alamos
91bd1ccd9e
drivers/ethos: avoid explicit cast to netdev 2021-07-09 11:35:23 +02:00
Benjamin Valentin
9a548b834f drivers/ethos: register with nedev 2021-06-11 12:31:37 +02:00
Benjamin Valentin
2467c84634 drivers/ethos: enable multiple instances 2021-06-11 12:31:37 +02:00
Bas Stottelaar
92b1dfc703 drivers/*: realign ENABLE_DEBUG 2020-10-23 01:26:09 +02:00
304bce3724
drivers: configure per driver dependency resolution 2020-07-20 14:32:16 +02:00
Benjamin Valentin
d955836187 drivers/ethos: use luid_get_eui48()
Previously the MAC address of the border router was entirely random.
That meant that as a DHCPv6 client it would get a new prefix with every
reboot.

Due to #12210 the nodes will never use the new address.

Fix this by using luid_get_eui48() which will always return the same
address across reboots.

It also makes the code simpler.
2020-04-24 21:18:21 +02:00
Jose Alamos
3ad574a822 drivers/netdev: use netdev_trigger_event_isr function 2020-03-06 14:03:43 +01:00
f52d5ebde7
drivers: sys: replace USE_ETHOS_FOR_STDIO macro by MODULE_STDIO_ETHOS 2019-06-23 22:16:03 +02:00
Martine Lenders
31c49c58f1 ethos: adapt for tsrb API type change 2019-06-05 17:10:27 +02:00
836fe3dbba
Merge pull request #9890 from bergzand/pr/ethos/sync
ethos: Only accept frame if previous frame is read
2018-11-14 22:41:52 +01:00
c4608ca0eb
ethos: Only accept frame if previous frame is read 2018-11-14 22:16:04 +01:00
64afc748ca
Merge pull request #10178 from jcarrano/qualifier-fixes/ethos
drivers/ethos: remove unnecessary casts.
2018-11-07 09:14:40 +01:00
Juan Carrano
4c54ceb24a drivers/ethos: remove unnecessary casts.
The code contained superfluous casts which did not preserve the
const qualifiers. Functionality is unchanged, but there are no
more warnings reported by -Wcast-qual for this module.
2018-10-17 17:31:33 +02:00
761987ef0d
ethos: Add drop frame case to recv function
The ethos driver does not drop the received frame if the recv function
is called with NULL buffer and with a length. This commit fixes that.
2018-09-18 11:20:29 +02:00
Hauke Petersen
c2184f3454 boards/cpu/drivers/sys: use generic stdio_ if 2018-08-22 10:54:25 +02:00
23b414b732 drivers: net: adapt to iolist-using netdev 2018-03-06 14:00:31 +01:00
smlng
e381317fbf make: fix sign-compare errors
cpu, nrf5x_common: fix sign-compare in periph/flashpage
    drivers, periph_common: fix sign-compare in flashpage
    cpu, sam0_common: fix sign-compare error in periph/gpio
    cpu, cc2538: fix sign-compare in periph/timer
    cpu, sam3: fix sign-compare in periph/gpio
    cpu, stm32_common: fix sign-compare in periph/pwm
    cpu, stm32_common: fix sign-compare in periph/timer
    cpu, stm32_common: fix sign-compare in periph/flashpage
    cpu, nrf5x_common: fix sign-compare in radio/nrfmin
    cpu, samd21: fix sign-compare in periph/pwm
    cpu, ezr32wg: fix sign-compare in periph/gpio
    cpu, ezr32wg: fix sign-compare in periph/timer
    drivers, ethos: fix sign-compare
    sys, net: fix sign-compare
    cpu, atmega_common: fix sign-compare error
    cpu, msp430fxyz: fix sign-compare in periph/gpio
    boards, msb-430-common: fix sign-compare in board_init
    driver, cc2420: fix sign-compared
    sys/net: fix sign-compare in gnrc_tftp
    driver, pcd8544: fix sign-compare
    driver, pn532: fix sign-compare
    driver, sdcard_spi: fix sign-compare
    tests: fix sign_compare
    sys/net, lwmac: fix sign_compare
    pkg, lwip: fix sign-compare
    boards, waspmote: make CORECLOCK unsigned long to fix sign_compare error
    tests, sock_ip: fix sign compare
    tests, msg_avail: fix sign compare
    tests, sock_udp: fix sign compare
    boards: fix sign-compare for calliope and microbit matrix
2017-11-28 11:55:48 +01:00
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
9dea130a9e drivers: ethos: make use of isrpipe module 2016-12-16 09:48:09 +01:00
Oleg Hahm
b428979a1d debug: add missing line breaks 2016-09-27 23:38:41 +02:00
Martine Lenders
bd2429f299 cpu: drivers: adapt devices for netdev2 parameter type change 2016-08-03 12:30:51 +02:00
d7b17684e4 drivers: net: adapt to removed event_callback argument 2016-06-02 11:11:40 +02:00
27833444a0 drivers: ethos: make internal function static 2016-04-11 17:03:28 +02:00
d33423b5e6 drivers: ethos: fix cast of length parameter 2016-04-11 17:03:28 +02:00
2cd2194763 drivers: ethos: fix static const declarations 2016-04-11 17:03:28 +02:00
e4a92a697c drivers: ethos: add missing irq.h include 2016-04-11 17:03:28 +02:00
a833d838b9 drivers: ethos: don't error if recv buffer is larger than needed 2016-03-30 23:47:07 +02:00
Oleg Hahm
59674a679b netdev2: use params parameter for setup 2016-03-28 20:22:20 +02:00
Oleg Hahm
26b3263f8a netdev2: moved ethernet header into subdir 2016-03-25 15:10:07 +01:00
DipSwitch
0bb4748a94 core: Fix/refactor function naming in core/incude/irq.h 2016-03-20 16:47:34 +01:00
Hauke Petersen
1a8a73af63 drivers/ethos: adapted to changed UART cb type 2016-03-15 14:24:32 +01:00
ded39b461e sys: random: rename genrand_* to random_* 2016-02-29 21:33:17 +01:00
a93182ff51 drivers: ethos: fix _recv signature 2016-02-26 21:25:01 +01:00
d454e83009 drivers: ethos: correctly pass on isr_arg 2016-02-21 21:55:33 +01:00
9e3e485ec0 drivers: net: add ethos (ethernet over serial) driver 2016-02-07 19:15:14 +01:00