mirror of https://github.com/acidanthera/audk.git
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:
parent
44890dbde6
commit
884ed92356
|
@ -985,21 +985,21 @@ EslIp4TxBuffer (
|
||||||
//
|
//
|
||||||
if ( SOCKET_STATE_CONNECTED == pSocket->State ) {
|
if ( SOCKET_STATE_CONNECTED == pSocket->State ) {
|
||||||
//
|
//
|
||||||
// Locate the port
|
// Verify that there is enough room to buffer another
|
||||||
|
// transmit operation
|
||||||
//
|
//
|
||||||
pPort = pSocket->pPortList;
|
pTxBytes = &pSocket->TxBytes;
|
||||||
if ( NULL != pPort ) {
|
if ( pSocket->MaxTxBuf > *pTxBytes ) {
|
||||||
//
|
//
|
||||||
// Determine the queue head
|
// Locate the port
|
||||||
//
|
//
|
||||||
pIp4 = &pPort->Context.Ip4;
|
pPort = pSocket->pPortList;
|
||||||
pTxBytes = &pSocket->TxBytes;
|
while ( NULL != pPort ) {
|
||||||
|
//
|
||||||
|
// Determine the queue head
|
||||||
|
//
|
||||||
|
pIp4 = &pPort->Context.Ip4;
|
||||||
|
|
||||||
//
|
|
||||||
// Verify that there is enough room to buffer another
|
|
||||||
// transmit operation
|
|
||||||
//
|
|
||||||
if ( pSocket->MaxTxBuf > *pTxBytes ) {
|
|
||||||
//
|
//
|
||||||
// Attempt to allocate the packet
|
// Attempt to allocate the packet
|
||||||
//
|
//
|
||||||
|
@ -1131,6 +1131,7 @@ EslIp4TxBuffer (
|
||||||
// Free the packet
|
// Free the packet
|
||||||
//
|
//
|
||||||
EslSocketPacketFree ( pPacket, DEBUG_TX );
|
EslSocketPacketFree ( pPacket, DEBUG_TX );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1143,16 +1144,22 @@ EslIp4TxBuffer (
|
||||||
// Packet allocation failed
|
// Packet allocation failed
|
||||||
//
|
//
|
||||||
pSocket->errno = ENOMEM;
|
pSocket->errno = ENOMEM;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
//
|
//
|
||||||
// Not enough buffer space available
|
// Set the next port
|
||||||
//
|
//
|
||||||
pSocket->errno = EAGAIN;
|
pPort = pPort->pLinkSocket;
|
||||||
Status = EFI_NOT_READY;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
//
|
||||||
|
// Not enough buffer space available
|
||||||
|
//
|
||||||
|
pSocket->errno = EAGAIN;
|
||||||
|
Status = EFI_NOT_READY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -3191,7 +3191,7 @@ EslSocketPacketFree (
|
||||||
DBG_ENTER ( );
|
DBG_ENTER ( );
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate a packet structure
|
// Free a packet structure
|
||||||
//
|
//
|
||||||
LengthInBytes = pPacket->PacketSize;
|
LengthInBytes = pPacket->PacketSize;
|
||||||
Status = gBS->FreePool ( pPacket );
|
Status = gBS->FreePool ( pPacket );
|
||||||
|
|
|
@ -794,21 +794,21 @@ EslUdp4TxBuffer (
|
||||||
//
|
//
|
||||||
if ( SOCKET_STATE_CONNECTED == pSocket->State ) {
|
if ( SOCKET_STATE_CONNECTED == pSocket->State ) {
|
||||||
//
|
//
|
||||||
// Locate the port
|
// Verify that there is enough room to buffer another
|
||||||
|
// transmit operation
|
||||||
//
|
//
|
||||||
pPort = pSocket->pPortList;
|
pTxBytes = &pSocket->TxBytes;
|
||||||
if ( NULL != pPort ) {
|
if ( pSocket->MaxTxBuf > *pTxBytes ) {
|
||||||
//
|
//
|
||||||
// Determine the queue head
|
// Locate the port
|
||||||
//
|
//
|
||||||
pUdp4 = &pPort->Context.Udp4;
|
pPort = pSocket->pPortList;
|
||||||
pTxBytes = &pSocket->TxBytes;
|
while ( NULL != pPort ) {
|
||||||
|
//
|
||||||
|
// Determine the queue head
|
||||||
|
//
|
||||||
|
pUdp4 = &pPort->Context.Udp4;
|
||||||
|
|
||||||
//
|
|
||||||
// Verify that there is enough room to buffer another
|
|
||||||
// transmit operation
|
|
||||||
//
|
|
||||||
if ( pSocket->MaxTxBuf > *pTxBytes ) {
|
|
||||||
//
|
//
|
||||||
// Attempt to allocate the packet
|
// Attempt to allocate the packet
|
||||||
//
|
//
|
||||||
|
@ -923,6 +923,7 @@ EslUdp4TxBuffer (
|
||||||
// Free the packet
|
// Free the packet
|
||||||
//
|
//
|
||||||
EslSocketPacketFree ( pPacket, DEBUG_TX );
|
EslSocketPacketFree ( pPacket, DEBUG_TX );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -935,16 +936,22 @@ EslUdp4TxBuffer (
|
||||||
// Packet allocation failed
|
// Packet allocation failed
|
||||||
//
|
//
|
||||||
pSocket->errno = ENOMEM;
|
pSocket->errno = ENOMEM;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
//
|
//
|
||||||
// Not enough buffer space available
|
// Set the next port
|
||||||
//
|
//
|
||||||
pSocket->errno = EAGAIN;
|
pPort = pPort->pLinkSocket;
|
||||||
Status = EFI_NOT_READY;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
//
|
||||||
|
// Not enough buffer space available
|
||||||
|
//
|
||||||
|
pSocket->errno = EAGAIN;
|
||||||
|
Status = EFI_NOT_READY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -835,21 +835,21 @@ EslUdp6TxBuffer (
|
||||||
//
|
//
|
||||||
if ( SOCKET_STATE_CONNECTED == pSocket->State ) {
|
if ( SOCKET_STATE_CONNECTED == pSocket->State ) {
|
||||||
//
|
//
|
||||||
// Locate the port
|
// Verify that there is enough room to buffer another
|
||||||
|
// transmit operation
|
||||||
//
|
//
|
||||||
pPort = pSocket->pPortList;
|
pTxBytes = &pSocket->TxBytes;
|
||||||
if ( NULL != pPort ) {
|
if ( pSocket->MaxTxBuf > *pTxBytes ) {
|
||||||
//
|
//
|
||||||
// Determine the queue head
|
// Locate the port
|
||||||
//
|
//
|
||||||
pUdp6 = &pPort->Context.Udp6;
|
pPort = pSocket->pPortList;
|
||||||
pTxBytes = &pSocket->TxBytes;
|
while ( NULL != pPort ) {
|
||||||
|
//
|
||||||
|
// Determine the queue head
|
||||||
|
//
|
||||||
|
pUdp6 = &pPort->Context.Udp6;
|
||||||
|
|
||||||
//
|
|
||||||
// Verify that there is enough room to buffer another
|
|
||||||
// transmit operation
|
|
||||||
//
|
|
||||||
if ( pSocket->MaxTxBuf > *pTxBytes ) {
|
|
||||||
//
|
//
|
||||||
// Attempt to allocate the packet
|
// Attempt to allocate the packet
|
||||||
//
|
//
|
||||||
|
@ -960,6 +960,7 @@ EslUdp6TxBuffer (
|
||||||
// Free the packet
|
// Free the packet
|
||||||
//
|
//
|
||||||
EslSocketPacketFree ( pPacket, DEBUG_TX );
|
EslSocketPacketFree ( pPacket, DEBUG_TX );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -972,16 +973,22 @@ EslUdp6TxBuffer (
|
||||||
// Packet allocation failed
|
// Packet allocation failed
|
||||||
//
|
//
|
||||||
pSocket->errno = ENOMEM;
|
pSocket->errno = ENOMEM;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
//
|
//
|
||||||
// Not enough buffer space available
|
// Set the next port
|
||||||
//
|
//
|
||||||
pSocket->errno = EAGAIN;
|
pPort = pPort->pLinkSocket;
|
||||||
Status = EFI_NOT_READY;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
//
|
||||||
|
// Not enough buffer space available
|
||||||
|
//
|
||||||
|
pSocket->errno = EAGAIN;
|
||||||
|
Status = EFI_NOT_READY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue