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:
parent
8179312d06
commit
ef639df76f
@ -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)) {
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user