summaryrefslogtreecommitdiffstats
path: root/src/usr
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/usr
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/usr')
-rw-r--r--src/usr/ifmgmt.c2
-rw-r--r--src/usr/iwmgmt.c2
-rw-r--r--src/usr/route.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/usr/ifmgmt.c b/src/usr/ifmgmt.c
index d4cc5a5b..95505fcf 100644
--- a/src/usr/ifmgmt.c
+++ b/src/usr/ifmgmt.c
@@ -90,7 +90,7 @@ void ifstat ( struct net_device *netdev ) {
printf ( "%s: %s on %s (%s)\n"
" [Link:%s, TX:%d TXE:%d RX:%d RXE:%d]\n",
netdev->name, netdev_addr ( netdev ), netdev->dev->name,
- ( ( netdev->state & NETDEV_OPEN ) ? "open" : "closed" ),
+ ( netdev_is_open ( netdev ) ? "open" : "closed" ),
( netdev_link_ok ( netdev ) ? "up" : "down" ),
netdev->tx_stats.good, netdev->tx_stats.bad,
netdev->rx_stats.good, netdev->rx_stats.bad );
diff --git a/src/usr/iwmgmt.c b/src/usr/iwmgmt.c
index 59ba103a..dd456629 100644
--- a/src/usr/iwmgmt.c
+++ b/src/usr/iwmgmt.c
@@ -125,7 +125,7 @@ int iwlist ( struct net80211_device *dev ) {
char ssid_buf[22];
int rc;
unsigned i;
- int was_opened = dev->netdev->state & NETDEV_OPEN;
+ int was_opened = netdev_is_open ( dev->netdev );
int was_channel = dev->channels[dev->channel].channel_nr;
if ( ! was_opened ) {
diff --git a/src/usr/route.c b/src/usr/route.c
index 18757419..101d1707 100644
--- a/src/usr/route.c
+++ b/src/usr/route.c
@@ -38,7 +38,7 @@ void route ( void ) {
printf ( "%s", inet_ntoa ( miniroute->netmask ) );
if ( miniroute->gateway.s_addr )
printf ( " gw %s", inet_ntoa ( miniroute->gateway ) );
- if ( ! ( miniroute->netdev->state & NETDEV_OPEN ) )
+ if ( ! netdev_is_open ( miniroute->netdev ) )
printf ( " (inaccessible)" );
printf ( "\n" );
}