summaryrefslogtreecommitdiffstats
path: root/src/net/netdevice.c
diff options
context:
space:
mode:
authorMichael Brown2010-03-23 01:46:23 +0100
committerMichael Brown2010-03-23 01:46:35 +0100
commit88e436376cbdedee73483a9b57203c60a34316ac (patch)
tree4b23f51f32be9190621b44e497ef392510f1fd69 /src/net/netdevice.c
parent[phantom] Update interrupt support to match current firmware (diff)
downloadipxe-88e436376cbdedee73483a9b57203c60a34316ac.tar.gz
ipxe-88e436376cbdedee73483a9b57203c60a34316ac.tar.xz
ipxe-88e436376cbdedee73483a9b57203c60a34316ac.zip
[netdevice] Add netdev_is_open() wrapper function
Signed-off-by: Michael Brown <mcb30@etherboot.org>
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;
}