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

Loading…
Cancel
Save