mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 01:22:37 +03:00
[netdevice] Add netdev_is_open() wrapper function
Signed-off-by: Michael Brown <mcb30@etherboot.org>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
FILE_LICENCE ( GPL2_OR_LATER );
|
||||
|
||||
static int startpxe_payload ( struct net_device *netdev ) {
|
||||
if ( netdev->state & NETDEV_OPEN )
|
||||
if ( netdev_is_open ( netdev ) )
|
||||
pxe_activate ( netdev );
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -366,7 +366,7 @@ pxenv_undi_set_station_address ( struct s_PXENV_UNDI_SET_STATION_ADDRESS
|
||||
/* If adapter is open, the change will have no effect; return
|
||||
* an error
|
||||
*/
|
||||
if ( pxe_netdev->state & NETDEV_OPEN ) {
|
||||
if ( netdev_is_open ( pxe_netdev ) ) {
|
||||
DBG ( " failed: netdev is open\n" );
|
||||
undi_set_station_address->Status =
|
||||
PXENV_STATUS_UNDI_INVALID_STATE;
|
||||
|
||||
Reference in New Issue
Block a user