Browse Source

Add missing call to free_iob() in pxenv_undi_isr().

Correct typo in pxenv_set_station_address().
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
258afef751
1 changed files with 6 additions and 5 deletions
  1. 6
    5
      src/interface/pxe/pxe_undi.c

+ 6
- 5
src/interface/pxe/pxe_undi.c View File

@@ -35,7 +35,6 @@
35 35
 #include <gpxe/ip.h>
36 36
 #include <gpxe/arp.h>
37 37
 #include <gpxe/rarp.h>
38
-#include <gpxe/shutdown.h>
39 38
 #include "pxe.h"
40 39
 
41 40
 /**
@@ -284,7 +283,7 @@ pxenv_undi_set_station_address ( struct s_PXENV_UNDI_SET_STATION_ADDRESS
284 283
 		 &undi_set_station_address->StationAddress,
285 284
 		 pxe_netdev->ll_protocol->ll_addr_len );
286 285
 
287
-	undi_set_station_address = PXENV_STATUS_SUCCESS;
286
+	undi_set_station_address->Status = PXENV_STATUS_SUCCESS;
288 287
 	return PXENV_EXIT_SUCCESS;
289 288
 }
290 289
 
@@ -559,12 +558,11 @@ PXENV_EXIT_t pxenv_undi_isr ( struct s_PXENV_UNDI_ISR *undi_isr ) {
559 558
 		DBG ( " RECEIVE %zd", len );
560 559
 		if ( len > sizeof ( basemem_packet ) ) {
561 560
 			/* Should never happen */
562
-			undi_isr->FuncFlag = PXENV_UNDI_ISR_OUT_DONE;
563
-			undi_isr->Status = PXENV_STATUS_OUT_OF_RESOURCES;
564
-			return PXENV_EXIT_FAILURE;
561
+			len = sizeof ( basemem_packet );
565 562
 		}
566 563
 		memcpy ( basemem_packet, iobuf->data, len );
567 564
 
565
+		/* Fill in UNDI_ISR structure */
568 566
 		undi_isr->FuncFlag = PXENV_UNDI_ISR_OUT_RECEIVE;
569 567
 		undi_isr->BufferLength = len;
570 568
 		undi_isr->FrameLength = len;
@@ -576,6 +574,9 @@ PXENV_EXIT_t pxenv_undi_isr ( struct s_PXENV_UNDI_ISR *undi_isr ) {
576 574
 		/* Probably ought to fill in packet type */
577 575
 		undi_isr->ProtType = P_UNKNOWN;
578 576
 		undi_isr->PktType = XMT_DESTADDR;
577
+
578
+		/* Free packet */
579
+		free_iob ( iobuf );
579 580
 		break;
580 581
 	default :
581 582
 		DBG ( " INVALID(%04x)", undi_isr->FuncFlag );

Loading…
Cancel
Save