1 /* |
1 /* |
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of the License "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
14 * Description: Implementation of WlanDynamicPowerModeMgmtCntx inline methods |
14 * Description: Implementation of WlanDynamicPowerModeMgmtCntx inline methods |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 5 % |
19 * %version: 6 % |
20 */ |
20 */ |
|
21 |
|
22 // --------------------------------------------------------------------------- |
|
23 // |
|
24 // --------------------------------------------------------------------------- |
|
25 // |
|
26 inline void WlanDynamicPowerModeMgmtCntx::RestoreActiveModeParameters() |
|
27 { |
|
28 iToLightPsTimeout = iActiveParamsBackup.iToLightPsTimeout; |
|
29 iActiveModeCntx.SetParameters( |
|
30 iActiveParamsBackup.iToLightPsFrameThreshold, |
|
31 iActiveParamsBackup.iUapsdRxFrameLengthThreshold ); |
|
32 } |
21 |
33 |
22 // ----------------------------------------------------------------------------- |
34 // ----------------------------------------------------------------------------- |
23 // |
35 // |
24 // ----------------------------------------------------------------------------- |
36 // ----------------------------------------------------------------------------- |
25 // |
37 // |
107 inline TBool |
119 inline TBool |
108 WlanDynamicPowerModeMgmtCntx::StayInPsDespiteLegacyBackgroundTraffic() const |
120 WlanDynamicPowerModeMgmtCntx::StayInPsDespiteLegacyBackgroundTraffic() const |
109 { |
121 { |
110 return ( iFlags & KStayInPsDespiteLegacyBackgroundTraffic ); |
122 return ( iFlags & KStayInPsDespiteLegacyBackgroundTraffic ); |
111 } |
123 } |
|
124 |
|
125 // ----------------------------------------------------------------------------- |
|
126 // |
|
127 // ----------------------------------------------------------------------------- |
|
128 // |
|
129 inline void WlanDynamicPowerModeMgmtCntx::SetPsModeErrorActiveModeParameters() |
|
130 { |
|
131 const TUint32 KToLightPsTimeout( 1000000 ); // 1 second |
|
132 const TUint16 KToLightPsFrameThreshold( 4 ); |
|
133 const TUint16 KUapsdRxFrameLengthThreshold( |
|
134 WlanPowerModeMgrBase::KDefaultUapsdRxFrameLengthThreshold ); |
|
135 |
|
136 iToLightPsTimeout = KToLightPsTimeout; |
|
137 iActiveModeCntx.SetParameters( |
|
138 KToLightPsFrameThreshold, |
|
139 KUapsdRxFrameLengthThreshold ); |
|
140 } |
|
141 |
|
142 // ----------------------------------------------------------------------------- |
|
143 // |
|
144 // ----------------------------------------------------------------------------- |
|
145 // |
|
146 inline void WlanDynamicPowerModeMgmtCntx::SetKeepAliveActiveModeParameters() |
|
147 { |
|
148 const TUint32 KToLightPsTimeout( 20000 ); // 20ms |
|
149 const TUint16 KToLightPsFrameThreshold( 1 ); |
|
150 const TUint16 KUapsdRxFrameLengthThreshold( |
|
151 WlanPowerModeMgrBase::KDefaultUapsdRxFrameLengthThreshold ); |
|
152 |
|
153 iToLightPsTimeout = KToLightPsTimeout; |
|
154 iActiveModeCntx.SetParameters( |
|
155 KToLightPsFrameThreshold, |
|
156 KUapsdRxFrameLengthThreshold ); |
|
157 } |