diff -r af3fb27c7511 -r 13838cf40350 wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Synchronize.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Synchronize.cpp Tue May 25 14:40:09 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Synchronize.cpp Mon Jun 21 17:43:00 2010 +0300 @@ -16,7 +16,7 @@ */ /* -* %version: 29 % +* %version: 31 % */ #include "config.h" @@ -65,7 +65,7 @@ // ----------------------------------------------------------------------------- // WlanDot11Synchronize::WlanDot11Synchronize() : - iState( EINIT ), iJoinFailed ( EFalse ) + iState( EINIT ), iJoinStatus ( KErrNone ) { } @@ -188,7 +188,7 @@ switch ( iState ) { case EINIT: - if ( InitActions( aCtxImpl ) ) + if ( ( iJoinStatus = InitActions( aCtxImpl ) ) == KErrNone ) { // we meet the requirements of the network so we can continue @@ -214,13 +214,12 @@ else { // network requirements not met. Take the same action as - // as in the join failed case + // in the join failed case OsTracePrint( KWarningLevel, (TUint8*) ("UMAC: WlanDot11Synchronize::OnStateEntryEvent(): network requirements not met - abort")); - iJoinFailed = ETrue; ChangeInternalState( aCtxImpl, ECONTINUEDOT11TRAVERSE ); } break; @@ -408,11 +407,11 @@ KUmacDetails, (TUint8*)("UMAC: WlanDot11Synchronize::ContinueDot11StateTraversal()")); - if ( iJoinFailed ) + if ( iJoinStatus != KErrNone ) { // set the completion code value to be returned to user mode // as the dot11idle state does the OID completion in this case - aCtxImpl.iStates.iIdleState.Set( KErrGeneral ); + aCtxImpl.iStates.iIdleState.Set( iJoinStatus ); // ... and proceed to dot11idle state ChangeState( aCtxImpl, *this, // prev state @@ -468,7 +467,7 @@ // // ----------------------------------------------------------------------------- // -TBool WlanDot11Synchronize::InitActions( WlanContextImpl& aCtxImpl ) +TInt WlanDot11Synchronize::InitActions( WlanContextImpl& aCtxImpl ) const { OsTracePrint( KUmacDetails, @@ -477,7 +476,6 @@ // as we are about to join a new AP, reset BSS Loss indicators aCtxImpl.ResetBssLossIndications(); - iJoinFailed = EFalse; // reset counter for this new AP connection aCtxImpl.ResetFailedTxPacketCount(); @@ -497,6 +495,9 @@ // Light PS is the initial desired PS mode configuration aCtxImpl.SetDesiredPsModeConfig( aCtxImpl.ClientLightPsModeConfig() ); + // also make sure that the dynamic power mode managemen parameters are in + // their WLAN Mgmt Client provided values + aCtxImpl.RestorePwrModeMgmtParameters(); // check do we meet the requirements for the network // and construct necessary objects for doing the connection @@ -504,7 +505,7 @@ return InitNetworkConnect( aCtxImpl, aCtxImpl.ScanResponseFrameBodyLength(), - aCtxImpl.ScanResponseFrameBody() ); + aCtxImpl.ScanResponseFrameBody() ); } // ----------------------------------------------------------------------------- @@ -984,7 +985,7 @@ // make a note of the failure and act // accordingly when we // soon again enter this state - iJoinFailed = ETrue; + iJoinStatus = KErrGeneral; } else {