\r
Instance = ARP_INSTANCE_DATA_FROM_THIS (This);\r
\r
- OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);\r
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
\r
//\r
// Configure this instance, the ConfigData has already passed the basic checks.\r
//\r
Status = ArpConfigureInstance (Instance, ConfigData);\r
\r
- NET_RESTORE_TPL (OldTpl);\r
+ gBS->RestoreTPL (OldTpl);\r
\r
return Status;\r
}\r
MatchAddress[Protocol].Length = Instance->ConfigData.SwAddressLength;\r
MatchAddress[Protocol].AddressPtr = TargetSwAddress;\r
\r
- OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);\r
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
\r
//\r
// See whether the entry to add exists. Check the DeinedCacheTable first.\r
//\r
// Remove it from the Table.\r
//\r
- NetListRemoveEntry (&CacheEntry->List);\r
+ RemoveEntryList (&CacheEntry->List);\r
} else {\r
//\r
// It's a new entry, allocate memory for the entry.\r
CacheEntry = ArpAllocCacheEntry (Instance);\r
\r
if (CacheEntry == NULL) {\r
- ARP_DEBUG_ERROR (("ArpAdd: Failed to allocate pool for CacheEntry.\n"));\r
+ DEBUG ((EFI_D_ERROR, "ArpAdd: Failed to allocate pool for CacheEntry.\n"));\r
Status = EFI_OUT_OF_RESOURCES;\r
goto UNLOCK_EXIT;\r
}\r
// Add this CacheEntry to the corresponding CacheTable.\r
//\r
if (DenyFlag) {\r
- NetListInsertHead (&ArpService->DeniedCacheTable, &CacheEntry->List);\r
+ InsertHeadList (&ArpService->DeniedCacheTable, &CacheEntry->List);\r
} else {\r
- NetListInsertHead (&ArpService->ResolvedCacheTable, &CacheEntry->List);\r
+ InsertHeadList (&ArpService->ResolvedCacheTable, &CacheEntry->List);\r
}\r
\r
UNLOCK_EXIT:\r
\r
- NET_RESTORE_TPL (OldTpl);\r
+ gBS->RestoreTPL (OldTpl);\r
\r
return Status;\r
}\r
return EFI_NOT_STARTED;\r
}\r
\r
- OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);\r
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
\r
//\r
// All the check passed, find the cache entries now.\r
Refresh\r
);\r
\r
- NET_RESTORE_TPL (OldTpl);\r
+ gBS->RestoreTPL (OldTpl);\r
\r
return Status;\r
}\r
return EFI_NOT_STARTED;\r
}\r
\r
- OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);\r
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
\r
//\r
// Delete the specified cache entries.\r
//\r
Count = ArpDeleteCacheEntry (Instance, BySwAddress, AddressBuffer, TRUE);\r
\r
- NET_RESTORE_TPL (OldTpl);\r
+ gBS->RestoreTPL (OldTpl);\r
\r
return (Count == 0) ? EFI_NOT_FOUND : EFI_SUCCESS;\r
}\r
return EFI_NOT_STARTED;\r
}\r
\r
- OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);\r
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
\r
//\r
// Delete the dynamic entries from the cache table.\r
//\r
Count = ArpDeleteCacheEntry (Instance, FALSE, NULL, FALSE);\r
\r
- NET_RESTORE_TPL (OldTpl);\r
+ gBS->RestoreTPL (OldTpl);\r
\r
return (Count == 0) ? EFI_NOT_FOUND : EFI_SUCCESS;\r
}\r
SnpMode = &ArpService->SnpMode;\r
\r
if ((TargetSwAddress == NULL) ||\r
- ((Instance->ConfigData.SwAddressType == IPv4_ETHER_PROTO_TYPE) &&\r
+ ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&\r
IP4_IS_LOCAL_BROADCAST (*((UINT32 *)TargetSwAddress)))) {\r
//\r
// Return the hardware broadcast address.\r
//\r
- NetCopyMem (TargetHwAddress, &SnpMode->BroadcastAddress, SnpMode->HwAddressSize);\r
+ CopyMem (TargetHwAddress, &SnpMode->BroadcastAddress, SnpMode->HwAddressSize);\r
\r
goto SIGNAL_USER;\r
}\r
\r
- if ((Instance->ConfigData.SwAddressType == IPv4_ETHER_PROTO_TYPE) &&\r
+ if ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&\r
IP4_IS_MULTICAST (NTOHL (*((UINT32 *)TargetSwAddress)))) {\r
//\r
// If the software address is an IPv4 multicast address, invoke Mnp to\r
//\r
// Initialize the TargetHwAddrss to a zero address.\r
//\r
- NetZeroMem (TargetHwAddress, SnpMode->HwAddressSize);\r
+ ZeroMem (TargetHwAddress, SnpMode->HwAddressSize);\r
\r
- OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);\r
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
\r
//\r
// Check whether the software address is in the denied table.\r
//\r
// Resolved, copy the address into the user buffer.\r
//\r
- NetCopyMem (\r
+ CopyMem (\r
TargetHwAddress,\r
CacheEntry->Addresses[Hardware].AddressPtr,\r
CacheEntry->Addresses[Hardware].Length\r
//\r
// Create a request context for this arp request.\r
//\r
- RequestContext = NetAllocatePool (sizeof(USER_REQUEST_CONTEXT));\r
+ RequestContext = AllocatePool (sizeof(USER_REQUEST_CONTEXT));\r
if (RequestContext == NULL) {\r
- ARP_DEBUG_ERROR (("ArpRequest: Allocate memory for RequestContext failed.\n"));\r
+ DEBUG ((EFI_D_ERROR, "ArpRequest: Allocate memory for RequestContext failed.\n"));\r
\r
Status = EFI_OUT_OF_RESOURCES;\r
goto UNLOCK_EXIT;\r
RequestContext->Instance = Instance;\r
RequestContext->UserRequestEvent = ResolvedEvent;\r
RequestContext->UserHwAddrBuffer = TargetHwAddress;\r
- NetListInit (&RequestContext->List);\r
+ InitializeListHead (&RequestContext->List);\r
\r
//\r
// Check whether there is a same request.\r
//\r
CacheEntry = ArpAllocCacheEntry (Instance);\r
if (CacheEntry == NULL) {\r
- ARP_DEBUG_ERROR (("ArpRequest: Allocate memory for CacheEntry failed.\n"));\r
- NetFreePool (RequestContext);\r
+ DEBUG ((EFI_D_ERROR, "ArpRequest: Allocate memory for CacheEntry failed.\n"));\r
+ gBS->FreePool (RequestContext);\r
\r
Status = EFI_OUT_OF_RESOURCES;\r
goto UNLOCK_EXIT;\r
//\r
// Add this entry into the PendingRequestTable.\r
//\r
- NetListInsertTail (&ArpService->PendingRequestTable, &CacheEntry->List);\r
+ InsertTailList (&ArpService->PendingRequestTable, &CacheEntry->List);\r
}\r
\r
//\r
// Link this request context into the cache entry.\r
//\r
- NetListInsertHead (&CacheEntry->UserRequestList, &RequestContext->List);\r
+ InsertHeadList (&CacheEntry->UserRequestList, &RequestContext->List);\r
\r
//\r
// Send out the ARP Request frame.\r
\r
UNLOCK_EXIT:\r
\r
- NET_RESTORE_TPL (OldTpl);\r
+ gBS->RestoreTPL (OldTpl);\r
\r
SIGNAL_USER:\r
\r
return EFI_NOT_STARTED;\r
}\r
\r
- OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);\r
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
\r
//\r
// Cancel the specified request.\r
//\r
NetLibDispatchDpc ();\r
\r
- NET_RESTORE_TPL (OldTpl);\r
+ gBS->RestoreTPL (OldTpl);\r
\r
return (Count == 0) ? EFI_NOT_FOUND : EFI_SUCCESS;\r
}\r