diff options
author | Olivier Martin <olivier.martin@arm.com> | 2013-01-10 11:43:23 +0000 |
---|---|---|
committer | Leif Lindholm <leif.lindholm@linaro.org> | 2014-01-24 15:44:20 +0000 |
commit | cfb24da25a68e6827b33851bc5af9ce23f8e2ef7 (patch) | |
tree | 7b0c77b08d023da983db79fe33612293e4df879f | |
parent | a7df1d6eab49a20343a7fab06bc859b8668d808c (diff) | |
download | juice-cfb24da25a68e6827b33851bc5af9ce23f8e2ef7.tar.gz |
MdeModulePkg//ArpDxe: Retrieved SnpMode only after configuring Snp
When Arp driver starts (with ArpDriverBindingStart()), its service will be created
and the Mnp child configured (ArpService->Mnp->Configure() called in ArpCreateService()).
It is only at this time the Snp protocol will be initialized (at the end of MnpStart()).
So, a valid SnpMode could not be expected prior to ArpService->Mnp->Configure().
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
-rwxr-xr-x[-rw-r--r--] | MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c index 81ddd6263..5cf717f94 100644..100755 --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c @@ -103,22 +103,6 @@ ArpCreateService ( }
//
- // Get the underlayer Snp mode data.
- //
- Status = ArpService->Mnp->GetModeData (ArpService->Mnp, NULL, &ArpService->SnpMode);
- if ((Status != EFI_NOT_STARTED) && EFI_ERROR (Status)) {
- goto ERROR_EXIT;
- }
-
- if (ArpService->SnpMode.IfType != NET_IFTYPE_ETHERNET) {
- //
- // Only support the ethernet.
- //
- Status = EFI_UNSUPPORTED;
- goto ERROR_EXIT;
- }
-
- //
// Set the Mnp config parameters.
//
ArpService->MnpConfigData.ReceivedQueueTimeoutValue = 0;
@@ -141,6 +125,23 @@ ArpCreateService ( }
//
+ // Get the underlayer Snp mode data. Must do this after MNP configuration else some parameters + // (e.g. current address) may not be set + // + Status = ArpService->Mnp->GetModeData (ArpService->Mnp, NULL, &ArpService->SnpMode); + if ((Status != EFI_NOT_STARTED) && EFI_ERROR (Status)) { + goto ERROR_EXIT; + } + + if (ArpService->SnpMode.IfType != NET_IFTYPE_ETHERNET) { + // + // Only support the ethernet. + // + Status = EFI_UNSUPPORTED; + goto ERROR_EXIT; + } + + // // Create the event used in the RxToken.
//
Status = gBS->CreateEvent (
|