Choose a better subnet mask value for the IPv4 address.

Signed-off-by: lpleahy

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13479 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lpleahy 2012-06-29 00:46:58 +00:00
parent 79a45605ca
commit 6e1450f309
3 changed files with 9 additions and 9 deletions

View File

@ -143,9 +143,9 @@ EslIp4LocalAddressSet (
} }
else { else {
pConfig->SubnetMask.Addr[0] = 0xff; pConfig->SubnetMask.Addr[0] = 0xff;
pConfig->SubnetMask.Addr[1] = 0xff; pConfig->SubnetMask.Addr[1] = ( 128 <= pConfig->StationAddress.Addr[0]) ? 0xff : 0;
pConfig->SubnetMask.Addr[2] = 0xff; pConfig->SubnetMask.Addr[2] = ( 192 <= pConfig->StationAddress.Addr[0]) ? 0xff : 0;
pConfig->SubnetMask.Addr[3] = 0xff; pConfig->SubnetMask.Addr[3] = ( 224 <= pConfig->StationAddress.Addr[0]) ? 0xff : 0;
} }
} }

View File

@ -1157,9 +1157,9 @@ EslTcp4LocalAddressSet (
} }
else { else {
pAccessPoint->SubnetMask.Addr[0] = 0xff; pAccessPoint->SubnetMask.Addr[0] = 0xff;
pAccessPoint->SubnetMask.Addr[1] = 0xff; pAccessPoint->SubnetMask.Addr[1] = ( 128 <= pAccessPoint->StationAddress.Addr[0]) ? 0xff : 0;
pAccessPoint->SubnetMask.Addr[2] = 0xff; pAccessPoint->SubnetMask.Addr[2] = ( 192 <= pAccessPoint->StationAddress.Addr[0]) ? 0xff : 0;
pAccessPoint->SubnetMask.Addr[3] = 0xff; pAccessPoint->SubnetMask.Addr[3] = ( 224 <= pAccessPoint->StationAddress.Addr[0]) ? 0xff : 0;
} }
// //

View File

@ -131,9 +131,9 @@ EslUdp4LocalAddressSet (
} }
else { else {
pConfig->SubnetMask.Addr[0] = 0xff; pConfig->SubnetMask.Addr[0] = 0xff;
pConfig->SubnetMask.Addr[1] = 0xff; pConfig->SubnetMask.Addr[1] = ( 128 <= pConfig->StationAddress.Addr[0]) ? 0xff : 0;
pConfig->SubnetMask.Addr[2] = 0xff; pConfig->SubnetMask.Addr[2] = ( 192 <= pConfig->StationAddress.Addr[0]) ? 0xff : 0;
pConfig->SubnetMask.Addr[3] = 0xff; pConfig->SubnetMask.Addr[3] = ( 224 <= pConfig->StationAddress.Addr[0]) ? 0xff : 0;
} }
// //