--- a/telephonyprotocols/rawipnif/src/IPv4Binder.cpp Wed Apr 14 17:11:46 2010 +0300
+++ b/telephonyprotocols/rawipnif/src/IPv4Binder.cpp Tue Apr 27 17:51:07 2010 +0300
@@ -25,6 +25,7 @@
#include "RawIPFlow.h"
#include "IPv4Binder.h"
#include <comms-infras/linkprovision.h>
+#include <u32hal.h>
using namespace ESock;
#ifdef WCDMA_STUB
@@ -34,6 +35,12 @@
#define LOG_IP_ADDRESS(desc,addr) _LOG_L1C5(_L8(" " desc " = %d.%d.%d.%d"), \
addr >> 24, (addr >> 16) & 0xFF, (addr >> 8) & 0xFF, addr & 0xFF);
+#ifdef __EABI__
+// Patch data is used and KMtuIPv4 and KRMtuIPv4 can be modified to a different value in RawIpNif.iby file
+extern const TInt KMtuIPv4 = KDefaultMtu;
+extern const TInt KRMtuIPv4 = KDefaultMtu;
+#endif
+
CIPv4Binder::CIPv4Binder(CRawIPFlow& aFlow, CBttLogger* aTheLogger)
/**
* Constructor
@@ -164,8 +171,22 @@
config->iFamily = KAfInet; /* KAfInet - selects TBinderConfig4 */
config->iInfo.iFeatures = KIfCanBroadcast | KIfCanMulticast; /* Feature flags */
- config->iInfo.iMtu = KDefaultMtu; /* Maximum transmission unit. */
- config->iInfo.iRMtu = KDefaultMtu; /* Maximum transmission unit for receiving. */
+
+
+#if defined __EABI__
+ // Default value for Tx and Rx packet size
+ config->iInfo.iMtu = KMtuIPv4;
+ config->iInfo.iRMtu = KRMtuIPv4;
+#else // WINS
+ // Set default values in case patch is not present in epoc.ini
+ config->iInfo.iMtu = KDefaultMtu;
+ config->iInfo.iRMtu = KDefaultMtu;
+
+ // for the emulator process is patched via the epoc.ini file
+ UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"rawip_KMtuIPv4",&(config->iInfo.iMtu));
+ UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"rawip_KRMtuIPv4",&(config->iInfo.iRMtu));
+#endif
+
config->iInfo.iSpeedMetric = iSpeedMetric; /* approximation of the interface speed in Kbps. */
LOG_IP_ADDRESS("Local IP address from TBinderConfig", iSettings.iLocalAddr);