Revision: 201021 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 14:22:18 +0300
branchRCL_3
changeset 14 23b59305592d
parent 11 2129f10626ba
child 15 4214adf9e0d3
Revision: 201021 Kit: 2010121
linklayercontrol/networkinterfacemgr/agentprcore/src/CAgentAdapter.cpp
linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcprstates.cpp
linklayercontrol/networkinterfacemgr/eabi/agentprcoreU.def
linklayercontrol/networkinterfacemgr/inc/nifman_internal.h
linklayerprotocols/ethernetnif/EthInt/Ethbase.cpp
linklayerprotocols/ethernetnif/eabi/ethprotou.def
linklayerprotocols/pppnif/eabi/pppmainU.DEF
networkcontrol/ipnetworklayer/src/IPProtoCPR.cpp
networkcontrol/iptransportlayer/src/ipcprups_activities.cpp
networkprotocols/tcpipv4v6prt/group/tcpip6.mmp
networkprotocols/tcpipv4v6prt/inc/tcp.h
networkprotocols/tcpipv4v6prt/src/tcp_sap.cpp
--- a/linklayercontrol/networkinterfacemgr/agentprcore/src/CAgentAdapter.cpp	Tue May 11 17:38:48 2010 +0300
+++ b/linklayercontrol/networkinterfacemgr/agentprcore/src/CAgentAdapter.cpp	Tue May 25 14:22:18 2010 +0300
@@ -155,8 +155,12 @@
         {
         iAgent->CancelReconnect();
         }
-    iAgentState = EDisconnecting;
-    iAgent->Disconnect(aReason);
+    // Issue disconnect only if agent is not already disconneting state
+    else if (iAgentState != EDisconnecting)
+        {	
+        iAgentState = EDisconnecting;
+        iAgent->Disconnect(aReason);
+        }
     }
 
 
@@ -307,6 +311,8 @@
         else
             {
             iLastProgress.iError = aStatus;
+            // Set the agent state to EDisconnecting
+            iAgentState = EDisconnecting;
             iAgent->Disconnect(aStatus);
             }
         }
--- a/linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcprstates.cpp	Tue May 11 17:38:48 2010 +0300
+++ b/linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcprstates.cpp	Tue May 25 14:22:18 2010 +0300
@@ -101,7 +101,9 @@
 
 	TNodeId thisNodeId = iContext.Node().NodeId();
 	
