summaryrefslogtreecommitdiffstats
path: root/src/net/netdevice.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/netdevice.c')
-rw-r--r--src/net/netdevice.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/netdevice.c b/src/net/netdevice.c
index ee0d0b72..2e781d76 100644
--- a/src/net/netdevice.c
+++ b/src/net/netdevice.c
@@ -130,7 +130,7 @@ int netdev_tx ( struct net_device *netdev, struct io_buffer *iobuf ) {
list_add_tail ( &iobuf->list, &netdev->tx_queue );
- if ( ! ( netdev->state & NETDEV_OPEN ) ) {
+ if ( ! netdev_is_open ( netdev ) ) {
rc = -ENETUNREACH;
goto err;
}
@@ -263,7 +263,7 @@ void netdev_rx_err ( struct net_device *netdev,
*/
void netdev_poll ( struct net_device *netdev ) {
- if ( netdev->state & NETDEV_OPEN )
+ if ( netdev_is_open ( netdev ) )
netdev->op->poll ( netdev );
}
@@ -509,7 +509,7 @@ struct net_device * last_opened_netdev ( void ) {
struct net_device *netdev;
list_for_each_entry ( netdev, &open_net_devices, open_list ) {
- assert ( netdev->state & NETDEV_OPEN );
+ assert ( netdev_is_open ( netdev ) );
return netdev;
}