|
@@ -50,7 +50,7 @@ static struct dhcp_packet *cached_dhcpack;
|
50
|
50
|
* Cached DHCPACK startup function
|
51
|
51
|
*
|
52
|
52
|
*/
|
53
|
|
-static void cachedhcp_startup ( void ) {
|
|
53
|
+static void cachedhcp_init ( void ) {
|
54
|
54
|
struct dhcp_packet *dhcppkt;
|
55
|
55
|
struct dhcp_packet *tmp;
|
56
|
56
|
struct dhcphdr *dhcphdr;
|
|
@@ -98,13 +98,14 @@ static void cachedhcp_startup ( void ) {
|
98
|
98
|
}
|
99
|
99
|
|
100
|
100
|
/**
|
101
|
|
- * Cached DHCPACK shutdown function
|
|
101
|
+ * Cached DHCPACK startup function
|
102
|
102
|
*
|
103
|
|
- * @v booting Shutting down in order to boot
|
104
|
103
|
*/
|
105
|
|
-static void cachedhcp_shutdown ( int booting __unused ) {
|
|
104
|
+static void cachedhcp_startup ( void ) {
|
106
|
105
|
|
107
|
|
- /* If cached DHCP packet has not yet been claimed, free it */
|
|
106
|
+ /* If cached DHCP packet was not claimed by any network device
|
|
107
|
+ * during startup, then free it.
|
|
108
|
+ */
|
108
|
109
|
if ( cached_dhcpack ) {
|
109
|
110
|
DBGC ( colour, "CACHEDHCP freeing unclaimed cached DHCPACK\n" );
|
110
|
111
|
dhcppkt_put ( cached_dhcpack );
|
|
@@ -113,9 +114,13 @@ static void cachedhcp_shutdown ( int booting __unused ) {
|
113
|
114
|
}
|
114
|
115
|
|
115
|
116
|
/** Cached DHCPACK initialisation function */
|
116
|
|
-struct startup_fn cachedhcp_startup_fn __startup_fn ( STARTUP_NORMAL ) = {
|
|
117
|
+struct init_fn cachedhcp_init_fn __init_fn ( INIT_NORMAL ) = {
|
|
118
|
+ .initialise = cachedhcp_init,
|
|
119
|
+};
|
|
120
|
+
|
|
121
|
+/** Cached DHCPACK startup function */
|
|
122
|
+struct startup_fn cachedhcp_startup_fn __startup_fn ( STARTUP_LATE ) = {
|
117
|
123
|
.startup = cachedhcp_startup,
|
118
|
|
- .shutdown = cachedhcp_shutdown,
|
119
|
124
|
};
|
120
|
125
|
|
121
|
126
|
/**
|