-	RNodeInterface* sp = iContext.Node().AddClientL(realIapNodeId, TClientType(TCFClientType::EServProvider));
+	//SP are peers added with TClientType ((TCFClientType::EServProvider, CFClientType::EActive))
+	RNodeInterface* sp = iContext.Node().AddClientL(realIapNodeId, TClientType(TCFClientType::EServProvider, TCFClientType::EActive));
+		
 	__ASSERT_DEBUG(sp != NULL, User::Panic(KTunnelAgentCPRPanic, ETunnelAgentCprNoServiceProvider));
  	iContext.iNodeActivity->PostRequestTo(
  			realIapNodeId, 
--- a/linklayercontrol/networkinterfacemgr/eabi/agentprcoreU.def	Tue May 11 17:38:48 2010 +0300
+++ b/linklayercontrol/networkinterfacemgr/eabi/agentprcoreU.def	Tue May 25 14:22:18 2010 +0300
@@ -190,10 +190,9 @@
 	_ZN28CAgentMetaConnectionProvider15GetDes8SettingLERK7TDesC16R5TDes8PN5ESock14MPlatsecApiExtE @ 189 NONAME
 	_ZN28CAgentMetaConnectionProvider16GetDes16SettingLERK7TDesC16R6TDes16PN5ESock14MPlatsecApiExtE @ 190 NONAME
 	_ZN28CAgentMetaConnectionProvider18GetLongDesSettingLERK7TDesC16RP7HBufC16PN5ESock14MPlatsecApiExtE @ 191 NONAME
-	_ZThn176_N28CAgentMetaConnectionProvider14GetIntSettingLERK7TDesC16RmPN5ESock14MPlatsecApiExtE @ 192 NONAME
-	_ZThn176_N28CAgentMetaConnectionProvider15GetBoolSettingLERK7TDesC16RiPN5ESock14MPlatsecApiExtE @ 193 NONAME
-	_ZThn176_N28CAgentMetaConnectionProvider15GetDes8SettingLERK7TDesC16R5TDes8PN5ESock14MPlatsecApiExtE @ 194 NONAME
-	_ZThn176_N28CAgentMetaConnectionProvider16GetDes16SettingLERK7TDesC16R6TDes16PN5ESock14MPlatsecApiExtE @ 195 NONAME
-	_ZThn176_N28CAgentMetaConnectionProvider18GetLongDesSettingLERK7TDesC16RP7HBufC16PN5ESock14MPlatsecApiExtE @ 196 NONAME
+	_ZThn180_N28CAgentMetaConnectionProvider14GetIntSettingLERK7TDesC16RmPN5ESock14MPlatsecApiExtE @ 192 NONAME
+	_ZThn180_N28CAgentMetaConnectionProvider15GetBoolSettingLERK7TDesC16RiPN5ESock14MPlatsecApiExtE @ 193 NONAME
+	_ZThn180_N28CAgentMetaConnectionProvider15GetDes8SettingLERK7TDesC16R5TDes8PN5ESock14MPlatsecApiExtE @ 194 NONAME
+	_ZThn180_N28CAgentMetaConnectionProvider16GetDes16SettingLERK7TDesC16R6TDes16PN5ESock14MPlatsecApiExtE @ 195 NONAME
+	_ZThn180_N28CAgentMetaConnectionProvider18GetLongDesSettingLERK7TDesC16RP7HBufC16PN5ESock14MPlatsecApiExtE @ 196 NONAME
 
-
--- a/linklayercontrol/networkinterfacemgr/inc/nifman_internal.h	Tue May 11 17:38:48 2010 +0300
+++ b/linklayercontrol/networkinterfacemgr/inc/nifman_internal.h	Tue May 25 14:22:18 2010 +0300
@@ -25,8 +25,8 @@
 
 #include <es_prot.h>
 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <es_prot_internal.h>
-#include <es_sock_partner.h>
+//#include <es_prot_internal.h>
+//#include <es_sock_partner.h>
 #endif
 
 
--- a/linklayerprotocols/ethernetnif/EthInt/Ethbase.cpp	Tue May 11 17:38:48 2010 +0300
+++ b/linklayerprotocols/ethernetnif/EthInt/Ethbase.cpp	Tue May 25 14:22:18 2010 +0300
@@ -1084,7 +1084,8 @@
 
 void CLANLinkCommon::Destroy()
 	{
-	ASSERT(iMMState==EStopped);
+    	// DEF134153: RNDIS doesn't override CLANLinkCommon::Destroy()
+	ASSERT(iMMState==EStarting || iMMState==EStopped);
 	DeleteThisFlow();
 	}
 
--- a/linklayerprotocols/ethernetnif/eabi/ethprotou.def	Tue May 11 17:38:48 2010 +0300
+++ b/linklayerprotocols/ethernetnif/eabi/ethprotou.def	Tue May 25 14:22:18 2010 +0300
@@ -89,7 +89,7 @@
 	_ZThn80_N14CLANLinkCommon11GetControlLERK6TDesC8 @ 88 NONAME ABSENT
 	_ZThn80_N14CLANLinkCommon5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 89 NONAME ABSENT
 	_ZThn80_N14CLANLinkCommon6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 90 NONAME ABSENT
-	_ZThn96_N14CLANLinkCommon11GetControlLERK6TDesC8 @ 91 NONAME
-	_ZThn96_N14CLANLinkCommon5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 92 NONAME
-	_ZThn96_N14CLANLinkCommon6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 93 NONAME
+	_ZThn100_N14CLANLinkCommon11GetControlLERK6TDesC8 @ 91 NONAME
+	_ZThn100_N14CLANLinkCommon5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 92 NONAME
+	_ZThn100_N14CLANLinkCommon6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 93 NONAME
 
--- a/linklayerprotocols/pppnif/eabi/pppmainU.DEF	Tue May 11 17:38:48 2010 +0300
+++ b/linklayerprotocols/pppnif/eabi/pppmainU.DEF	Tue May 25 14:22:18 2010 +0300
@@ -118,52 +118,28 @@
 	_ZN7CPppLcpC1ERN5ESock29CSubConnectionFlowFactoryBaseERKN8Messages7TNodeIdEPNS0_17CProtocolIntfBaseE @ 117 NONAME
 	_ZN7CPppLcpC2ERN5ESock29CSubConnectionFlowFactoryBaseERKN8Messages7TNodeIdEPNS0_17CProtocolIntfBaseE @ 118 NONAME
 	_ZThn20_N7CPppLcp9ReceivedLERKN8Messages13TRuntimeCtxIdERKNS0_7TNodeIdERNS0_14TSignatureBaseE @ 119 NONAME
-	_ZThn80_N7CPppLcp11GetControlLERK6TDesC8 @ 120 NONAME ABSENT
-	_ZThn80_N7CPppLcp4FlowEv @ 121 NONAME ABSENT
-	_ZThn80_N7CPppLcp5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 122 NONAME ABSENT
-	_ZThn80_N7CPppLcp6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 123 NONAME ABSENT
-	_ZThn84_N7CPppLcp7ProcessER10RMBufChain @ 124 NONAME ABSENT
-	_ZThn88_N7CPppLcp12StartSendingEv @ 125 NONAME ABSENT
-	_ZThn88_N7CPppLcp5ErrorEi @ 126 NONAME ABSENT
-	_ZThn92_N7CPppLcp10FsmLayerUpEv @ 127 NONAME ABSENT
-	_ZThn92_N7CPppLcp12FsmLayerDownEi @ 128 NONAME ABSENT
-	_ZThn92_N7CPppLcp15FsmLayerStartedEv @ 129 NONAME ABSENT
-	_ZThn92_N7CPppLcp16FsmLayerFinishedEi @ 130 NONAME ABSENT
-	_ZThn92_N7CPppLcp16FsmRecvConfigAckER14RPppOptionList @ 131 NONAME ABSENT
-	_ZThn92_N7CPppLcp16FsmRecvConfigNakER14RPppOptionListS1_ @ 132 NONAME ABSENT
-	_ZThn92_N7CPppLcp18FsmAckOptionsValidER14RPppOptionListS1_ @ 133 NONAME ABSENT
-	_ZThn92_N7CPppLcp18FsmRecvUnknownCodeEhhiR10RMBufChain @ 134 NONAME ABSENT
-	_ZThn92_N7CPppLcp19FsmRecvConfigRejectER14RPppOptionListS1_ @ 135 NONAME ABSENT
-	_ZThn92_N7CPppLcp21FsmApplyConfigRequestER14RPppOptionList @ 136 NONAME ABSENT
-	_ZThn92_N7CPppLcp21FsmCheckConfigRequestER14RPppOptionListS1_S1_S1_ @ 137 NONAME ABSENT
-	_ZThn92_N7CPppLcp21FsmRejectOptionsValidER14RPppOptionListS1_ @ 138 NONAME ABSENT
-	_ZThn92_N7CPppLcp23FsmFillinConfigRequestLER14RPppOptionList @ 139 NONAME ABSENT
-	_ZThn92_N7CPppLcp27FsmTerminationPhaseCompleteEv @ 140 NONAME ABSENT
-	_ZThn92_N7CPppLcp28FsmConfigRequestOptionsValidER14RPppOptionList @ 141 NONAME ABSENT
-	_ZThn92_N7CPppLcpD0Ev @ 142 NONAME ABSENT
-	_ZThn92_N7CPppLcpD1Ev @ 143 NONAME ABSENT
-	_ZThn100_N7CPppLcp7ProcessER10RMBufChain @ 144 NONAME
-	_ZThn104_N7CPppLcp12StartSendingEv @ 145 NONAME
-	_ZThn104_N7CPppLcp5ErrorEi @ 146 NONAME
-	_ZThn108_N7CPppLcp10FsmLayerUpEv @ 147 NONAME
-	_ZThn108_N7CPppLcp12FsmLayerDownEi @ 148 NONAME
-	_ZThn108_N7CPppLcp15FsmLayerStartedEv @ 149 NONAME
-	_ZThn108_N7CPppLcp16FsmLayerFinishedEi @ 150 NONAME
-	_ZThn108_N7CPppLcp16FsmRecvConfigAckER14RPppOptionList @ 151 NONAME
-	_ZThn108_N7CPppLcp16FsmRecvConfigNakER14RPppOptionListS1_ @ 152 NONAME
-	_ZThn108_N7CPppLcp18FsmAckOptionsValidER14RPppOptionListS1_ @ 153 NONAME
-	_ZThn108_N7CPppLcp18FsmRecvUnknownCodeEhhiR10RMBufChain @ 154 NONAME
-	_ZThn108_N7CPppLcp19FsmRecvConfigRejectER14RPppOptionListS1_ @ 155 NONAME
-	_ZThn108_N7CPppLcp21FsmApplyConfigRequestER14RPppOptionList @ 156 NONAME
-	_ZThn108_N7CPppLcp21FsmCheckConfigRequestER14RPppOptionListS1_S1_S1_ @ 157 NONAME
-	_ZThn108_N7CPppLcp21FsmRejectOptionsValidER14RPppOptionListS1_ @ 158 NONAME
-	_ZThn108_N7CPppLcp23FsmFillinConfigRequestLER14RPppOptionList @ 159 NONAME
-	_ZThn108_N7CPppLcp27FsmTerminationPhaseCompleteEv @ 160 NONAME
-	_ZThn108_N7CPppLcp28FsmConfigRequestOptionsValidER14RPppOptionList @ 161 NONAME
-	_ZThn108_N7CPppLcpD0Ev @ 162 NONAME
-	_ZThn108_N7CPppLcpD1Ev @ 163 NONAME
-	_ZThn96_N7CPppLcp11GetControlLERK6TDesC8 @ 164 NONAME
-	_ZThn96_N7CPppLcp4FlowEv @ 165 NONAME
-	_ZThn96_N7CPppLcp5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 166 NONAME
-	_ZThn96_N7CPppLcp6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 167 NONAME
+	_ZThn100_N7CPppLcp11GetControlLERK6TDesC8 @ 120 NONAME
+	_ZThn100_N7CPppLcp4FlowEv @ 121 NONAME
+	_ZThn100_N7CPppLcp5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 122 NONAME
+	_ZThn100_N7CPppLcp6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 123 NONAME
+	_ZThn104_N7CPppLcp7ProcessER10RMBufChain @ 124 NONAME
+	_ZThn108_N7CPppLcp12StartSendingEv @ 125 NONAME
+	_ZThn108_N7CPppLcp5ErrorEi @ 126 NONAME
+	_ZThn112_N7CPppLcp10FsmLayerUpEv @ 127 NONAME
+	_ZThn112_N7CPppLcp12FsmLayerDownEi @ 128 NONAME
+	_ZThn112_N7CPppLcp15FsmLayerStartedEv @ 129 NONAME
+	_ZThn112_N7CPppLcp16FsmLayerFinishedEi @ 130 NONAME
+	_ZThn112_N7CPppLcp16FsmRecvConfigAckER14RPppOptionList @ 131 NONAME
+	_ZThn112_N7CPppLcp16FsmRecvConfigNakER14RPppOptionListS1_ @ 132 NONAME
+	_ZThn112_N7CPppLcp18FsmAckOptionsValidER14RPppOptionListS1_ @ 133 NONAME
+	_ZThn112_N7CPppLcp18FsmRecvUnknownCodeEhhiR10RMBufChain @ 134 NONAME
+	_ZThn112_N7CPppLcp19FsmRecvConfigRejectER14RPppOptionListS1_ @ 135 NONAME
+	_ZThn112_N7CPppLcp21FsmApplyConfigRequestER14RPppOptionList @ 136 NONAME
+	_ZThn112_N7CPppLcp21FsmCheckConfigRequestER14RPppOptionListS1_S1_S1_ @ 137 NONAME
+	_ZThn112_N7CPppLcp21FsmRejectOptionsValidER14RPppOptionListS1_ @ 138 NONAME
+	_ZThn112_N7CPppLcp23FsmFillinConfigRequestLER14RPppOptionList @ 139 NONAME
+	_ZThn112_N7CPppLcp27FsmTerminationPhaseCompleteEv @ 140 NONAME
+	_ZThn112_N7CPppLcp28FsmConfigRequestOptionsValidER14RPppOptionList @ 141 NONAME
+	_ZThn112_N7CPppLcpD0Ev @ 142 NONAME
+	_ZThn112_N7CPppLcpD1Ev @ 143 NONAME
 
--- a/networkcontrol/ipnetworklayer/src/IPProtoCPR.cpp	Tue May 11 17:38:48 2010 +0300
+++ b/networkcontrol/ipnetworklayer/src/IPProtoCPR.cpp	Tue May 25 14:22:18 2010 +0300
@@ -190,8 +190,8 @@
 namespace IPProtoCprClientLeaveActivity
 { //This activity will wait for ECFActivityBinderRequest to complete
 using namespace  CprClientLeaveActivity;
-DECLARE_DEFINE_CUSTOM_NODEACTIVITY(ECFActivityClientLeave, IPProtoCprClientLeave, Messages::TNodeSignal::TNullMessageId, CClientLeaveActivity::NewL) //May be waiting for both messages
-	FIRST_NODEACTIVITY_ENTRY(CoreStates::TAwaitingClientLeave, MeshMachine::TNoTag)
+DECLARE_DEFINE_RESERVED_CUSTOM_NODEACTIVITY(ECFActivityClientLeave, IPProtoCprClientLeave, TCFServiceProvider::TLeaveRequest, CClientLeaveActivity::New) //May be waiting for both messages
+	FIRST_NODEACTIVITY_ENTRY(MeshMachine::TAwaitingMessageState<TCFServiceProvider::TLeaveRequest>, MeshMachine::TNoTag)
 	THROUGH_NODEACTIVITY_ENTRY(KNoTag, CprClientLeaveActivity::CClientLeaveActivity::TRemoveClientAndDestroyOrphanedDataClients, CClientLeaveActivity::TNoTagOrSendPriorityToCtrlProvider)
 	NODEACTIVITY_ENTRY(CprStates::KSendPriorityToCtrlProvider, CClientLeaveActivity::TUpdatePriorityForControlProvider, CoreStates::TAwaitingJoinComplete, CClientLeaveActivity::TNoTagOrSendPriorityToServProvider)
 	NODEACTIVITY_ENTRY(CprStates::KSendPriorityToServProvider, CClientLeaveActivity::TUpdatePriorityForServiceProviders, CoreStates::TAwaitingJoinComplete, MeshMachine::TNoTag)
@@ -758,8 +758,7 @@
 		{
 		iTimerExpired = ETrue;
 		CancelTimer();
-		if (CountActivities(ECFActivityStop) == 0 &&
-+		    CountActivities(ECFActivityDestroy) == 0)
+		if (CountActivities(ECFActivityStop) == 0 && CountActivities(ECFActivityDestroy) == 0)
 			{
 			RClientInterface::OpenPostMessageClose(Id(), TNodeCtxId(ECFActivityStop, Id()), TCFServiceProvider::TStop(KErrTimedOut).CRef());
 			}
--- a/networkcontrol/iptransportlayer/src/ipcprups_activities.cpp	Tue May 11 17:38:48 2010 +0300
+++ b/networkcontrol/iptransportlayer/src/ipcprups_activities.cpp	Tue May 25 14:22:18 2010 +0300
@@ -70,8 +70,8 @@
 	LAST_NODEACTIVITY_ENTRY(KErrorTag, TDoNothing)
 NODEACTIVITY_END()
 
-DECLARE_DEFINE_CUSTOM_NODEACTIVITY(ECFActivityClientLeave, IpCprClientLeave, TNodeSignal::TNullMessageId, CClientLeaveActivity::NewL)
-	FIRST_NODEACTIVITY_ENTRY(CoreStates::TAwaitingClientLeave, MeshMachine::TNoTag)
+DECLARE_DEFINE_RESERVED_CUSTOM_NODEACTIVITY(ECFActivityClientLeave, IpCprClientLeave, Messages::TEPeer::TLeaveRequest, CClientLeaveActivity::New)
+	FIRST_NODEACTIVITY_ENTRY(MeshMachine::TAwaitingMessageState<TEPeer::TLeaveRequest>, MeshMachine::TNoTag)
 	THROUGH_NODEACTIVITY_ENTRY(KNoTag, IpCprStates::TSendUpsStatusChange, MeshMachine::TNoTag)
 	THROUGH_NODEACTIVITY_ENTRY(KNoTag, CClientLeaveActivity::TRemoveClientAndDestroyOrphanedDataClients, CClientLeaveActivity::TNoTagOrSendPriorityToCtrlProvider)
 	NODEACTIVITY_ENTRY(CprStates::KSendPriorityToCtrlProvider, CClientLeaveActivity::TUpdatePriorityForControlProvider, CoreStates::TAwaitingJoinComplete, CClientLeaveActivity::TNoTagOrSendPriorityToServProvider)
--- a/networkprotocols/tcpipv4v6prt/group/tcpip6.mmp	Tue May 11 17:38:48 2010 +0300
+++ b/networkprotocols/tcpipv4v6prt/group/tcpip6.mmp	Tue May 25 14:22:18 2010 +0300
@@ -49,7 +49,7 @@
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
-LIBRARY		euser.lib esock.lib esocksvr.lib mbufmgr.lib insock.lib inhook6.lib nifman.lib 
+LIBRARY		euser.lib esock.lib esocksvr.lib mbufmgr.lib insock.lib inhook6.lib nifman.lib hal.lib
 	
 
 CAPABILITY CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
--- a/networkprotocols/tcpipv4v6prt/inc/tcp.h	Tue May 11 17:38:48 2010 +0300
+++ b/networkprotocols/tcpipv4v6prt/inc/tcp.h	Tue May 25 14:22:18 2010 +0300
@@ -32,6 +32,7 @@
 #include "frag.h"
 #include "inet6log.h"
 #include <in6_opt.h>
+#include <hal.h>
 
 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
 #include <in_sock.h>
@@ -49,7 +50,9 @@
 //
 // Constants affecting protocol performance
 //
-const TUint KOneSecondUs      = 1000000;    //< Help for converting longer times to microseconds
+const TUint KOneSecondInUs      = 1000000;   //< For sec <-> usec conversions
+const TUint KOneSecondInMs      = 1000;      //< For sec <-> msec conversions
+const TUint KOneMsInUs          = 1000;      //< For msec <-> usec conversions
 
 const TUint KTcpMaximumWindow = 0x3fffffff;  //< Maximum receive window size
 const TUint KTcpMinimumWindow =      1024;  //< Minimum receive window size
@@ -59,7 +62,7 @@
 const TUint KTcpDefaultMSS    =     65535;  //< By default, MSS is not limited by user
 const TUint KTcpStandardMSS   =       536;  //< Internet standard MSS
 const TUint KTcpMinimumMSS    =        64;  //< Minimum acceptable MSS.
-const TUint KTcpMaxTransmit   =         2;  //< Transmit at most this many segments at one time.
+const TUint KTcpMaxTransmit   =         1;  //< Transmit at most this many segments at one time.
 
 const TUint KTcpMinRTO        =   1000000;  //< us (1s)
 const TUint KTcpMaxRTO        =  60000000;  //< us (60s)
@@ -236,6 +239,7 @@
 	void SetRecvWin(TUint aRecvWin) { iRecvBuf = aRecvWin;}
 	TUint GetRecvWinSize()			{ return iRecvBuf;	 }
 	TUint RecvMaxWnd()              { return iTcpMaxRecvWin;}
+	TUint RecvBufFromIniFile()      { return iRecvBufFromIniFile; }
 #endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
 
 #ifdef _LOG
@@ -295,6 +299,7 @@
 	RMBufAllocator iBufAllocator;
 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
 	TUint iTcpMaxRecvWin;
+	TUint iRecvBufFromIniFile;
 #endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
 	};
 
@@ -442,6 +447,8 @@
 	TUint32 iShrinkedWindowSize;
 	// Window size set by user. This will override the default values for the bearers
 	TBool   iWindowSetByUser;
+	//Flag for socket startup case. No tcp window expand/shrink in this case.
+	TBool iSocketStartupCase;
 #endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
 
 	// Maximum Segment Sizes
@@ -778,13 +785,28 @@
 
 inline TUint32 CProviderTCP6::TimeStamp()
 	{
-	TTime now;
+    TInt tickPeriod;
+    TUint64 ticsInMs;
+    // 
+    HAL::Get( HAL::ENanoTickPeriod, tickPeriod );
+    ticsInMs = (static_cast<TUint64> ( User::NTickCount() ) * tickPeriod)
+        / KOneMsInUs;
+    return static_cast<TUint32> ( ticsInMs );
+    /*
+    // This used to return micro seconds, but since the resolution of NTick
+    // is something around  ~1ms, we return now the timestamp in milliseconds
+    // (which is more than sufficient resolution for this). This is done to
+    // mittigate the risk of counter overflow. 
+	// The existing implementation is commented and not removed for future reference
+	// if required.
+    TTime now;
 	now.UniversalTime();
 #ifdef I64LOW
 	return I64LOW(now.Int64());
 #else
 	return (TUint32)now.Int64().GetTInt();
 #endif
+*/
 	}
 
 /**
--- a/networkprotocols/tcpipv4v6prt/src/tcp_sap.cpp	Tue May 11 17:38:48 2010 +0300
+++ b/networkprotocols/tcpipv4v6prt/src/tcp_sap.cpp	Tue May 25 14:22:18 2010 +0300
@@ -1102,7 +1102,7 @@
 			// Start linger timer. RSocket::Close() returns when timer
 			// expires or when all data has been succesfully transmitted.
 			//
-			iLingerTimer->Start(iLinger * KOneSecondUs);
+			iLingerTimer->Start(iLinger * KOneSecondInUs);
 			}
 		SchedTransmit();
 
@@ -1700,7 +1700,7 @@
 			{
 			// The heaviest time check only if we are otherwise allowed to send the keepalive.
 			TUint32 time_now = TimeStamp();
-			if (time_now - iLastTriggeredKeepAlive > KTcpKeepAliveTH * KOneSecondUs)
+			if (time_now - iLastTriggeredKeepAlive > KTcpKeepAliveTH * KOneSecondInMs)
 				{
 				iLastTriggeredKeepAlive = time_now;
 				LOG(Log::Printf(_L("\ttcp SAP[%u] CanSend(): Sending a Keep-Alive probe"), (TInt)this));
@@ -2354,7 +2354,7 @@
 	if (!iLastTimeout)
 		iLastTimeout = usec;
 
-	TUint32 distance = (usec - iLastTimeout) / KOneSecondUs;  // seconds
+	TUint32 distance = (usec - iLastTimeout) / KOneSecondInMs;  // seconds
 	TUint32 interval = iBackoff ? Protocol()->KeepAliveRxmt() : Protocol()->KeepAliveIntv();
 
 	if (distance > interval)
@@ -2363,14 +2363,14 @@
 		LOG(Log::Printf(_L("\ttcp SAP[%u] KeepAliveTimeout(): Sending a Keep-Alive probe"), (TInt)this));
 		SendSegment(KTcpCtlACK, iSND.UNA - 1, 0);
 		iBackoff++;
-		iRetransTimer->Restart(Protocol()->KeepAliveRxmt() * KOneSecondUs);
+		iRetransTimer->Restart(Protocol()->KeepAliveRxmt() * KOneSecondInUs);
 		}
 	else
 		{
 		// This branch is entered when the first keepalive has to be issued after an idle period.
 		distance = Protocol()->KeepAliveIntv() - distance;
 		iRetransTimer->Restart((distance > 1800) ?
-			1800 * KOneSecondUs : (distance * KOneSecondUs));
+			1800 * KOneSecondInUs : (distance * KOneSecondInUs));
 		}
 	}
 
@@ -2379,7 +2379,7 @@
 	{
 	ASSERT(iRetransTimer);
 	iRetransTimer->Restart((Protocol()->KeepAliveIntv() > 1800) ?
-		1800 * KOneSecondUs : (Protocol()->KeepAliveIntv() * KOneSecondUs));
+		1800 * KOneSecondInUs : (Protocol()->KeepAliveIntv() * KOneSecondInUs));
 	// Backoff is used for counting unacknowledged keepalive retransmissions during idle periods
 	iBackoff = 0;
 	iLastTimeout = TimeStamp();
@@ -3591,20 +3591,20 @@
 							{
 							// NewReno partial ACK processing.
 
-			  /* From RFC2582:
-			   If this ACK does *not* acknowledge all of the data up to and
-			   including "recover", then this is a partial ACK.  In this case,
-			   retransmit the first unacknowledged segment.  Deflate the
-			   congestion window by the amount of new data acknowledged, then
-			   add back one MSS and send a new segment if permitted by the new
-			   value of cwnd.  This "partial window deflation" attempts to
-			   ensure that, when Fast Recovery eventually ends, approximately
-			   ssthresh amount of data will be outstanding in the network.  Do
-			   not exit the Fast Recovery procedure (i.e., if any duplicate ACKs
-			   subsequently arrive, execute Steps 3 and 4 above).
-
-			   For the first partial ACK that arrives during Fast Recovery, also
-			   reset the retransmit timer.
+						  /* From RFC2582:
+						   If this ACK does *not* acknowledge all of the data up to and
+						   including "recover", then this is a partial ACK.  In this case,
+						   retransmit the first unacknowledged segment.  Deflate the
+						   congestion window by the amount of new data acknowledged, then
+						   add back one MSS and send a new segment if permitted by the new
+						   value of cwnd.  This "partial window deflation" attempts to
+						   ensure that, when Fast Recovery eventually ends, approximately
+						   ssthresh amount of data will be outstanding in the network.  Do
+						   not exit the Fast Recovery procedure (i.e., if any duplicate ACKs
+						   subsequently arrive, execute Steps 3 and 4 above).
+
+						   For the first partial ACK that arrives during Fast Recovery, also
+						   reset the retransmit timer.
 							*/
 
 							iCwnd -= acked;
@@ -3621,6 +3621,13 @@
 							iDupAcks = Max(iDupAcks - acked / (TInt)iSMSS, 0);
 							}
 						}
+					else if ( iDupAcks )
+                        {
+                        // New data acknowledged, and not ongoing any recovery action
+                        // Reset duplicate ack count
+                        LOG(Log::Printf(_L("\ttcp SAP[%u] ProcessSegments(): Reset iDupAcks to 0"), (TInt)this));
+                        iDupAcks = 0;
+                        }
 
 					// Reset limited transmit window
 					iLwnd = 0;
@@ -3796,16 +3803,8 @@
 						iFlags.iEcnSendCWR = ETrue;
 						}
 					}
-				if((iSND.NXT - ack) >0 && InState(ETcpEstablished) && (acked ==0))
-					{
-					iRetryAck++;
-					if(iRetryAck >=4) // 4 an arbitary number; as this count does not refer to dup_ack, this will not interfere with Fast retransmission
-						{
-						LOG(Log::Printf(_L("\ttcp SAP[%u] ProcessSegments(): retransmitting the segment"), (TInt)this));
-						SendSegments(ETrue);
-						iRetryAck = 0; // reset the retry count
-						}
-					}
+				// This section used to hold the RetryACK concept, a reference can be checked
+				// from older versions(9.2/9.3). Its being removed as not required.	
 					
 				}
 			}