# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1277313462 -10800 # Node ID 5e6ba967244fe52b7e96b20350a2dafa2edafc0c # Parent debc621e0d58d913c1e4fc737353461650b8b899 Revision: 201025 Kit: 2010125 diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_get_available_iaps.cpp --- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_get_available_iaps.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_get_available_iaps.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -16,7 +16,7 @@ */ /* -* %version: 41 % +* %version: 42 % */ #include "core_operation_get_available_iaps.h" @@ -1017,7 +1017,7 @@ } u8_t treshold_val = - static_cast(server_m->get_core_settings().rcp_improve_boundary()); + static_cast( server_m->get_device_settings().rcpi_trigger ); /** * Loop through the IAP list. @@ -1039,22 +1039,30 @@ iap->id ); u32_t* iap_id = new u32_t; + bool_t is_match_found( true_t ); if( iap_id ) { - if ( server_m->get_core_settings().is_iap_id_in_weak_list( iap->id) ) + if ( server_m->get_core_settings().is_iap_id_in_weak_list( iap->id ) ) { DEBUG( "core_operation_get_available_iaps_c::remove_matching_iaps() - IAP ID is in weak list" ); if ( ap_data.rcpi() > treshold_val ) { - DEBUG( "core_operation_get_available_iaps_c::remove_matching_iaps() - RCPI improved enough, remove IAP ID from weak list" ); + DEBUG1( "core_operation_get_available_iaps_c::remove_matching_iaps() - RCPI improved enough (%u), remove IAP ID from weak list", + ap_data.rcpi() ); *iap_id = iap->id; iap_id_list_m.append( iap_id ); iap_id = NULL; server_m->get_core_settings().remove_iap_id_from_weak_list( iap->id ); } + else + { + DEBUG2( "core_operation_get_available_iaps_c::remove_matching_iaps() - RCPI not improved enough (%u vs %u)", + ap_data.rcpi(), treshold_val ); + is_match_found = false_t; + } } else { @@ -1066,19 +1074,22 @@ /** Using a temporary pointer to guarantee list iterator working. */ core_iap_data_s* temp = iap; - iap = iap_data_list_m.next(); - core_error_e ret = iap_data_list_m.remove( temp ); - if( ret != core_error_ok ) + if( is_match_found ) { - if( iap ) + core_error_e ret = iap_data_list_m.remove( temp ); + if( ret != core_error_ok ) { - DEBUG1("core_operation_get_available_iaps_c::remove_matching_iaps() - error while removing IAP entry (%d)", - iap->id ); + if( iap ) + { + DEBUG1("core_operation_get_available_iaps_c::remove_matching_iaps() - error while removing IAP entry (%d)", + iap->id ); + } } + + delete temp; } - delete temp; temp = NULL; delete iap_id; iap_id = NULL; diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/conf/wlanengine.confml Binary file wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/conf/wlanengine.confml has changed diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanticktimer.cpp --- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanticktimer.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanticktimer.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -17,7 +17,7 @@ */ /* -* %version: 1 % +* %version: 2 % */ #include "wlanticktimer.h" @@ -72,6 +72,7 @@ // CWlanTickTimer::~CWlanTickTimer() { + Cancel(); iTimer.Close(); } diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmscanrequest.cpp --- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmscanrequest.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmscanrequest.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -29,7 +29,7 @@ { DEBUG( "CWlmScanRequest::NewL()" ); - CWlmScanRequest* self = new CWlmScanRequest( + CWlmScanRequest* self = new (ELeave) CWlmScanRequest( aClient ); CleanupStack::PushL( self ); self->ConstructL(); diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.h --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.h Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.h Wed Jun 23 20:17:42 2010 +0300 @@ -16,7 +16,7 @@ */ /* -* %version: 106 % +* %version: 107 % */ #ifndef WLANCONTEXTIMPL_H @@ -1310,11 +1310,13 @@ * @param aQueueId Id of the queue/AC via which the frame will be * transmitted * @param aEtherType Ethernet type of the frame + * @param aDot11FrameType 802.11 frame type * @return To which power management mode to change; if any at all */ inline TPowerMgmtModeChange OnFrameTx( WHA::TQueueId aQueueId, - TUint16 aEtherType ); + TUint16 aEtherType, + T802Dot11FrameControlTypeMask aDot11FrameType = E802Dot11FrameTypeData ); /** * To be called when accepting an Rx frame @@ -1333,6 +1335,16 @@ TDaType aDaType ); /** + * To be called when receiving the PS Mode Error indication + * + * Informs Dynamic Power Mode Manager about the indication. + * Determines the need to make a power mode transition. + * + * @return To which power management mode to change; if any at all + */ + inline TPowerMgmtModeChange OnPsModeErrorIndication(); + + /** * Sets the dynamic power mode transition algorithm parameters * * @since S60 3.1 @@ -1415,6 +1427,12 @@ inline void FreezePwrModeMgmtTrafficOverride(); /** + * Restores the Active mode parameters of dynamic power mode management + * back to their WLAN Mgmt Client provided values + */ + inline void RestorePwrModeMgmtParameters(); + + /** * To be called upon Active to Light PS timer timeout * * @since S60 v5.1 @@ -1760,7 +1778,15 @@ * * @since S60 3.2 */ - void OnKeepAliveTimerTimeout(); + inline void OnKeepAliveTimerTimeout(); + + /** + * Are we currently in Voice over WLAN Call state + * + * @return ETrue if we are + * EFalse if we are not + */ + inline TBool InVoiceCallState() const; /** * Insert new RCPI value into the Signal Predictor. @@ -1804,13 +1830,27 @@ WHA::TRcpi aRcpiWarnLevel ); /** - * Adds a WLAN feature supported by us to the list of those supported - * features which are indicated in BSS membership selector + * Adds the specified WLAN feature supported by us to the list of those + * supported features which are indicated in BSS membership selector * * @param aFeature Feature to add */ void AddBssMembershipFeature( T802Dot11BssMembershipSelector aFeature ); - + + /** + * Removes the specified WLAN feature from our list of those supported + * features which are indicated in BSS membership selector + * + * @param aFeature Feature to remove + */ + void RemoveBssMembershipFeature( TUint8 aItem ); + + /** + * Clears (i.e. makes empty) our list of features which are indicated + * in BSS membership selector + */ + inline void ClearBssMembershipFeatureList(); + /** * Checks if the specified item is a WLAN feature indicated in BSS * membership selector and if it is supported by us diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.inl --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.inl Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.inl Wed Jun 23 20:17:42 2010 +0300 @@ -16,7 +16,7 @@ */ /* -* %version: 78 % +* %version: 79 % */ #include "umacconnectcontext.h" @@ -1610,9 +1610,13 @@ // inline TPowerMgmtModeChange WlanContextImpl::OnFrameTx( WHA::TQueueId aQueueId, - TUint16 aEtherType ) + TUint16 aEtherType, + T802Dot11FrameControlTypeMask aDot11FrameType ) { - return iDynamicPowerModeCntx.OnFrameTx( aQueueId, aEtherType ); + return iDynamicPowerModeCntx.OnFrameTx( + aQueueId, + aEtherType, + aDot11FrameType ); } // --------------------------------------------------------------------------- @@ -1636,6 +1640,15 @@ // // --------------------------------------------------------------------------- // +inline TPowerMgmtModeChange WlanContextImpl::OnPsModeErrorIndication() + { + return iDynamicPowerModeCntx.OnPsModeErrorIndication(); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// inline void WlanContextImpl::SetPowerModeManagementParameters( TUint32 aToLightPsTimeout, TUint16 aToLightPsFrameThreshold, @@ -1693,6 +1706,15 @@ // // --------------------------------------------------------------------------- // +inline void WlanContextImpl::RestorePwrModeMgmtParameters() + { + iDynamicPowerModeCntx.RestoreActiveModeParameters(); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// inline TBool WlanContextImpl::OnActiveToLightPsTimerTimeout() { return iDynamicPowerModeCntx.OnActiveToLightPsTimerTimeout(); @@ -2059,6 +2081,15 @@ // // --------------------------------------------------------------------------- // +inline TBool WlanContextImpl::InVoiceCallState() const + { + return iNullSendController.InVoiceCallState(); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// inline TBool WlanContextImpl::InsertNewRcpiIntoPredictor( TInt64 aTimestamp, WHA::TRcpi aRcpi ) @@ -2100,6 +2131,18 @@ aRcpiWarnLevel ); } +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +inline void WlanContextImpl::ClearBssMembershipFeatureList() + { + os_memset( + &iOurBssMembershipFeatureArray, + KUnallocated, + sizeof( iOurBssMembershipFeatureArray ) ); + } + // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11Associated.h --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11Associated.h Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11Associated.h Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 46 % +* %version: 47 % */ #ifndef WLANDOT11ASSOCIATED_H @@ -511,37 +511,6 @@ TBool aMulticastData ); /** - * Adds a multicast MAC address and starts to filter (Rx) multicast - * traffic sent to any other MAC addresses than those that have been - * specified using this method - * @param aCtxImpl statemachine context - * @param aMacAddr The address to be added - * @return ETrue if a state change occurred in the state machine - * EFalse otherwise - */ - virtual TBool AddMulticastAddr( - WlanContextImpl& aCtxImpl, - const TMacAddress& aMacAddr ); - - /** - * Removes a multicast MAC address from multicast (Rx) filtering - * configuration. So any packet that we receive and which has been sent - * to the multicast address in question is not accepted any more (i.e. - * it is filtered). - * However, if there are no addresses left in the multicast (Rx) filtering - * configuration after this remove, the multicast filtering is disabled - * and all (otherwise acceptable) multicast packets are accepted again. - * @param aCtxImpl statemachine context - * @param aMacAddr The address to be removed - * @return ETrue if a state change occurred in the state machine - * EFalse otherwise - */ - virtual TBool RemoveMulticastAddr( - WlanContextImpl& aCtxImpl, - TBool aRemoveAll, - const TMacAddress& aMacAddr ); - - /** * From MWlanUserEvent * Add/set (or replace) a broadcast WEP key * @@ -582,16 +551,6 @@ TUint32 aMaxTxMSDULifetime ); /** - * Sets the WHA::KMibDot11GroupAddressesTable MIB - * - * @param aCtxImpl statemachine context - * @return ETrue if a state change occurred in the state machine - * EFalse otherwise - */ - TBool SetGroupAddressesTableMib( - WlanContextImpl& aCtxImpl ); - - /** * If the power mgmt mode needs to be changed - based on * aPowerMgmtModeChange - proceeds with the necessary actions * diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11InfrastructureMode.h --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11InfrastructureMode.h Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11InfrastructureMode.h Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 34 % +* %version: 35 % */ #ifndef WLANDOT11INFRASTRUCTUREMODE_H @@ -274,14 +274,6 @@ WHA::TRcpi aRcpi ); /** - * Indicates that the WLAN device has detected problems in the power - * save mode operation of the AP - * - * @param aCtxImpl global statemachine context - */ - virtual void DoPsModeErrorIndication( WlanContextImpl& aCtxImpl ); - - /** * Voice Call Entry timer timeout function * * @since S60 v3.2 diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11State.h --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11State.h Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11State.h Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 57 % +* %version: 58 % */ #ifndef WLANDOT11STATE_H @@ -859,6 +859,37 @@ const TMacAddress& aMacAddr ); /** + * Adds a multicast MAC address and starts to filter (Rx) multicast + * traffic sent to any other MAC addresses than those that have been + * specified using this method + * @param aCtxImpl statemachine context + * @param aMacAddr The address to be added + * @return ETrue if a state change occurred in the state machine + * EFalse otherwise + */ + virtual TBool AddMulticastAddr( + WlanContextImpl& aCtxImpl, + const TMacAddress& aMacAddr ); + + /** + * Removes a multicast MAC address from multicast (Rx) filtering + * configuration. So any packet that we receive and which has been sent + * to the multicast address in question is not accepted any more (i.e. + * it is filtered). + * However, if there are no addresses left in the multicast (Rx) filtering + * configuration after this remove, the multicast filtering is disabled + * and all (otherwise acceptable) multicast packets are accepted again. + * @param aCtxImpl statemachine context + * @param aMacAddr The address to be removed + * @return ETrue if a state change occurred in the state machine + * EFalse otherwise + */ + virtual TBool RemoveMulticastAddr( + WlanContextImpl& aCtxImpl, + TBool aRemoveAll, + const TMacAddress& aMacAddr ); + + /** * Set transmission power level. * This has to be legal at the current region. * @param aCtxImpl statemachine context @@ -1122,6 +1153,16 @@ const TSnapHeader& aSnapHeader ); /** + * Sets the WHA::KMibDot11GroupAddressesTable MIB + * + * @param aCtxImpl statemachine context + * @return ETrue if a state change occurred in the state machine + * EFalse otherwise + */ + TBool SetGroupAddressesTableMib( + WlanContextImpl& aCtxImpl ); + + /** * Sets the beacon lost count value * * @since S60 v3.1 diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacactivemodepowermodemgr.h --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacactivemodepowermodemgr.h Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacactivemodepowermodemgr.h Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 9 % +* %version: 10 % */ #ifndef WLAN_ACTIVE_MODE_POWER_MODE_MGR @@ -26,13 +26,22 @@ class WlanContextImpl; + /** * Class implementing infrastructure mode dynamic power mode management * algorithm for Active mode (CAM) */ class WlanActiveModePowerModeMgr : public WlanPowerModeMgrBase - { - + { + +public: + /** + * Default Rx/Tx frame count threshold for considering change to Light + * PS mode. + * This value is used if another value hasn't been provided + */ + static const TUint KDefaultToLightPsFrameThreshold = 1; + public: /** Ctor */ @@ -62,6 +71,7 @@ * @param aCtxImpl global statemachine context * @param aQueueId Id of the queue/AC via which the frame will be transmitted * @param aEtherType Ethernet type of the frame + * @param aDot11FrameType 802.11 frame type * @param aIgnoreThisFrame shall this frame be ignored from dynamic power * mode management perspective * @return To which power management mode to change; if any at all @@ -70,6 +80,7 @@ WlanContextImpl& aCtxImpl, WHA::TQueueId aQueueId, TUint16 aEtherType, + T802Dot11FrameControlTypeMask aDot11FrameType, TBool aIgnoreThisFrame ); /** diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacactivemodepowermodemgr.inl --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacactivemodepowermodemgr.inl Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacactivemodepowermodemgr.inl Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 4 % +* %version: 5 % */ // ----------------------------------------------------------------------------- @@ -27,6 +27,15 @@ TUint aToLightPsFrameThreshold, TUint16 aUapsdRxFrameLengthThreshold ) { + OsTracePrint( KPwrStateTransition, (TUint8*) + ("UMAC: WlanActiveModePowerModeMgr::SetParameters: " + "aToLightPsFrameThreshold: %d"), + aToLightPsFrameThreshold ); + OsTracePrint( KPwrStateTransition, (TUint8*) + ("UMAC: WlanActiveModePowerModeMgr::SetParameters: " + "aUapsdRxFrameLengthThreshold: %d"), + aUapsdRxFrameLengthThreshold ); + iToLightPsFrameThreshold = aToLightPsFrameThreshold; iUapsdRxFrameLengthThreshold = aUapsdRxFrameLengthThreshold; } diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdeeppsmodepowermodemgr.h --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdeeppsmodepowermodemgr.h Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdeeppsmodepowermodemgr.h Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 3 % +* %version: 4 % */ #ifndef WLAN_DEEP_PS_MODE_POWER_MODE_MGR @@ -42,6 +42,14 @@ virtual ~WlanDeepPsModePowerModeMgr(); /** + * Sets the dynamic power mode transition algorithm parameters + * + * @param aUapsdRxFrameLengthThreshold received frame + * payload length (in bytes) threshold in U-APSD network + */ + void SetParameters( TUint16 aUapsdRxFrameLengthThreshold ); + + /** * To be called when transmitting a frame * * @since S60 5.1 @@ -49,6 +57,7 @@ * @param aCtxImpl global statemachine context * @param aQueueId Id of the queue/AC via which the frame will be transmitted * @param aEtherType Ethernet type of the frame + * @param aDot11FrameType 802.11 frame type * @param aIgnoreThisFrame shall this frame be ignored from dynamic power * mode management perspective * @return To which power management mode to change; if any at all @@ -57,6 +66,7 @@ WlanContextImpl& aCtxImpl, WHA::TQueueId aQueueId, TUint16 aEtherType, + T802Dot11FrameControlTypeMask aDot11FrameType, TBool aIgnoreThisFrame ); /** @@ -80,6 +90,15 @@ TUint aPayloadLength, TDaType aDaType ); + /** + * From WlanPowerModeMgrBase + * To be called upon receiving the PS Mode Error indication + * Determines the need to make a power mode transition + * + * @return To which power management mode to change; if any at all + */ + virtual TPowerMgmtModeChange OnPsModeErrorIndication(); + /** * From WlanPowerModeMgrBase * Resets the state of the object diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdot11infrastructurenormalmode.h --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdot11infrastructurenormalmode.h Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdot11infrastructurenormalmode.h Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 10 % +* %version: 11 % */ #ifndef C_WLANDOT11INFRASTRUCTURENORMALMODE_H @@ -54,6 +54,16 @@ WlanContextImpl& aCtxImpl ); /** + * Indicates that the WLAN device has detected problems in the power + * save mode operation of the AP + * + * @param aCtxImpl global statemachine context + * @return ETrue if a state change occurred in the state machine + * EFalse otherwise + */ + virtual void DoPsModeErrorIndication( WlanContextImpl& aCtxImpl ); + + /** * Active to Light PS timer timeout function * * @since S60 v5.1 diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdynamicpowermodemgmtcntx.h --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdynamicpowermodemgmtcntx.h Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdynamicpowermodemgmtcntx.h Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 12 % +* %version: 13 % */ #ifndef WLAN_DYNAMIC_POWER_MODE_MGMT_CNTX @@ -66,11 +66,13 @@ * @since S60 3.1 * @param aQueueId Id of the queue/AC via which the frame will be transmitted * @param aEtherType Ethernet type of the frame + * @param aDot11FrameType 802.11 frame type * @return To which power management mode to change; if any at all */ TPowerMgmtModeChange OnFrameTx( WHA::TQueueId aQueueId, - TUint16 aEtherType ); + TUint16 aEtherType, + T802Dot11FrameControlTypeMask aDot11FrameType ); /** * To be called when accepting an Rx frame @@ -89,6 +91,14 @@ TDaType aDaType ); /** + * To be called upon receiving the PS Mode Error indication + * Determines the need to make a power mode transition + * + * @return To which power management mode to change; if any at all + */ + TPowerMgmtModeChange OnPsModeErrorIndication(); + + /** * To be called upon Active to Light PS timer timeout * * @since S60 v5.1 @@ -194,6 +204,12 @@ */ void FreezeTrafficOverride(); + /** + * Restores the Ative mode parameters back to their WLAN Mgmt Client + * provided values + */ + inline void RestoreActiveModeParameters(); + private: /** @@ -322,7 +338,25 @@ * @return ETrue if Background AC traffic shall be ignored */ inline TBool StayInPsDespiteLegacyBackgroundTraffic() const; - + + /** + * Sets special parameters for the Active mode. + * To be used when switching to Active upen receiving PsModeError + * indication from WHA layer. + * The Wlan Mgmt Client provided Active mode parameters can be restored + * with RestoreActiveModeParameters() + */ + inline void SetPsModeErrorActiveModeParameters(); + + /** + * Sets special parameters for the Active mode. + * To be used when switching to Active upon transmitting our keep alive + * frame or an ARP frame. + * The Wlan Mgmt Client provided Active mode parameters can be restored + * with RestoreActiveModeParameters() + */ + inline void SetKeepAliveActiveModeParameters(); + // Prohibit copy constructor WlanDynamicPowerModeMgmtCntx( const WlanDynamicPowerModeMgmtCntx& ); @@ -331,7 +365,15 @@ ( const WlanDynamicPowerModeMgmtCntx& ); private: // Data - + + /** for backing up the parameters related to Active mode */ + struct SActiveParamsBackup + { + TUint32 iToLightPsTimeout; + TUint16 iToLightPsFrameThreshold; + TUint16 iUapsdRxFrameLengthThreshold; + }; + /** flag value to store state transition need internally */ TBool iStateChange; /** stores the flags defined below */ @@ -383,18 +425,27 @@ /** ToDeepPsTimer started */ static const TUint32 KToDeepPsTimerStarted = ( 1 << 10 ); - // time interval in microseconds after which transition from Active - // mode to Light PS mode is considered. + /** + * time interval in microseconds after which transition from Active + * mode to Light PS mode is considered. + */ TUint32 iToLightPsTimeout; - // time interval in microseconds after which the frame counter - // used when considering transition from Light PS to Active mode is reset. + /** + * time interval in microseconds after which the frame counter + * used when considering transition from Light PS to Active mode is reset. + */ TUint32 iToActiveTimeout; - // time interval in microseconds after which transition from Light PS - // mode to Deep PS mode is considered. + /** + * time interval in microseconds after which transition from Light PS + * mode to Deep PS mode is considered. + */ TUint32 iToDeepPsTimeout; - + + /** for backing up the parameters related to Active mode */ + SActiveParamsBackup iActiveParamsBackup; + /** currently active power management mode context */ WlanPowerModeMgrBase* iActiveCntx; /** context for active mode */ diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdynamicpowermodemgmtcntx.inl --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdynamicpowermodemgmtcntx.inl Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdynamicpowermodemgmtcntx.inl Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,9 +16,21 @@ */ /* -* %version: 5 % +* %version: 6 % */ +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +inline void WlanDynamicPowerModeMgmtCntx::RestoreActiveModeParameters() + { + iToLightPsTimeout = iActiveParamsBackup.iToLightPsTimeout; + iActiveModeCntx.SetParameters( + iActiveParamsBackup.iToLightPsFrameThreshold, + iActiveParamsBackup.iUapsdRxFrameLengthThreshold ); + } + // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- @@ -109,3 +121,37 @@ { return ( iFlags & KStayInPsDespiteLegacyBackgroundTraffic ); } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +inline void WlanDynamicPowerModeMgmtCntx::SetPsModeErrorActiveModeParameters() + { + const TUint32 KToLightPsTimeout( 1000000 ); // 1 second + const TUint16 KToLightPsFrameThreshold( 4 ); + const TUint16 KUapsdRxFrameLengthThreshold( + WlanPowerModeMgrBase::KDefaultUapsdRxFrameLengthThreshold ); + + iToLightPsTimeout = KToLightPsTimeout; + iActiveModeCntx.SetParameters( + KToLightPsFrameThreshold, + KUapsdRxFrameLengthThreshold ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +inline void WlanDynamicPowerModeMgmtCntx::SetKeepAliveActiveModeParameters() + { + const TUint32 KToLightPsTimeout( 20000 ); // 20ms + const TUint16 KToLightPsFrameThreshold( 1 ); + const TUint16 KUapsdRxFrameLengthThreshold( + WlanPowerModeMgrBase::KDefaultUapsdRxFrameLengthThreshold ); + + iToLightPsTimeout = KToLightPsTimeout; + iActiveModeCntx.SetParameters( + KToLightPsFrameThreshold, + KUapsdRxFrameLengthThreshold ); + } diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/umaclightpsmodepowermodemgr.h --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umaclightpsmodepowermodemgr.h Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umaclightpsmodepowermodemgr.h Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 3 % +* %version: 4 % */ #ifndef WLAN_LIGHT_PS_MODE_POWER_MODE_MGR @@ -65,6 +65,7 @@ * @param aCtxImpl global statemachine context * @param aQueueId Id of the queue/AC via which the frame will be transmitted * @param aEtherType Ethernet type of the frame + * @param aDot11FrameType 802.11 frame type * @param aIgnoreThisFrame shall this frame be ignored from dynamic power * mode management perspective * @return To which power management mode to change; if any at all @@ -73,6 +74,7 @@ WlanContextImpl& aCtxImpl, WHA::TQueueId aQueueId, TUint16 aEtherType, + T802Dot11FrameControlTypeMask aDot11FrameType, TBool aIgnoreThisFrame ); /** @@ -98,6 +100,15 @@ /** * From WlanPowerModeMgrBase + * To be called upon receiving the PS Mode Error indication + * Determines the need to make a power mode transition + * + * @return To which power management mode to change; if any at all + */ + virtual TPowerMgmtModeChange OnPsModeErrorIndication(); + + /** + * From WlanPowerModeMgrBase * To be called upon Light PS to Active timer timeout * * @since S60 5.1 diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacnullsendcontroller.h --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacnullsendcontroller.h Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacnullsendcontroller.h Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 14 % +* %version: 15 % */ #ifndef WLAN_NULL_SEND_CONTROLLER @@ -172,6 +172,14 @@ * @since S60 3.2 */ void OnKeepAliveTimerTimeout(); + + /** + * Are we currently in Voice over WLAN Call state + * + * @return ETrue if we are + * EFalse if we are not + */ + inline TBool InVoiceCallState() const; private: diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacnullsendcontroller.inl --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacnullsendcontroller.inl Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacnullsendcontroller.inl Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -17,7 +17,7 @@ */ /* -* %version: 10 % +* %version: 11 % */ // Default Voice Call Entry timeout @@ -38,7 +38,7 @@ // Default Keep Alive timeout // This value is used if no other value has been provided -const TUint32 KDefaultKeepAliveTimeout = 200000000; // 200 s +const TUint32 KDefaultKeepAliveTimeout = 60000000; // 60 s // Default value for frame payload length threashold of a potential // carrier of downlink Voice over WLAN Call data, which is erroneously @@ -221,3 +221,12 @@ // during a Voice Call } } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +inline TBool WlanNullSendController::InVoiceCallState() const + { + return static_cast(iFlags & KInVoiceCallState); + } diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacpowermodemgrbase.h --- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacpowermodemgrbase.h Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacpowermodemgrbase.h Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 12 % +* %version: 13 % */ #ifndef WLAN_POWER_MODE_MGR_BASE_H @@ -32,6 +32,7 @@ class WlanContextImpl; + /** * Common base class for classes implementing dynamic power mode transition * algorithm between PS and active mode in infrastructure mode @@ -39,6 +40,10 @@ class WlanPowerModeMgrBase { public: + // Default frame payload length threshold value (in bytes) for U-APSD + static const TUint32 KDefaultUapsdRxFrameLengthThreshold = 400; + +public: /** Dtor */ virtual ~WlanPowerModeMgrBase(); @@ -51,6 +56,7 @@ * @param aCtxImpl global statemachine context * @param aQueueId Id of the queue/AC via which the frame will be transmitted * @param aEtherType Ethernet type of the frame + * @param aDot11FrameType 802.11 frame type * @param aIgnoreThisFrame shall this frame be ignored from dynamic power * mode management perspective * @return To which power management mode to change; if any at all @@ -59,6 +65,7 @@ WlanContextImpl& aCtxImpl, WHA::TQueueId aQueueId, TUint16 aEtherType, + T802Dot11FrameControlTypeMask aDot11FrameType, TBool aIgnoreThisFrame ) = 0; /** @@ -83,6 +90,14 @@ TDaType aDaType ) = 0; /** + * To be called upon receiving the PS Mode Error indication + * Determines the need to make a power mode transition + * + * @return To which power management mode to change; if any at all + */ + virtual TPowerMgmtModeChange OnPsModeErrorIndication(); + + /** * To be called upon Active to Light PS timer timeout * * @since S60 v5.1 diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacContextImpl.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacContextImpl.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacContextImpl.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -16,7 +16,7 @@ */ /* -* %version: 72 % +* %version: 73 % */ #include "config.h" @@ -104,10 +104,7 @@ os_memset( &iWHASettings, 0, sizeof( iWHASettings ) ); - os_memset( - &iOurBssMembershipFeatureArray, - KUnallocated, - sizeof( iOurBssMembershipFeatureArray ) ); + ClearBssMembershipFeatureList(); os_memset( &iHtBlockAckConfigure, @@ -1770,6 +1767,34 @@ // // ----------------------------------------------------------------------------- // +void WlanContextImpl::RemoveBssMembershipFeature( TUint8 aItem ) + { + TUint8 i ( 0 ); + + do + { + if ( aItem == iOurBssMembershipFeatureArray[i] ) + { + iOurBssMembershipFeatureArray[i] = KUnallocated; + + OsTracePrint( KUmacDetails, (TUint8*) + ("UMAC: WlanContextImpl::RemoveBssMembershipFeature: " + "feature %d removed"), + aItem ); + + break; + } + else + { + ++i; + } + } while ( i != KMaxNumOfWlanFeatures ); + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// TBool WlanContextImpl::BssMembershipFeatureSupported( TUint8 aItem ) const { TBool supported ( EFalse ); diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -16,7 +16,7 @@ */ /* -* %version: 97 % +* %version: 99 % */ #include "config.h" @@ -1995,7 +1995,7 @@ const TPowerMgmtModeChange KPowerMgmtModeChange ( aCtxImpl.OnFrameTx( queue_id, etherType ) ); - // if any change change is needed regarding our power mgmt mode, + // if any change is needed regarding our power mgmt mode, // proceed with it stateChange = PowerMgmtModeChange( aCtxImpl, KPowerMgmtModeChange ); } @@ -2156,177 +2156,6 @@ // // --------------------------------------------------------------------------- // -TBool WlanDot11Associated::AddMulticastAddr( - WlanContextImpl& aCtxImpl, - const TMacAddress& aMacAddr ) - { - TBool stateTransitionOccurred( EFalse ); - - OsTracePrint( - KWlmCmdDetails, - (TUint8*) - ("UMAC: WlanDot11Associated::AddMulticastAddr(): addr to be added:"), - aMacAddr); - - if ( aCtxImpl.MulticastFilteringDisAllowed() ) - { - OsTracePrint( - KWlmCmdDetails, - (TUint8*) - ("UMAC: WlanDot11Associated::AddMulticastAddr(): Multicast filtering disallowed")); - - OnOidComplete( aCtxImpl, KErrGeneral ); - } - else - { - if ( aCtxImpl.WHASettings().iNumOfGroupTableEntrys > - aCtxImpl.MulticastAddressCount() ) - { - // wha layer is able to take in an address - - // 1st try to add the address to our own internal bookkeeping - WlanContextImpl::TGroupAddStatus addStatus = - aCtxImpl.AddMulticastAddress( aMacAddr ); - - switch ( addStatus ) - { - case WlanContextImpl::EOk: - OsTracePrint( - KWlmCmdDetails, - (TUint8*) - ("UMAC: WlanDot11Associated::AddMulticastAddr(): Address will be added to the MIB")); - // the address needed to be added and adding went ok. - // Now update the group addresses MIB - stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl ); - break; - case WlanContextImpl::EAlreadyExists: - OsTracePrint( - KWlmCmdDetails, - (TUint8*) - ("UMAC: WlanDot11Associated::AddMulticastAddr(): Address already exists")); - // the specified address already exists so there's no need - // to update the group addresses MIB - // just complete the request with OK status - OnOidComplete( aCtxImpl ); - stateTransitionOccurred = EFalse; - break; - case WlanContextImpl::EFull: - OsTracePrint( - KWlmCmdDetails, - (TUint8*) - ("UMAC: WlanDot11Associated::AddMulticastAddr(): Internal address table full; disallow multicast filtering")); - // we are not able to take in any more addresses. - // We will totally disable the multicast filtering - // and we won't allow it to be enabled any more during - // the current nw connection - // - aCtxImpl.ResetMulticastAddresses(); - aCtxImpl.MulticastFilteringDisAllowed( ETrue ); - stateTransitionOccurred = - SetGroupAddressesTableMib( aCtxImpl ); - break; - default: - // programming error - OsTracePrint( KErrorLevel, (TUint8*) - ("UMAC: addStatus: %d"), addStatus ); - OsAssert( (TUint8*)("UMAC: panic"), - (TUint8*)(WLAN_FILE), __LINE__ ); - } - } - else - { - OsTracePrint( - KWlmCmdDetails, - (TUint8*) - ("UMAC: WlanDot11Associated::AddMulticastAddr(): WHA not able to accept address; disallow multicast filtering")); - // wha layer is not able to take in an address. Either this is one - // address too many, or it doesn't support even a single address. - // In either case we will totally disable the multicast filtering - // and we won't allow it to be enabled any more during the current - // nw connection - aCtxImpl.ResetMulticastAddresses(); - aCtxImpl.MulticastFilteringDisAllowed( ETrue ); - stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl ); - } - } - - // signal caller whether a state transition occurred or not - return stateTransitionOccurred; - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -TBool WlanDot11Associated::RemoveMulticastAddr( - WlanContextImpl& aCtxImpl, - TBool aRemoveAll, - const TMacAddress& aMacAddr ) - { - TBool stateTransitionOccurred( EFalse ); - - OsTracePrint( - KWlmCmdDetails, - (TUint8*) - ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): addr to be removed:"), - aMacAddr); - - if ( aCtxImpl.MulticastFilteringDisAllowed() ) - { - OsTracePrint( - KWlmCmdDetails, - (TUint8*) - ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): Multicast filtering disallowed")); - // filtering is not allowed currently so there can't be any addresses - // to remove. Just complete the request with OK status - OnOidComplete( aCtxImpl ); - } - else - { - if ( aRemoveAll ) - { - OsTracePrint( - KWlmCmdDetails, - (TUint8*) - ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): remove all")); - // remove all addresses; naturally will also disable filtering - aCtxImpl.ResetMulticastAddresses(); - stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl ); - } - else - { - // 1st remove the specified address from our own internal - // bookkeeping, if it exists - if ( aCtxImpl.RemoveMulticastAddress( aMacAddr ) ) - { - OsTracePrint( - KWlmCmdDetails, - (TUint8*) - ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): removing the specified address")); - // it existed, so update the group addresses MIB, too - stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl ); - } - else - { - OsTracePrint( - KWlmCmdDetails, - (TUint8*) - ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): specified address doesn't exist, nothing to do")); - // it did't exist, so there's nothing to remove - // Just complete the request with OK status - OnOidComplete( aCtxImpl ); - } - } - } - - // signal caller whether a state transition occurred or not - return stateTransitionOccurred; - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// TBool WlanDot11Associated::AddBroadcastWepKey( WlanContextImpl& aCtxImpl, TUint32 aKeyIndex, @@ -2394,89 +2223,6 @@ // // --------------------------------------------------------------------------- // -TBool WlanDot11Associated::SetGroupAddressesTableMib( - WlanContextImpl& aCtxImpl ) - { - const TMacAddress* multicastAddresses( NULL ); - const TUint32 nbrOfAddrs( - aCtxImpl.GetMulticastAddresses( multicastAddresses ) ); - - TUint32 mibLength( - // mib header length - WHA::Sdot11GroupAddressesTable::KHeaderSize - // + mib data length - + ( sizeof( TMacAddress ) * nbrOfAddrs ) ); - - // align length of MIB to 4-byte boundary - mibLength = Align4( mibLength ); - - OsTracePrint( - KWlmCmdDetails, - (TUint8*) - ("UMAC: WlanDot11Associated::SetGroupAddressesTableMib(): mibLength: %d"), - mibLength ); - - // allocate memory for the mib to write - WHA::Sdot11GroupAddressesTable* mib - = static_cast - (os_alloc( mibLength )); - - if ( !mib ) - { - // allocation failed - // simulate macnotresponding error - OsTracePrint( KWarningLevel, (TUint8*) - ("UMAC: WlanDot11Associated::SetGroupAddressesTableMib(): memory allocating failed") ); - return DoErrorIndication( aCtxImpl, WHA::KErrorMacNotResponding ); - } - - if ( nbrOfAddrs ) - { - // at least one address exists, so enable multicast address filtering - mib->iEnable = ETrue; - } - else - { - // no addresses, so disable filtering - mib->iEnable = EFalse; - OsTracePrint( KWlmCmdDetails, (TUint8*) - ("UMAC: WlanDot11Associated::SetGroupAddressesTableMib(): no addresses; disable filtering") ); - } - - mib->iNumOfAddrs = nbrOfAddrs; - - // copy the multicast addresses after the mib header - os_memcpy( mib->iAddrData, - reinterpret_cast(const_cast( - multicastAddresses)), - ( sizeof( TMacAddress ) * nbrOfAddrs ) ); - - WlanWsaWriteMib& wha_cmd = aCtxImpl.WsaWriteMib(); - - wha_cmd.Set( - aCtxImpl, - WHA::KMibDot11GroupAddressesTable, - mibLength, - mib ); - - // change global state: entry procedure triggers action - ChangeState( aCtxImpl, - *this, // prev state - wha_cmd, // next state - // the ACT - KCompleteManagementRequest - ); - - os_free( mib ); // release the allocated memory - - // signal caller that a state transition occurred - return ETrue; - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// TBool WlanDot11Associated::PowerMgmtModeChange( WlanContextImpl& aCtxImpl, TPowerMgmtModeChange aPowerMgmtModeChange ) @@ -2489,7 +2235,7 @@ if ( aPowerMgmtModeChange == EToActive ) { - aCtxImpl.DesiredDot11PwrMgmtMode( WHA::KPsDisable ); + aCtxImpl.DesiredDot11PwrMgmtMode( WHA::KPsDisable ); } else if ( aPowerMgmtModeChange == EToLightPs ) { diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11InfrastructureMode.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11InfrastructureMode.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11InfrastructureMode.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 63 % +* %version: 64 % */ #include "config.h" @@ -788,19 +788,6 @@ // // --------------------------------------------------------------------------- // -void WlanDot11InfrastructureMode::DoPsModeErrorIndication( - WlanContextImpl& aCtxImpl ) - { - OsTracePrint( KWlmIndication, (TUint8*) - ("UMAC: WlanDot11InfrastructureMode::DoPsModeErrorIndication") ); - - OnInDicationEvent( aCtxImpl, EPsModeError ); - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// TBool WlanDot11InfrastructureMode::OnVoiceCallEntryTimerTimeout( WlanContextImpl& aCtxImpl ) { @@ -925,6 +912,7 @@ TUint32 lengthOfFrame( 0 ); T802Dot11FrameControlTypeMask frameType( E802Dot11FrameTypeDataNull ); + WHA::TQueueId queue_id( WHA::ELegacy ); // copy Null Data frame to tx-buffer to correct offset // client doesn't need to take care of the tx buffer header space @@ -972,7 +960,7 @@ } // determine Tx queue - const WHA::TQueueId queue_id( QueueId( aCtxImpl, start_of_frame ) ); + queue_id = QueueId( aCtxImpl, start_of_frame ); // send the Null Data frame by pushing it to packet scheduler aCtxImpl.PushPacketToPacketScheduler( @@ -982,13 +970,24 @@ frameType, NULL, EFalse, - EFalse ); + EFalse, + ETrue ); } else { // we didn't get a Tx buffer so we can't submit a frame send request. status = EFalse; } - + + TUint16 KetherType( 0 ); // N/A in this case + // check if we need to change power mgmt mode; no matter whether we + // actually managed to send a frame or not + const TPowerMgmtModeChange KPowerMgmtModeChange ( + aCtxImpl.OnFrameTx( queue_id, KetherType, frameType ) ); + + // if any change is needed regarding our power mgmt mode, + // proceed with it + PowerMgmtModeChange( aCtxImpl, KPowerMgmtModeChange ); + return status; } diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11SoftReset.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11SoftReset.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11SoftReset.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 28 % +* %version: 29 % */ #include "config.h" @@ -137,6 +137,7 @@ // we are breaking an existing join so we have to reset some // state variables and settings aCtxImpl.CurrentDot11PwrMgmtMode( WHA::KPsDisable ); + aCtxImpl.RestorePwrModeMgmtParameters(); aCtxImpl.Reassociate( EFalse ); aCtxImpl.QosEnabled( EFalse ); aCtxImpl.UapsdEnabled( EFalse ); diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -16,7 +16,7 @@ */ /* -* %version: 87 % +* %version: 89 % */ #include "config.h" @@ -3057,6 +3057,185 @@ return ret; } +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +TBool WlanDot11State::AddMulticastAddr( + WlanContextImpl& aCtxImpl, + const TMacAddress& aMacAddr ) + { + TBool stateTransitionOccurred( EFalse ); + + OsTracePrint( + KWlmCmdDetails, + (TUint8*) + ("UMAC: WlanDot11State::AddMulticastAddr(): addr to be added:"), + aMacAddr); + + if ( aCtxImpl.MulticastFilteringDisAllowed() ) + { + OsTracePrint( + KWlmCmdDetails, + (TUint8*) + ("UMAC: WlanDot11State::AddMulticastAddr(): Multicast filtering " + "disallowed")); + + OnOidComplete( aCtxImpl, KErrGeneral ); + } + else + { + if ( aCtxImpl.WHASettings().iNumOfGroupTableEntrys > + aCtxImpl.MulticastAddressCount() ) + { + // wha layer is able to take in an address + + // 1st try to add the address to our own internal bookkeeping + WlanContextImpl::TGroupAddStatus addStatus = + aCtxImpl.AddMulticastAddress( aMacAddr ); + + switch ( addStatus ) + { + case WlanContextImpl::EOk: + OsTracePrint( + KWlmCmdDetails, + (TUint8*) + ("UMAC: WlanDot11State::AddMulticastAddr(): Address " + "will be added to the MIB")); + // the address needed to be added and adding went ok. + // Now update the group addresses MIB + stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl ); + break; + case WlanContextImpl::EAlreadyExists: + OsTracePrint( + KWlmCmdDetails, + (TUint8*) + ("UMAC: WlanDot11State::AddMulticastAddr(): Address " + "already exists")); + // the specified address already exists so there's no need + // to update the group addresses MIB + // just complete the request with OK status + OnOidComplete( aCtxImpl ); + stateTransitionOccurred = EFalse; + break; + case WlanContextImpl::EFull: + OsTracePrint( + KWlmCmdDetails, + (TUint8*) + ("UMAC: WlanDot11State::AddMulticastAddr(): Internal " + "address table full; disallow multicast filtering")); + // we are not able to take in any more addresses. + // We will totally disable the multicast filtering + // and we won't allow it to be enabled any more during + // the current nw connection + // + aCtxImpl.ResetMulticastAddresses(); + aCtxImpl.MulticastFilteringDisAllowed( ETrue ); + stateTransitionOccurred = + SetGroupAddressesTableMib( aCtxImpl ); + break; + default: + // programming error + OsTracePrint( KErrorLevel, (TUint8*) + ("UMAC: addStatus: %d"), addStatus ); + OsAssert( (TUint8*)("UMAC: panic"), + (TUint8*)(WLAN_FILE), __LINE__ ); + } + } + else + { + OsTracePrint( + KWlmCmdDetails, + (TUint8*) + ("UMAC: WlanDot11State::AddMulticastAddr(): WHA not able to " + "accept address; disallow multicast filtering")); + // wha layer is not able to take in an address. Either this is one + // address too many, or it doesn't support even a single address. + // In either case we will totally disable the multicast filtering + // and we won't allow it to be enabled any more during the current + // nw connection + aCtxImpl.ResetMulticastAddresses(); + aCtxImpl.MulticastFilteringDisAllowed( ETrue ); + stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl ); + } + } + + // signal caller whether a state transition occurred or not + return stateTransitionOccurred; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +TBool WlanDot11State::RemoveMulticastAddr( + WlanContextImpl& aCtxImpl, + TBool aRemoveAll, + const TMacAddress& aMacAddr ) + { + TBool stateTransitionOccurred( EFalse ); + + OsTracePrint( + KWlmCmdDetails, + (TUint8*) + ("UMAC: WlanDot11State::RemoveMulticastAddr(): addr to be removed:"), + aMacAddr); + + if ( aCtxImpl.MulticastFilteringDisAllowed() ) + { + OsTracePrint( + KWlmCmdDetails, + (TUint8*) + ("UMAC: WlanDot11State::RemoveMulticastAddr(): Multicast filtering " + "disallowed")); + // filtering is not allowed currently so there can't be any addresses + // to remove. Just complete the request with OK status + OnOidComplete( aCtxImpl ); + } + else + { + if ( aRemoveAll ) + { + OsTracePrint( + KWlmCmdDetails, + (TUint8*) + ("UMAC: WlanDot11State::RemoveMulticastAddr(): remove all")); + // remove all addresses; naturally will also disable filtering + aCtxImpl.ResetMulticastAddresses(); + stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl ); + } + else + { + // 1st remove the specified address from our own internal + // bookkeeping, if it exists + if ( aCtxImpl.RemoveMulticastAddress( aMacAddr ) ) + { + OsTracePrint( + KWlmCmdDetails, + (TUint8*) + ("UMAC: WlanDot11State::RemoveMulticastAddr(): removing " + "the specified address")); + // it existed, so update the group addresses MIB, too + stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl ); + } + else + { + OsTracePrint( + KWlmCmdDetails, + (TUint8*) + ("UMAC: WlanDot11State::RemoveMulticastAddr(): specified " + "address doesn't exist, nothing to do")); + // it did't exist, so there's nothing to remove + // Just complete the request with OK status + OnOidComplete( aCtxImpl ); + } + } + } + + // signal caller whether a state transition occurred or not + return stateTransitionOccurred; + } + // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- @@ -3069,6 +3248,16 @@ OsTracePrint( KUmacDetails, (TUint8*)("UMAC: WlanDot11State::InitNetworkConnect") ); + // 1st clear our BSS Membership feature list + aCtxImpl.ClearBssMembershipFeatureList(); + + if ( aCtxImpl.WHASettings().iCapability & WHA::SSettings::KHtOperation ) + { + // wlanpdd indicates HT support. Record that in our BSS Membership + // features + aCtxImpl.AddBssMembershipFeature( E802Dot11HtPhy ); + } + const SScanResponseFixedFields* scanResponseFixedFields = reinterpret_cast( aScanResponseFrameBody ); @@ -3120,9 +3309,6 @@ return EFalse; } - // network capabilities are met -> proceed - - // initialize element locator for locating IEs from the scan response // frame body WlanElementLocator elementLocator( @@ -3132,69 +3318,7 @@ TUint8 elementDatalength( 0 ); const TUint8* elementData( NULL ); - - //============================================= - // do we meet mandatory network rates - //============================================= - - // locate supported rates IE - if ( elementLocator.InformationElement( - E802Dot11SupportedRatesIE, - elementDatalength, - &elementData ) == WlanElementLocator::EWlanLocateOk ) - { - // ...and store it to our context - aCtxImpl.GetApSupportedRatesIE().SetIeData( - elementData, - elementDatalength ); - } - else - { - OsTracePrint( KWarningLevel, (TUint8*) - ("UMAC: WlanDot11State::InitNetworkConnect: supported rates IE not found -> abort") ); - - return EFalse; - } - - // locate extended supported rates information element - if ( elementLocator.InformationElement( - E802Dot11ExtendedRatesIE, - elementDatalength, - &elementData ) == WlanElementLocator::EWlanLocateOk ) - { - OsTracePrint( KInfoLevel, (TUint8*) - ("UMAC: WlanDot11State::InitNetworkConnect: E802Dot11ExtendedRatesIE present") ); - - // ...and store it to our context - aCtxImpl.GetApExtendedSupportedRatesIE().SetIeData( elementData, elementDatalength ); - - // check if we meet mandatory rates; in this case check also extended supported rates - if ( !AreSupportedRatesMet( aCtxImpl, ETrue ) ) - { - OsTracePrint( KWarningLevel, (TUint8*) - ("UMAC: WlanDot11State::InitNetworkConnect: rates not met -> abort") ); - - return EFalse; - } - } - else - { - OsTracePrint( KInfoLevel, (TUint8*) - ("UMAC: WlanDot11State::InitNetworkConnect: E802Dot11ExtendedRatesIE not present") ); - - // check if we meet mandatory rates; in this case extended supported rates - // don't need to be checked - if ( !AreSupportedRatesMet( aCtxImpl, EFalse ) ) - { - OsTracePrint( KWarningLevel, - (TUint8*)("UMAC: WlanDot11State::InitNetworkConnect: rates not met -> abort") ); - - return EFalse; - } - } - - // mandatory network rates are met -> proceed - + //============================================= // determine the channel of the network //============================================= @@ -3393,6 +3517,66 @@ } //============================================= + // do we meet mandatory network rates + //============================================= + + // locate supported rates IE + if ( elementLocator.InformationElement( + E802Dot11SupportedRatesIE, + elementDatalength, + &elementData ) == WlanElementLocator::EWlanLocateOk ) + { + // ...and store it to our context + aCtxImpl.GetApSupportedRatesIE().SetIeData( + elementData, + elementDatalength ); + } + else + { + OsTracePrint( KWarningLevel, (TUint8*) + ("UMAC: WlanDot11State::InitNetworkConnect: supported rates IE not found -> abort") ); + + return EFalse; + } + + // locate extended supported rates information element + if ( elementLocator.InformationElement( + E802Dot11ExtendedRatesIE, + elementDatalength, + &elementData ) == WlanElementLocator::EWlanLocateOk ) + { + OsTracePrint( KInfoLevel, (TUint8*) + ("UMAC: WlanDot11State::InitNetworkConnect: E802Dot11ExtendedRatesIE present") ); + + // ...and store it to our context + aCtxImpl.GetApExtendedSupportedRatesIE().SetIeData( elementData, elementDatalength ); + + // check if we meet mandatory rates; in this case check also extended supported rates + if ( !AreSupportedRatesMet( aCtxImpl, ETrue ) ) + { + OsTracePrint( KWarningLevel, (TUint8*) + ("UMAC: WlanDot11State::InitNetworkConnect: rates not met -> abort") ); + + return EFalse; + } + } + else + { + OsTracePrint( KInfoLevel, (TUint8*) + ("UMAC: WlanDot11State::InitNetworkConnect: E802Dot11ExtendedRatesIE not present") ); + + // check if we meet mandatory rates; in this case extended supported rates + // don't need to be checked + if ( !AreSupportedRatesMet( aCtxImpl, EFalse ) ) + { + OsTracePrint( KWarningLevel, + (TUint8*)("UMAC: WlanDot11State::InitNetworkConnect: rates not met -> abort") ); + + return EFalse; + } + } + + //============================================= // determine U-APSD usage for the ACs/Tx queues //============================================= DetermineAcUapsdUsage( aCtxImpl ); @@ -4090,6 +4274,91 @@ return EFalse; } +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +TBool WlanDot11State::SetGroupAddressesTableMib( + WlanContextImpl& aCtxImpl ) + { + const TMacAddress* multicastAddresses( NULL ); + const TUint32 nbrOfAddrs( + aCtxImpl.GetMulticastAddresses( multicastAddresses ) ); + + TUint32 mibLength( + // mib header length + WHA::Sdot11GroupAddressesTable::KHeaderSize + // + mib data length + + ( sizeof( TMacAddress ) * nbrOfAddrs ) ); + + // align length of MIB to 4-byte boundary + mibLength = Align4( mibLength ); + + OsTracePrint( + KWlmCmdDetails, + (TUint8*) + ("UMAC: WlanDot11State::SetGroupAddressesTableMib(): mibLength: %d"), + mibLength ); + + // allocate memory for the mib to write + WHA::Sdot11GroupAddressesTable* mib + = static_cast + (os_alloc( mibLength )); + + if ( !mib ) + { + // allocation failed + // simulate macnotresponding error + OsTracePrint( KWarningLevel, (TUint8*) + ("UMAC: WlanDot11State::SetGroupAddressesTableMib(): memory " + "allocation failed") ); + return DoErrorIndication( aCtxImpl, WHA::KErrorMacNotResponding ); + } + + if ( nbrOfAddrs ) + { + // at least one address exists, so enable multicast address filtering + mib->iEnable = ETrue; + } + else + { + // no addresses, so disable filtering + mib->iEnable = EFalse; + OsTracePrint( KWlmCmdDetails, (TUint8*) + ("UMAC: WlanDot11State::SetGroupAddressesTableMib(): no addresses; " + "disable filtering") ); + } + + mib->iNumOfAddrs = nbrOfAddrs; + + // copy the multicast addresses after the mib header + os_memcpy( mib->iAddrData, + reinterpret_cast(const_cast( + multicastAddresses)), + ( sizeof( TMacAddress ) * nbrOfAddrs ) ); + + WlanWsaWriteMib& wha_cmd = aCtxImpl.WsaWriteMib(); + + wha_cmd.Set( + aCtxImpl, + WHA::KMibDot11GroupAddressesTable, + mibLength, + mib ); + + // change global state: entry procedure triggers action + ChangeState( aCtxImpl, + *this, // prev state + wha_cmd, // next state + // the ACT + KCompleteManagementRequest + ); + + os_free( mib ); // release the allocated memory + + // signal caller that a state transition occurred + return ETrue; + } + // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- @@ -4733,6 +5002,9 @@ // nw supported it. We achieve that by handling the target nw as // a non-HT nw aCtxImpl.HtSupportedByNw( EFalse ); + // in this case we need to remove HT also from our BSS membership + // feature list + aCtxImpl.RemoveBssMembershipFeature( E802Dot11HtPhy ); OsTracePrint( KInfoLevel, (TUint8*) ("UMAC: WlanDot11State::HandleDot11n: TKIP as pairwise cipher " diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Synchronize.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Synchronize.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Synchronize.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -16,7 +16,7 @@ */ /* -* %version: 29 % +* %version: 30 % */ #include "config.h" @@ -497,6 +497,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 diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacMacState.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacMacState.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacMacState.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 76 % +* %version: 77 % */ #include "config.h" @@ -97,13 +97,15 @@ // ----------------------------------------------------------------------------- // TBool WlanMacState::SetRcpiTriggerLevel( - WlanContextImpl& /*aCtxImpl*/, + WlanContextImpl& aCtxImpl, TUint32 /*aRcpiTrigger*/ ) { // not supported in default handler +#ifndef NDEBUG OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ ); - - return EFalse; +#endif + OnOidComplete( aCtxImpl, KErrNotSupported ); + return EFalse; // no state change } // ----------------------------------------------------------------------------- @@ -111,7 +113,7 @@ // ----------------------------------------------------------------------------- // TBool WlanMacState::AddBroadcastWepKey( - WlanContextImpl& /*aCtxImpl*/, + WlanContextImpl& aCtxImpl, TUint32 /*aKeyIndex*/, TBool /*aUseAsDefaulKey*/, TUint32 /*aKeyLength*/, @@ -119,8 +121,11 @@ const TMacAddress& /*aMac*/ ) { // not supported in default handler +#ifndef NDEBUG OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ ); - return EFalse; +#endif + OnOidComplete( aCtxImpl, KErrNotSupported ); + return EFalse; // no state change } // ----------------------------------------------------------------------------- @@ -197,7 +202,7 @@ // --------------------------------------------------------------------------- // TBool WlanMacState::Connect( - WlanContextImpl& /*aCtxImpl*/, + WlanContextImpl& aCtxImpl, const TSSID& /*aSSID*/, const TMacAddress& /*aBSSID*/, TUint16 /*aAuthAlgorithmNbr*/, @@ -209,19 +214,25 @@ TUint16 /*aIeDataLength*/ ) { // not supported in default handler +#ifndef NDEBUG OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ ); - return EFalse; +#endif + OnOidComplete( aCtxImpl, KErrNotSupported ); + return EFalse; // no state change } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // -TBool WlanMacState::Disconnect( WlanContextImpl& /*aCtxImpl*/ ) +TBool WlanMacState::Disconnect( WlanContextImpl& aCtxImpl ) { // not supported in default handler +#ifndef NDEBUG OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ ); - return EFalse; +#endif + OnOidComplete( aCtxImpl, KErrNotSupported ); + return EFalse; // no state change } // ----------------------------------------------------------------------------- @@ -321,7 +332,7 @@ // ----------------------------------------------------------------------------- // TBool WlanMacState::StartIBSS( - WlanContextImpl& /*aCtxImpl*/, + WlanContextImpl& aCtxImpl, const TSSID& /*aSSID*/, TUint32 /*aBeaconInterval*/, TUint32 /*aAtim*/, @@ -329,8 +340,11 @@ TEncryptionStatus /*aEncryptionStatus*/ ) { // not supported in default handler +#ifndef NDEBUG OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ ); - return EFalse; +#endif + OnOidComplete( aCtxImpl, KErrNotSupported ); + return EFalse; // no state change } // ----------------------------------------------------------------------------- @@ -366,8 +380,7 @@ TUint32 /*aMaxChannelTime*/, TBool /*aSplitScan*/ ) { - OnOidComplete( aCtxImpl, KErrGeneral ); - + OnOidComplete( aCtxImpl, KErrNotSupported ); return EFalse; // no state change } @@ -400,7 +413,7 @@ // ----------------------------------------------------------------------------- // TBool WlanMacState::Configure( - WlanContextImpl& /*aCtxImpl*/, + WlanContextImpl& aCtxImpl, TUint32 /*aRTSThreshold*/, TUint32 /*aMaxTxMSDULifetime*/, TUint32 /*aVoiceCallEntryTimeout*/, @@ -413,8 +426,11 @@ TUint32 /*aSpMinIndicationInterval*/ ) { // not supported in default handler +#ifndef NDEBUG OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ ); - return EFalse; +#endif + OnOidComplete( aCtxImpl, KErrNotSupported ); + return EFalse; // no state change } // ----------------------------------------------------------------------------- @@ -580,14 +596,17 @@ // ----------------------------------------------------------------------------- // TBool WlanMacState::ConfigureTxQueueIfNecessary( - WlanContextImpl& /*aCtxImpl*/, - TQueueId /*aQueueId*/, - TUint16 /*aMediumTime*/, - TUint32 /*aMaxTxMSDULifetime*/ ) + WlanContextImpl& aCtxImpl, + TQueueId /*aQueueId*/, + TUint16 /*aMediumTime*/, + TUint32 /*aMaxTxMSDULifetime*/ ) { // not supported in default handler +#ifndef NDEBUG OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ ); - return EFalse; +#endif + OnOidComplete( aCtxImpl, KErrNotSupported ); + return EFalse; // no state change } // ----------------------------------------------------------------------------- diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacWsaConfigure.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacWsaConfigure.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacWsaConfigure.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 23 % +* %version: 24 % */ #include "config.h" @@ -171,14 +171,7 @@ ("UMAC: WlanWsaConfigure::Entry: iMcsFeedback: %d"), aCtxImpl.WHASettings().iHtCapabilities.iMcsFeedback ); } -#endif - - if ( aCtxImpl.WHASettings().iCapability & WHA::SSettings::KHtOperation ) - { - // wlanpdd indicates HT support. Record that in our BSS Membership - // features - aCtxImpl.AddBssMembershipFeature( E802Dot11HtPhy ); - } +#endif } // ----------------------------------------------------------------------------- diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/umacactivemodepowermodemgr.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacactivemodepowermodemgr.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacactivemodepowermodemgr.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 13 % +* %version: 14 % */ #include "config.h" @@ -24,11 +24,6 @@ #include "UmacContextImpl.h" -// Default Rx/Tx frame count threshold for considering change to Light PS mode. -// This value is used if another value hasn't been provided -const TUint KDefaultToLightPsFrameThreshold = 1; - - // ================= MEMBER FUNCTIONS ======================= // --------------------------------------------------------------------------- @@ -57,6 +52,7 @@ WlanContextImpl& /*aCtxImpl*/, WHA::TQueueId /*aQueueId*/, TUint16 aEtherType, + T802Dot11FrameControlTypeMask aDot11FrameType, TBool aIgnoreThisFrame ) { if ( aEtherType == KEapolType || @@ -69,7 +65,7 @@ } else { - if ( aIgnoreThisFrame ) + if ( aIgnoreThisFrame || aDot11FrameType == E802Dot11FrameTypeDataNull ) { // for these frames we don't increment the Tx counter diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdeeppsmodepowermodemgr.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdeeppsmodepowermodemgr.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdeeppsmodepowermodemgr.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 3 % +* %version: 4 % */ #include "config.h" @@ -42,32 +42,53 @@ { } +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +void WlanDeepPsModePowerModeMgr::SetParameters( + TUint16 aUapsdRxFrameLengthThreshold ) + { + iUapsdRxFrameLengthThreshold = aUapsdRxFrameLengthThreshold; + } + // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // TPowerMgmtModeChange WlanDeepPsModePowerModeMgr::OnFrameTx( - WlanContextImpl& /*aCtxImpl*/, + WlanContextImpl& aCtxImpl, WHA::TQueueId /*aQueueId*/, TUint16 aEtherType, - TBool /*aIgnoreThisFrame*/ ) + T802Dot11FrameControlTypeMask aDot11FrameType, + TBool aIgnoreThisFrame ) { TPowerMgmtModeChange powerMgmtModeChange( ENoChange ); if ( aEtherType == KEapolType || - aEtherType == KWaiType ) + aEtherType == KWaiType || + aDot11FrameType == E802Dot11FrameTypeDataNull || + ( aEtherType == KArpType && + !(aCtxImpl.UapsdUsedForVoice() && aCtxImpl.InVoiceCallState()) ) ) { powerMgmtModeChange = EToActive; OsTracePrint( KPwrStateTransition, (TUint8*) - ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameTx: EAPOL or WAI frame; change to Active") ); + ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameTx: EAPOL, WAI or keep " + "alive frame or ARP in non- U-APSD WoWLAN call state; change to " + "Active") ); } - else + else if ( !aIgnoreThisFrame ) { powerMgmtModeChange = EToLightPs; OsTracePrint( KPwrStateTransition, (TUint8*) - ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameTx: change to Light PS") ); + ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameTx: change to Light" + " PS") ); + } + else + { + // no action needed } return powerMgmtModeChange; @@ -78,11 +99,11 @@ // --------------------------------------------------------------------------- // TPowerMgmtModeChange WlanDeepPsModePowerModeMgr::OnFrameRx( - WlanContextImpl& /*aCtxImpl*/, - WHA::TQueueId /*aAccessCategory*/, + WlanContextImpl& aCtxImpl, + WHA::TQueueId aAccessCategory, TUint16 aEtherType, - TBool /*aIgnoreThisFrame*/, - TUint /*aPayloadLength*/, + TBool aIgnoreThisFrame, + TUint aPayloadLength, TDaType aDaType ) { TPowerMgmtModeChange powerMgmtModeChange( ENoChange ); @@ -93,22 +114,36 @@ powerMgmtModeChange = EToActive; OsTracePrint( KPwrStateTransition, (TUint8*) - ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameRx: EAPOL or WAI frame; change to Active") ); - } - else if ( aDaType == EBroadcastAddress ) - { - // no action needed - - OsTracePrint( KPwrStateTransition, (TUint8*) - ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameRx: bcast frame; no state change") ); + ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameRx: EAPOL or WAI frame;" + " change to Active") ); } else { - powerMgmtModeChange = EToLightPs; + if ( CountThisFrame( + aCtxImpl, + aAccessCategory, + aEtherType, + aIgnoreThisFrame, + aPayloadLength, + iUapsdRxFrameLengthThreshold, + aDaType ) ) + { + powerMgmtModeChange = EToLightPs; - OsTracePrint( KPwrStateTransition, (TUint8*) - ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameRx: change to Light PS") ); + OsTracePrint( KPwrStateTransition, (TUint8*) + ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameRx: change to Light" + " PS") ); + } } - return powerMgmtModeChange; + return powerMgmtModeChange; } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +TPowerMgmtModeChange WlanDeepPsModePowerModeMgr::OnPsModeErrorIndication() + { + return EToActive; + } diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdot11infrastructurenormalmode.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdot11infrastructurenormalmode.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdot11infrastructurenormalmode.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -17,7 +17,7 @@ */ /* -* %version: 14 % +* %version: 15 % */ #include "config.h" @@ -56,6 +56,28 @@ // // --------------------------------------------------------------------------- // +void WlanDot11InfrastructureNormalMode::DoPsModeErrorIndication( + WlanContextImpl& aCtxImpl ) + { + OsTracePrint( KWlmIndication, (TUint8*) + ("UMAC: WlanDot11InfrastructureMode::DoPsModeErrorIndication") ); + + // as the lower layers indicate that there is a problem with the PS + // operation of the current AP, we want to be in CAM mode for as long + // as there's data activity. So, check if we need a mode change to be + // in CAM now + const TPowerMgmtModeChange KPowerMgmtModeChange ( + aCtxImpl.OnPsModeErrorIndication() ); + + // if any change is needed regarding our power mgmt mode, + // proceed with it + PowerMgmtModeChange( aCtxImpl, KPowerMgmtModeChange ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// TBool WlanDot11InfrastructureNormalMode::OnActiveToLightPsTimerTimeout( WlanContextImpl& aCtxImpl ) { diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdynamicpowermodemgmtcntx.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdynamicpowermodemgmtcntx.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdynamicpowermodemgmtcntx.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 14 % +* %version: 15 % */ #include "config.h" @@ -55,6 +55,11 @@ iActiveCntx( NULL ), iWlanContextImpl( aWlanCtxImpl ) { + iActiveParamsBackup.iToLightPsTimeout = KDefaultToLightPsTimeout; + iActiveParamsBackup.iToLightPsFrameThreshold = + WlanActiveModePowerModeMgr::KDefaultToLightPsFrameThreshold; + iActiveParamsBackup.iUapsdRxFrameLengthThreshold = + WlanPowerModeMgrBase::KDefaultUapsdRxFrameLengthThreshold; os_memset( iIgnoreTraffic, 0, sizeof( iIgnoreTraffic ) ); } @@ -158,7 +163,8 @@ // TPowerMgmtModeChange WlanDynamicPowerModeMgmtCntx::OnFrameTx( WHA::TQueueId aQueueId, - TUint16 aEtherType ) + TUint16 aEtherType, + T802Dot11FrameControlTypeMask aDot11FrameType ) { TPowerMgmtModeChange powerMgmtModeChange( ENoChange ); @@ -172,13 +178,23 @@ iWlanContextImpl, aQueueId, aEtherType, + aDot11FrameType, iIgnoreTraffic[aQueueId] ); if ( powerMgmtModeChange != ENoChange ) { + iStateChange = ETrue; + // as we will do a mode change, cancel any possibly running // power mode management timers CancelTimeouts(); + + if ( aDot11FrameType == E802Dot11FrameTypeDataNull || + aEtherType == KArpType ) + { + // modify temporarily the Active mode parameters + SetKeepAliveActiveModeParameters(); + } } } else @@ -230,6 +246,8 @@ if ( powerMgmtModeChange != ENoChange ) { + iStateChange = ETrue; + // as we will do a mode change, cancel any possibly running // power mode management timers CancelTimeouts(); @@ -260,6 +278,57 @@ // // --------------------------------------------------------------------------- // +TPowerMgmtModeChange WlanDynamicPowerModeMgmtCntx::OnPsModeErrorIndication() + { + TPowerMgmtModeChange powerMgmtModeChange( ENoChange ); + + if ( iActiveCntx ) + { + // we have an active context, i.e. we are doing power mode mgmt + + if ( !iStateChange ) + { + powerMgmtModeChange = iActiveCntx->OnPsModeErrorIndication(); + + if ( powerMgmtModeChange != ENoChange ) + { + iStateChange = ETrue; + + // as we will do a mode change, cancel any possibly running + // power mode management timers + CancelTimeouts(); + + // modify temporarily the Active mode parameters + SetPsModeErrorActiveModeParameters(); + } + } + else + { + // state change already signalled from this power mode context, + // don't do it more than once. No action needed + OsTracePrint( KPwrStateTransition, (TUint8*) + ("UMAC: WlanDynamicPowerModeMgmtCntx::OnPsModeErrorIndication: " + "statechange already signalled") ); + } + } + else + { + // dynamic power mode mgmt is not active => "No change" will be + // returned. No action needed + } + + OsTracePrint( KPwrStateTransition, (TUint8*) + ("UMAC: WlanDynamicPowerModeMgmtCntx::OnPsModeErrorIndication: " + "statechange: %d"), + powerMgmtModeChange ); + + return powerMgmtModeChange; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// TBool WlanDynamicPowerModeMgmtCntx::OnActiveToLightPsTimerTimeout() { if ( ( iActiveCntx == &iActiveModeCntx ) && @@ -274,6 +343,11 @@ ("UMAC: WlanDynamicPowerModeMgmtCntx::OnActiveToLightPsTimerTimeout: change state: %d"), iStateChange ); + // make sure that the WLAN Mgmt Client provided Active mode + // parameter values are again used the next time by default + // + RestoreActiveModeParameters(); + if ( !iStateChange ) { RegisterToLightPsTimeout(); @@ -292,6 +366,11 @@ // In all these cases the timeout is not relevant and we take no action OsTracePrint( KPwrStateTransition, (TUint8*) ("UMAC: WlanDynamicPowerModeMgmtCntx::OnActiveToLightPsTimerTimeout: not relevant timeout") ); + + // however, make sure that the WLAN Mgmt Client provided Active mode + // parameter values are again used the next time by default + // + RestoreActiveModeParameters(); } return iStateChange; @@ -406,6 +485,15 @@ aToActiveFrameThreshold, aToDeepPsFrameThreshold, aUapsdRxFrameLengthThreshold ); + + iDeepPsModeCntx.SetParameters( aUapsdRxFrameLengthThreshold ); + + // take also a backup of the Active mode parameters + // + iActiveParamsBackup.iToLightPsTimeout = aToLightPsTimeout; + iActiveParamsBackup.iToLightPsFrameThreshold = aToLightPsFrameThreshold; + iActiveParamsBackup.iUapsdRxFrameLengthThreshold = + aUapsdRxFrameLengthThreshold; } // --------------------------------------------------------------------------- diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/umaclightpsmodepowermodemgr.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umaclightpsmodepowermodemgr.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umaclightpsmodepowermodemgr.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 3 % +* %version: 4 % */ #include "config.h" @@ -59,49 +59,54 @@ // --------------------------------------------------------------------------- // TPowerMgmtModeChange WlanLightPsModePowerModeMgr::OnFrameTx( - WlanContextImpl& /*aCtxImpl*/, + WlanContextImpl& aCtxImpl, WHA::TQueueId /*aQueueId*/, TUint16 aEtherType, + T802Dot11FrameControlTypeMask aDot11FrameType, TBool aIgnoreThisFrame ) { TPowerMgmtModeChange powerMgmtModeChange( ENoChange ); if ( aEtherType == KEapolType || - aEtherType == KWaiType ) + aEtherType == KWaiType || + aDot11FrameType == E802Dot11FrameTypeDataNull || + ( aEtherType == KArpType && + !(aCtxImpl.UapsdUsedForVoice() && aCtxImpl.InVoiceCallState())) ) { powerMgmtModeChange = EToActive; OsTracePrint( KPwrStateTransition, (TUint8*) - ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: EAPOL or WAI frame; change to Active") ); + ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: EAPOL, WAI or keep " + "alive frame or ARP in non- U-APSD WoWLAN call state; change to " + "Active") ); + } + else if ( !aIgnoreThisFrame ) + { + OsTracePrint( KPwrStateTransition, (TUint8*) + ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: count this frame") ); + + ++iToActiveFrameCount; + ++iToDeepPsFrameCount; + + if ( iToActiveFrameCount >= iToActiveFrameThreshold ) + { + powerMgmtModeChange = EToActive; + + OsTracePrint( KPwrStateTransition, (TUint8*) + ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: threshold " + "exceeded; change to Active") ); + } } else { - if ( !aIgnoreThisFrame ) - { - OsTracePrint( KPwrStateTransition, (TUint8*) - ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: count this frame") ); - - ++iToActiveFrameCount; - ++iToDeepPsFrameCount; - - if ( iToActiveFrameCount >= iToActiveFrameThreshold ) - { - powerMgmtModeChange = EToActive; - - OsTracePrint( KPwrStateTransition, (TUint8*) - ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: threshold exceeded; change to Active") ); - } - } - else - { - OsTracePrint( KPwrStateTransition, (TUint8*) - ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: do no count this frame") ); - - // no further action needed - } + OsTracePrint( KPwrStateTransition, (TUint8*) + ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: do not count " + "this frame") ); + + // no action needed } - return powerMgmtModeChange; + return powerMgmtModeChange; } // --------------------------------------------------------------------------- @@ -157,6 +162,15 @@ // // --------------------------------------------------------------------------- // +TPowerMgmtModeChange WlanLightPsModePowerModeMgr::OnPsModeErrorIndication() + { + return EToActive; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// TBool WlanLightPsModePowerModeMgr::OnLightPsToActiveTimerTimeout( WlanContextImpl& aCtxImpl ) { diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/umacnullsendcontroller.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacnullsendcontroller.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacnullsendcontroller.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ */ /* -* %version: 15 % +* %version: 16 % */ #include "config.h" @@ -397,32 +397,17 @@ iFlags &= ~KKeepAliveTimerArmed; - TUint32 KTimeAfterLatestTx ( - static_cast(os_systemTime() - iLatestTx) ); - - if ( KTimeAfterLatestTx >= iKeepAliveTimeout ) + // request a regular Null Data frame to be sent + // however, if there is a frame Tx (of any frame) already pending OR + // we use U-APSD for Voice and we are on a VoWLAN call + // we won't request a new frame to be sent. + if ( !iWlanContextImpl.UnsentTxPackets() && + !( iWlanContextImpl.UapsdUsedForVoice() && InVoiceCallState() ) ) { - // request a regular Null Data frame to be sent - - // however, if there is a frame Tx (of any frame) already pending, - // we won't request a new frame to be sent. - if ( !iWlanContextImpl.UnsentTxPackets() ) + if ( !iNullSender.TxNullDataFrame( iWlanContextImpl, EFalse ) ) { - if ( !iNullSender.TxNullDataFrame( iWlanContextImpl, EFalse ) ) - { - // frame was not sent because we didn't get a Tx buffer. - // In this case we'll skip the sending - // However, we need to re-arm the timer to trigger the next - // Null Data frame sending - RegisterKeepAliveTimeout( iKeepAliveTimeout ); - } - } - else - { - // frame Tx already pending, so we don't ask a Null Data to be sent - OsTracePrint( KUmacDetails, (TUint8*) - ("UMAC: WlanNullSendController::OnKeepAliveTimerTimeout: frame Tx already pending. New Null Data Tx request skipped") ); - + // frame was not sent because we didn't get a Tx buffer. + // In this case we'll skip the sending // However, we need to re-arm the timer to trigger the next // Null Data frame sending RegisterKeepAliveTimeout( iKeepAliveTimeout ); @@ -430,9 +415,15 @@ } else { - // No need to send keep alive; yet. Re-arm the timer with - // a suitable timeout relative to the time of the latest frame Tx - RegisterKeepAliveTimeout( iKeepAliveTimeout - KTimeAfterLatestTx ); + // we don't ask a Null Data to be sent + OsTracePrint( KUmacDetails, (TUint8*) + ("UMAC: WlanNullSendController::OnKeepAliveTimerTimeout: frame Tx " + "already pending OR U-APSD used for Voice and we are in VoWLAN" + "call => Null Data Tx request skipped") ); + + // However, we need to re-arm the timer to trigger the next + // Null Data frame sending + RegisterKeepAliveTimeout( iKeepAliveTimeout ); } } diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_common/umac_common/src/umacpowermodemgrbase.cpp --- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacpowermodemgrbase.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacpowermodemgrbase.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,16 +16,13 @@ */ /* -* %version: 8 % +* %version: 9 % */ #include "config.h" #include "umacpowermodemgrbase.h" #include "UmacContextImpl.h" -// Default frame payload length threshold value (in bytes) for U-APSD -const TUint32 KUapsdRxFrameLengthThreshold = 400; - // ================= MEMBER FUNCTIONS ======================= @@ -34,7 +31,7 @@ // --------------------------------------------------------------------------- // WlanPowerModeMgrBase::WlanPowerModeMgrBase() : - iUapsdRxFrameLengthThreshold( KUapsdRxFrameLengthThreshold ) + iUapsdRxFrameLengthThreshold( KDefaultUapsdRxFrameLengthThreshold ) { } @@ -50,6 +47,15 @@ // // --------------------------------------------------------------------------- // +TPowerMgmtModeChange WlanPowerModeMgrBase::OnPsModeErrorIndication() + { + return ENoChange; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// TBool WlanPowerModeMgrBase::OnActiveToLightPsTimerTimeout() { return EFalse; diff -r debc621e0d58 -r 5e6ba967244f wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WlanLogicalChannel.cpp --- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WlanLogicalChannel.cpp Fri Jun 11 15:34:34 2010 +0300 +++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WlanLogicalChannel.cpp Wed Jun 23 20:17:42 2010 +0300 @@ -16,7 +16,7 @@ */ /* -* %version: 60 % +* %version: 61 % */ #include "WlLddWlanLddConfig.h" @@ -635,7 +635,6 @@ #else iOsa->MutexAcquire(); #endif - NKern::ThreadLeaveCS(); TraceDump(MUTEX, (("WLANLDD: DWlanLogicalChannel::DoControlFast: mutex acquired"))); @@ -661,14 +660,12 @@ } // release mutex - // Enter critical section before releasing the mutex as - // we are executing in the context of a user mode thread - NKern::ThreadEnterCS(); #ifndef RD_WLAN_DDK Kern::MutexSignal( iMutex ); #else iOsa->MutexRelease(); #endif + // and exit from critical section NKern::ThreadLeaveCS(); TraceDump(MUTEX,