Modify UDP and IP to transmit on all network adapters instead of just the first network adapter.

Fix comment in Socket.c.

Signed-off-by: lpleahy
Reviewed and tested by: Sreenivasula Reddy of Dell


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13713 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lpleahy 2012-09-10 19:04:41 +00:00
parent 44890dbde6
commit 884ed92356
4 changed files with 70 additions and 49 deletions

View File

@ -984,22 +984,22 @@ EslIp4TxBuffer (
// Verify that the socket is connected
//
if ( SOCKET_STATE_CONNECTED == pSocket->State ) {
//
// Verify that there is enough room to buffer another
// transmit operation
//
pTxBytes = &pSocket->TxBytes;
if ( pSocket->MaxTxBuf > *pTxBytes ) {
//
// Locate the port
//
pPort = pSocket->pPortList;
if ( NULL != pPort ) {
while ( NULL != pPort ) {
//
// Determine the queue head
//
pIp4 = &pPort->Context.Ip4;
pTxBytes = &pSocket->TxBytes;
//
// Verify that there is enough room to buffer another
// transmit operation
//
if ( pSocket->MaxTxBuf > *pTxBytes ) {
//
// Attempt to allocate the packet
//
@ -1131,6 +1131,7 @@ EslIp4TxBuffer (
// Free the packet
//
EslSocketPacketFree ( pPacket, DEBUG_TX );
break;
}
//
@ -1143,6 +1144,13 @@ EslIp4TxBuffer (
// Packet allocation failed
//
pSocket->errno = ENOMEM;
break;
}
//
// Set the next port
//
pPort = pPort->pLinkSocket;
}
}
else {
@ -1153,7 +1161,6 @@ EslIp4TxBuffer (
Status = EFI_NOT_READY;
}
}
}
//
// Return the operation status

View File

@ -3191,7 +3191,7 @@ EslSocketPacketFree (
DBG_ENTER ( );
//
// Allocate a packet structure
// Free a packet structure
//
LengthInBytes = pPacket->PacketSize;
Status = gBS->FreePool ( pPacket );

View File

@ -793,22 +793,22 @@ EslUdp4TxBuffer (
// Verify that the socket is connected
//
if ( SOCKET_STATE_CONNECTED == pSocket->State ) {
//
// Verify that there is enough room to buffer another
// transmit operation
//
pTxBytes = &pSocket->TxBytes;
if ( pSocket->MaxTxBuf > *pTxBytes ) {
//
// Locate the port
//
pPort = pSocket->pPortList;
if ( NULL != pPort ) {
while ( NULL != pPort ) {
//
// Determine the queue head
//
pUdp4 = &pPort->Context.Udp4;
pTxBytes = &pSocket->TxBytes;
//
// Verify that there is enough room to buffer another
// transmit operation
//
if ( pSocket->MaxTxBuf > *pTxBytes ) {
//
// Attempt to allocate the packet
//
@ -923,6 +923,7 @@ EslUdp4TxBuffer (
// Free the packet
//
EslSocketPacketFree ( pPacket, DEBUG_TX );
break;
}
//
@ -935,6 +936,13 @@ EslUdp4TxBuffer (
// Packet allocation failed
//
pSocket->errno = ENOMEM;
break;
}
//
// Set the next port
//
pPort = pPort->pLinkSocket;
}
}
else {
@ -945,7 +953,6 @@ EslUdp4TxBuffer (
Status = EFI_NOT_READY;
}
}
}
//
// Return the operation status

View File

@ -834,22 +834,22 @@ EslUdp6TxBuffer (
// Verify that the socket is connected
//
if ( SOCKET_STATE_CONNECTED == pSocket->State ) {
//
// Verify that there is enough room to buffer another
// transmit operation
//
pTxBytes = &pSocket->TxBytes;
if ( pSocket->MaxTxBuf > *pTxBytes ) {
//
// Locate the port
//
pPort = pSocket->pPortList;
if ( NULL != pPort ) {
while ( NULL != pPort ) {
//
// Determine the queue head
//
pUdp6 = &pPort->Context.Udp6;
pTxBytes = &pSocket->TxBytes;
//
// Verify that there is enough room to buffer another
// transmit operation
//
if ( pSocket->MaxTxBuf > *pTxBytes ) {
//
// Attempt to allocate the packet
//
@ -960,6 +960,7 @@ EslUdp6TxBuffer (
// Free the packet
//
EslSocketPacketFree ( pPacket, DEBUG_TX );
break;
}
//
@ -972,6 +973,13 @@ EslUdp6TxBuffer (
// Packet allocation failed
//
pSocket->errno = ENOMEM;
break;
}
//
// Set the next port
//
pPort = pPort->pLinkSocket;
}
}
else {
@ -982,7 +990,6 @@ EslUdp6TxBuffer (
Status = EFI_NOT_READY;
}
}
}
//
// Return the operation status