mirror of
https://github.com/ipxe/ipxe
synced 2026-05-10 18:10:36 +03:00
Kill off hotplug.h and just make net devices normal reference-counted
structures. DHCP still broken and #if 0'd out.
This commit is contained in:
@@ -265,19 +265,6 @@ struct net_protocol aoe_protocol __net_protocol = {
|
||||
.rx = aoe_rx,
|
||||
};
|
||||
|
||||
/**
|
||||
* Forget reference to net_device
|
||||
*
|
||||
* @v ref Persistent reference
|
||||
*/
|
||||
static void aoe_forget_netdev ( struct reference *ref ) {
|
||||
struct aoe_session *aoe
|
||||
= container_of ( ref, struct aoe_session, netdev_ref );
|
||||
|
||||
aoe->netdev = NULL;
|
||||
ref_del ( &aoe->netdev_ref );
|
||||
}
|
||||
|
||||
/**
|
||||
* Open AoE session
|
||||
*
|
||||
@@ -288,8 +275,6 @@ void aoe_open ( struct aoe_session *aoe ) {
|
||||
sizeof ( aoe->target ) );
|
||||
aoe->tag = AOE_TAG_MAGIC;
|
||||
aoe->timer.expired = aoe_timer_expired;
|
||||
aoe->netdev_ref.forget = aoe_forget_netdev;
|
||||
ref_add ( &aoe->netdev_ref, &aoe->netdev->references );
|
||||
list_add ( &aoe->list, &aoe_sessions );
|
||||
}
|
||||
|
||||
@@ -299,8 +284,6 @@ void aoe_open ( struct aoe_session *aoe ) {
|
||||
* @v aoe AoE session
|
||||
*/
|
||||
void aoe_close ( struct aoe_session *aoe ) {
|
||||
if ( aoe->netdev )
|
||||
ref_del ( &aoe->netdev_ref );
|
||||
list_del ( &aoe->list );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user