1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 00:49:45 +01:00

drivers/at86rf215: return ENETDOWN when interface is down

This commit is contained in:
Benjamin Valentin 2024-11-22 19:44:12 +01:00
parent 8179312d06
commit ef639df76f
2 changed files with 4 additions and 4 deletions

View File

@ -247,7 +247,7 @@ static bool _tx_ongoing(at86rf215_t *dev)
int at86rf215_tx_prepare(at86rf215_t *dev)
{
if (dev->state == AT86RF215_STATE_SLEEP) {
return -EAGAIN;
return -ENETDOWN;
}
if (_tx_ongoing(dev)) {

View File

@ -149,10 +149,10 @@ static int _send(netdev_t *netdev, const iolist_t *iolist)
{
netdev_ieee802154_t *netdev_ieee802154 = container_of(netdev, netdev_ieee802154_t, netdev);
at86rf215_t *dev = container_of(netdev_ieee802154, at86rf215_t, netdev);
size_t len = 0;
if (at86rf215_tx_prepare(dev)) {
return -EBUSY;
ssize_t len = at86rf215_tx_prepare(dev);
if (len) {
return len;
}
/* load packet data into FIFO */