diff options
author | Yu Pei <pei.yu@intel.com> | 2013-06-27 05:07:29 +0000 |
---|---|---|
committer | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-06-27 05:07:29 +0000 |
commit | 4986bbaf1151d1cccc1f2589bd13a86b539676b2 (patch) | |
tree | 978f1316e6cd66d885ed3de0974d860bb196ae4e /OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/SimpleNetwork.c | |
parent | ca243131657ba03f58206a417b938aa14cff585c (diff) | |
download | edk2-4986bbaf1151d1cccc1f2589bd13a86b539676b2.tar.gz edk2-4986bbaf1151d1cccc1f2589bd13a86b539676b2.tar.bz2 edk2-4986bbaf1151d1cccc1f2589bd13a86b539676b2.zip |
Ax88772: Add logic to separate packet, fix MTU issue. Ax88772b: Fix driver model unload function, fix SCT test failures.
Signed-off-by: Yu Pei <pei.yu@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>
Reviewed-by: Leahy, Leroy P <Leroy.P.Leahy@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14443 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/SimpleNetwork.c')
-rw-r--r-- | OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/SimpleNetwork.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/SimpleNetwork.c b/OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/SimpleNetwork.c index 1b9e26195f..a341f3bfce 100644 --- a/OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/SimpleNetwork.c +++ b/OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/SimpleNetwork.c @@ -858,7 +858,7 @@ SN_Setup ( pMode->State = EfiSimpleNetworkStopped;
pMode->HwAddressSize = PXE_HWADDR_LEN_ETHER;
pMode->MediaHeaderSize = sizeof ( ETHERNET_HEADER );
- pMode->MaxPacketSize = AX88772_MAX_PKT_SIZE;
+ pMode->MaxPacketSize = MAX_ETHERNET_PKT_SIZE;
pMode->NvRamSize = 0;
pMode->NvRamAccessSize = 0;
pMode->ReceiveFilterMask = EFI_SIMPLE_NETWORK_RECEIVE_UNICAST
@@ -885,6 +885,15 @@ SN_Setup ( pNicDevice->PhyId = PHY_ID_INTERNAL;
pNicDevice->b100Mbps = TRUE;
pNicDevice->bFullDuplex = TRUE;
+
+ Status = gBS->AllocatePool ( EfiRuntimeServicesData,
+ MAX_BULKIN_SIZE,
+ (VOID **) &pNicDevice->pBulkInBuff);
+ if ( EFI_ERROR(Status)) {
+ DEBUG (( EFI_D_ERROR, "Memory are not enough\n"));
+ return Status;
+ }
+
Status = Ax88772MacAddressGet (
pNicDevice,
&pMode->PermanentAddress.Addr[0]);
@@ -958,7 +967,7 @@ SN_Start ( pMode->State = EfiSimpleNetworkStarted;
pMode->HwAddressSize = PXE_HWADDR_LEN_ETHER;
pMode->MediaHeaderSize = sizeof ( ETHERNET_HEADER );
- pMode->MaxPacketSize = AX88772_MAX_PKT_SIZE;
+ pMode->MaxPacketSize = MAX_ETHERNET_PKT_SIZE;
pMode->ReceiveFilterMask = EFI_SIMPLE_NETWORK_RECEIVE_UNICAST
| EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST
| EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST
@@ -1360,7 +1369,11 @@ SN_Transmit ( // Update the link status
//
pNicDevice = DEV_FROM_SIMPLE_NETWORK ( pSimpleNetwork );
- Ax88772Rx ( pNicDevice, FALSE );
+
+ //
+ //No need to call receive to receive packet
+ //
+ //Ax88772Rx ( pNicDevice, FALSE );
pMode->MediaPresent = pNicDevice->bLinkUp;
//
|