diff --git a/NetworkPkg/Ip6Dxe/Ip6Driver.c b/NetworkPkg/Ip6Dxe/Ip6Driver.c index ba702904b5..16617c12b1 100644 --- a/NetworkPkg/Ip6Dxe/Ip6Driver.c +++ b/NetworkPkg/Ip6Dxe/Ip6Driver.c @@ -578,7 +578,7 @@ Ip6DriverBindingStart ( DataItem->DataSize, DataItem->Data.Ptr ); - if (EFI_ERROR(Status)) { + if (EFI_ERROR(Status) && Status != EFI_NOT_READY) { goto ON_ERROR; } } @@ -599,47 +599,45 @@ Ip6DriverBindingStart ( } } - if (!EFI_ERROR (Status)) { - // - // ready to go: start the receiving and timer - // - Status = Ip6ReceiveFrame (Ip6AcceptFrame, IpSb); - if (EFI_ERROR (Status)) { - goto ON_ERROR; - } - - // - // The timer expires every 100 (IP6_TIMER_INTERVAL_IN_MS) milliseconds. - // - Status = gBS->SetTimer ( - IpSb->FasterTimer, - TimerPeriodic, - TICKS_PER_MS * IP6_TIMER_INTERVAL_IN_MS - ); - if (EFI_ERROR (Status)) { - goto ON_ERROR; - } - - // - // The timer expires every 1000 (IP6_ONE_SECOND_IN_MS) milliseconds. - // - Status = gBS->SetTimer ( - IpSb->Timer, - TimerPeriodic, - TICKS_PER_MS * IP6_ONE_SECOND_IN_MS - ); - if (EFI_ERROR (Status)) { - goto ON_ERROR; - } - - // - // Initialize the IP6 ID - // - mIp6Id = NET_RANDOM (NetRandomInitSeed ()); - - return EFI_SUCCESS; + // + // ready to go: start the receiving and timer + // + Status = Ip6ReceiveFrame (Ip6AcceptFrame, IpSb); + if (EFI_ERROR (Status)) { + goto ON_ERROR; } + // + // The timer expires every 100 (IP6_TIMER_INTERVAL_IN_MS) milliseconds. + // + Status = gBS->SetTimer ( + IpSb->FasterTimer, + TimerPeriodic, + TICKS_PER_MS * IP6_TIMER_INTERVAL_IN_MS + ); + if (EFI_ERROR (Status)) { + goto ON_ERROR; + } + + // + // The timer expires every 1000 (IP6_ONE_SECOND_IN_MS) milliseconds. + // + Status = gBS->SetTimer ( + IpSb->Timer, + TimerPeriodic, + TICKS_PER_MS * IP6_ONE_SECOND_IN_MS + ); + if (EFI_ERROR (Status)) { + goto ON_ERROR; + } + + // + // Initialize the IP6 ID + // + mIp6Id = NET_RANDOM (NetRandomInitSeed ()); + + return EFI_SUCCESS; + ON_ERROR: Ip6CleanService (IpSb); FreePool (IpSb);