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". |
30 |
30 |
31 #include "umacinternaldefinitions.h" |
31 #include "umacinternaldefinitions.h" |
32 |
32 |
33 class WlanContextImpl; |
33 class WlanContextImpl; |
34 |
34 |
|
35 |
35 /** |
36 /** |
36 * Common base class for classes implementing dynamic power mode transition |
37 * Common base class for classes implementing dynamic power mode transition |
37 * algorithm between PS and active mode in infrastructure mode |
38 * algorithm between PS and active mode in infrastructure mode |
38 */ |
39 */ |
39 class WlanPowerModeMgrBase |
40 class WlanPowerModeMgrBase |
40 { |
41 { |
|
42 public: |
|
43 // Default frame payload length threshold value (in bytes) for U-APSD |
|
44 static const TUint32 KDefaultUapsdRxFrameLengthThreshold = 400; |
|
45 |
41 public: |
46 public: |
42 |
47 |
43 /** Dtor */ |
48 /** Dtor */ |
44 virtual ~WlanPowerModeMgrBase(); |
49 virtual ~WlanPowerModeMgrBase(); |
45 |
50 |
49 * |
54 * |
50 * @since S60 3.1 |
55 * @since S60 3.1 |
51 * @param aCtxImpl global statemachine context |
56 * @param aCtxImpl global statemachine context |
52 * @param aQueueId Id of the queue/AC via which the frame will be transmitted |
57 * @param aQueueId Id of the queue/AC via which the frame will be transmitted |
53 * @param aEtherType Ethernet type of the frame |
58 * @param aEtherType Ethernet type of the frame |
|
59 * @param aDot11FrameType 802.11 frame type |
54 * @param aIgnoreThisFrame shall this frame be ignored from dynamic power |
60 * @param aIgnoreThisFrame shall this frame be ignored from dynamic power |
55 * mode management perspective |
61 * mode management perspective |
56 * @return To which power management mode to change; if any at all |
62 * @return To which power management mode to change; if any at all |
57 */ |
63 */ |
58 virtual TPowerMgmtModeChange OnFrameTx( |
64 virtual TPowerMgmtModeChange OnFrameTx( |
59 WlanContextImpl& aCtxImpl, |
65 WlanContextImpl& aCtxImpl, |
60 WHA::TQueueId aQueueId, |
66 WHA::TQueueId aQueueId, |
61 TUint16 aEtherType, |
67 TUint16 aEtherType, |
|
68 T802Dot11FrameControlTypeMask aDot11FrameType, |
62 TBool aIgnoreThisFrame ) = 0; |
69 TBool aIgnoreThisFrame ) = 0; |
63 |
70 |
64 /** |
71 /** |
65 * To be called when accepting an Rx frame |
72 * To be called when accepting an Rx frame |
66 * |
73 * |
80 TUint16 aEtherType, |
87 TUint16 aEtherType, |
81 TBool aIgnoreThisFrame, |
88 TBool aIgnoreThisFrame, |
82 TUint aPayloadLength, |
89 TUint aPayloadLength, |
83 TDaType aDaType ) = 0; |
90 TDaType aDaType ) = 0; |
84 |
91 |
|
92 /** |
|
93 * To be called upon receiving the PS Mode Error indication |
|
94 * Determines the need to make a power mode transition |
|
95 * |
|
96 * @return To which power management mode to change; if any at all |
|
97 */ |
|
98 virtual TPowerMgmtModeChange OnPsModeErrorIndication(); |
|
99 |
85 /** |
100 /** |
86 * To be called upon Active to Light PS timer timeout |
101 * To be called upon Active to Light PS timer timeout |
87 * |
102 * |
88 * @since S60 v5.1 |
103 * @since S60 v5.1 |
89 * @return ETrue if power mode transition should be done, |
104 * @return ETrue if power mode transition should be done, |