EFI_STATUS Status;\r
UINTN Len;\r
UINT32 Index;\r
+ IP4_ADDR StationAddress;\r
+ IP4_ADDR SubnetMask;\r
+ IP4_ADDR SubnetAddress;\r
+ IP4_ADDR GatewayAddress;\r
\r
IpSb = (IP4_SERVICE *) Context;\r
NET_CHECK_SIGNATURE (IpSb, IP4_SERVICE_SIGNATURE);\r
// Set the default interface's address, then add a directed\r
// route for it, that is, the route whose nexthop is zero.\r
//\r
- Status = Ip4SetAddress (\r
- IpIf,\r
- EFI_NTOHL (Data->StationAddress),\r
- EFI_NTOHL (Data->SubnetMask)\r
- );\r
+ StationAddress = EFI_NTOHL (Data->StationAddress);\r
+ SubnetMask = EFI_NTOHL (Data->SubnetMask);\r
+ Status = Ip4SetAddress (IpIf, StationAddress, SubnetMask);\r
\r
if (EFI_ERROR (Status)) {\r
goto ON_EXIT;\r
\r
Ip4AddRoute (\r
IpSb->DefaultRouteTable,\r
- EFI_NTOHL (Data->StationAddress),\r
- EFI_NTOHL (Data->SubnetMask),\r
+ StationAddress,\r
+ SubnetMask,\r
IP4_ALLZERO_ADDRESS\r
);\r
\r
for (Index = 0; Index < Data->RouteTableSize; Index++) {\r
RouteEntry = &Data->RouteTable[Index];\r
\r
- Ip4AddRoute (\r
- IpSb->DefaultRouteTable,\r
- EFI_NTOHL (RouteEntry->SubnetAddress),\r
- EFI_NTOHL (RouteEntry->SubnetMask),\r
- EFI_NTOHL (RouteEntry->GatewayAddress)\r
- );\r
+ SubnetAddress = EFI_NTOHL (RouteEntry->SubnetAddress);\r
+ SubnetMask = EFI_NTOHL (RouteEntry->SubnetMask);\r
+ GatewayAddress = EFI_NTOHL (RouteEntry->GatewayAddress);\r
+ Ip4AddRoute (IpSb->DefaultRouteTable, SubnetAddress, SubnetMask, GatewayAddress);\r
}\r
\r
IpSb->State = IP4_SERVICE_CONFIGED;\r