Browse Source

[efi] Provide a dummy data block in nii_initialise()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 years ago
parent
commit
914dd539b0
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      src/drivers/net/efi/nii.c

+ 6
- 1
src/drivers/net/efi/nii.c View File

@@ -568,6 +568,7 @@ static int nii_get_init_info ( struct nii_nic *nii,
568 568
  */
569 569
 static int nii_initialise ( struct nii_nic *nii ) {
570 570
 	PXE_CPB_INITIALIZE cpb;
571
+	PXE_DB_INITIALIZE db;
571 572
 	unsigned int op;
572 573
 	int stat;
573 574
 	int rc;
@@ -584,10 +585,14 @@ static int nii_initialise ( struct nii_nic *nii ) {
584 585
 	cpb.MemoryAddr = ( ( intptr_t ) nii->buffer );
585 586
 	cpb.MemoryLength = nii->buffer_len;
586 587
 
588
+	/* Construct data block */
589
+	memset ( &db, 0, sizeof ( db ) );
590
+
587 591
 	/* Issue command */
588 592
 	op = NII_OP ( PXE_OPCODE_INITIALIZE,
589 593
 		      PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE );
590
-	if ( ( stat = nii_issue_cpb ( nii, op, &cpb, sizeof ( cpb ) ) ) < 0 ) {
594
+	if ( ( stat = nii_issue_cpb_db ( nii, op, &cpb, sizeof ( cpb ),
595
+					 &db, sizeof ( db ) ) ) < 0 ) {
591 596
 		rc = -EIO_STAT ( stat );
592 597
 		DBGC ( nii, "NII %s could not initialise: %s\n",
593 598
 		       nii->dev.name, strerror ( rc ) );

Loading…
Cancel
Save