summaryrefslogtreecommitdiffstats
path: root/src/net/udp/dhcp.c
diff options
context:
space:
mode:
authorMichael Brown2007-06-27 15:48:31 +0200
committerMichael Brown2007-06-27 15:48:31 +0200
commitf77815f2b1ecf9f14441110ca61c0cffa48ce0e3 (patch)
treee55993b9b5acd1fbe2163b655ce3214390fdbbd3 /src/net/udp/dhcp.c
parentPartial migration of UDP to data-xfer interface. (Will not link at (diff)
downloadipxe-f77815f2b1ecf9f14441110ca61c0cffa48ce0e3.tar.gz
ipxe-f77815f2b1ecf9f14441110ca61c0cffa48ce0e3.tar.xz
ipxe-f77815f2b1ecf9f14441110ca61c0cffa48ce0e3.zip
Kill off hotplug.h and just make net devices normal reference-counted
structures. DHCP still broken and #if 0'd out.
Diffstat (limited to 'src/net/udp/dhcp.c')
-rw-r--r--src/net/udp/dhcp.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index 2caea335..4ecb17bf 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -493,6 +493,8 @@ udp_to_dhcp ( struct udp_connection *conn ) {
return container_of ( conn, struct dhcp_session, udp );
}
+#if 0
+
/**
* Mark DHCP session as complete
*
@@ -515,9 +517,6 @@ static void dhcp_done ( struct dhcp_session *dhcp, int rc ) {
/* Close UDP connection */
udp_close ( &dhcp->udp );
- /* Release reference on net device */
- ref_del ( &dhcp->netdev_ref );
-
/* Mark async operation as complete */
async_done ( &dhcp->async, rc );
}
@@ -706,19 +705,6 @@ static struct udp_operations dhcp_udp_operations = {
};
/**
- * Forget reference to net_device
- *
- * @v ref Persistent reference
- */
-static void dhcp_forget_netdev ( struct reference *ref ) {
- struct dhcp_session *dhcp
- = container_of ( ref, struct dhcp_session, netdev_ref );
-
- /* Kill DHCP session immediately */
- dhcp_done ( dhcp, -ENETUNREACH );
-}
-
-/**
* Initiate DHCP on a network interface
*
* @v dhcp DHCP session
@@ -742,13 +728,12 @@ int start_dhcp ( struct dhcp_session *dhcp, struct async *parent ) {
if ( ( rc = udp_open ( &dhcp->udp, htons ( BOOTPC_PORT ) ) ) != 0 )
return rc;
- /* Add persistent reference to net device */
- dhcp->netdev_ref.forget = dhcp_forget_netdev;
- ref_add ( &dhcp->netdev_ref, &dhcp->netdev->references );
-
/* Proof of concept: just send a single DHCPDISCOVER */
dhcp_send_request ( dhcp );
async_init ( &dhcp->async, &default_async_operations, parent );
return 0;
}
+
+
+#endif