+ if (Status == EFI_NO_MAPPING) {\r
+ //\r
+ // IP6 Linklocal address is not available for use, so stop current Dhcp process\r
+ // and wait for duplicate address detection to finish.\r
+ //\r
+ Dhcp6->Stop (Dhcp6);\r
+\r
+ //\r
+ // Get Duplicate Address Detection Transmits count.\r
+ //\r
+ DataSize = sizeof (EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS);\r
+ Status = Ip6Cfg->GetData (\r
+ Ip6Cfg,\r
+ Ip6ConfigDataTypeDupAddrDetectTransmits,\r
+ &DataSize,\r
+ &DadXmits\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ Dhcp6->Configure (Dhcp6, NULL);\r
+ return Status;\r
+ }\r
+\r
+ Status = gBS->CreateEvent (EVT_TIMER, TPL_CALLBACK, NULL, NULL, &Timer);\r
+ if (EFI_ERROR (Status)) {\r
+ Dhcp6->Configure (Dhcp6, NULL);\r
+ return Status;\r
+ }\r
+\r
+ GetMappingTimeOut = TICKS_PER_SECOND * DadXmits.DupAddrDetectTransmits + PXEBC_DAD_ADDITIONAL_DELAY;\r
+ Status = gBS->SetTimer (Timer, TimerRelative, GetMappingTimeOut);\r
+ if (EFI_ERROR (Status)) {\r
+ gBS->CloseEvent (Timer);\r
+ Dhcp6->Configure (Dhcp6, NULL);\r
+ return Status;\r
+ }\r
+\r
+ do {\r
+ \r
+ TimerStatus = gBS->CheckEvent (Timer);\r
+ if (!EFI_ERROR (TimerStatus)) {\r
+ Status = Dhcp6->Start (Dhcp6);\r
+ }\r
+ } while (TimerStatus == EFI_NOT_READY);\r
+ \r
+ gBS->CloseEvent (Timer);\r
+ }\r