|
1 /* |
|
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Declaration of the UmacContextImpl class |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 102 % |
|
20 */ |
|
21 |
|
22 #ifndef WLANCONTEXTIMPL_H |
|
23 #define WLANCONTEXTIMPL_H |
|
24 |
|
25 #ifndef RD_WLAN_DDK |
|
26 #include <wha_types.h> |
|
27 #else |
|
28 #include <wlanwha_types.h> |
|
29 #endif |
|
30 |
|
31 #include "Umac.h" |
|
32 #include "FrameXferBlock.h" |
|
33 |
|
34 #include "802dot11.h" |
|
35 #include "umacinternaldefinitions.h" |
|
36 #include "UmacMib.h" |
|
37 #include "UmacAuthSeqNmbrExpected.h" |
|
38 #include "umaceventdispatcher.h" |
|
39 #include "umacpacketscheduler.h" |
|
40 #include "umacpacketschedulerclient.h" |
|
41 #include "umacnullsender.h" |
|
42 |
|
43 #include "UmacDot11MacError.h" |
|
44 #include "UmacDot11InitPhase1.h" |
|
45 #include "UmacDot11Idle.h" |
|
46 |
|
47 #include "UmacDot11PrepareForBssMode.h" |
|
48 #include "UmacDot11DisassociationPending.h" |
|
49 #include "UmacDot11Synchronize.h" |
|
50 #include "umacdot11idlescanningmode.h" |
|
51 |
|
52 #include "UmacDot11ReassociationPending.h" |
|
53 #include "UmacDot11SoftReset.h" |
|
54 #include "UmacDot11OpenAuthPending.h" |
|
55 #include "UmacDot11SharedAuthPending.h" |
|
56 #include "UmacDot11AssociationPending.h" |
|
57 #include "UmacDot11DeauthPending.h" |
|
58 #include "UmacDot11InfrastructureModeInit.h" |
|
59 #include "UmacDot11PrepareForIbssMode.h" |
|
60 #include "umacdot11ibssnormalmode.h" |
|
61 #include "umacdot11ibssscanningmode.h" |
|
62 #include "umacdot11infrastructurenormalmode.h" |
|
63 #include "umacdot11infrastructurescanningmode.h" |
|
64 #include "umacdot11pwrmgmttransitionmode.h" |
|
65 #include "UmacDot11MibDefaultConfigure.h" |
|
66 |
|
67 #include "umacconnectcontext.h" |
|
68 #include "umacprivacymodefilters.h" |
|
69 #include "UmacTxRateAdaptation.h" |
|
70 #include "UmacPRNGenerator.h" |
|
71 #include "umacusertxdatacntx.h" |
|
72 #include "umacdynamicpowermodemgmtcntx.h" |
|
73 #include "umacnullsendcontroller.h" |
|
74 #include "umacsignalpredictor.h" |
|
75 |
|
76 class WlanMacState; |
|
77 class WlanConnectContext; |
|
78 class UmacManagementSideUmacCb; |
|
79 class WlanAddBroadcastWepKey; |
|
80 class WlanConfigureTxQueueParams; |
|
81 class WlanConfigureTxAutoRatePolicy; |
|
82 class WlanWsaInitiliaze; |
|
83 class WlanWsaConfigure; |
|
84 class WlanWsaJoin; |
|
85 class WlanWsaScan; |
|
86 class WlanWhaStopScan; |
|
87 class WlanWsaReadMib; |
|
88 class WlanWsaWriteMib; |
|
89 class WlanWsaDisconnect; |
|
90 class WlanWsaSetBssParameters; |
|
91 class WlanWsaAddKey; |
|
92 class WlanWsaRemoveKey; |
|
93 class WlanWsaSetPsMode; |
|
94 class WlanWhaConfigureQueue; |
|
95 class WlanWhaConfigureAc; |
|
96 class WlanWhaRelease; |
|
97 |
|
98 struct SWsaCommands; |
|
99 |
|
100 |
|
101 /** |
|
102 * WLAN context implementation |
|
103 */ |
|
104 class WlanContextImpl : |
|
105 public WHA::MWhaCb, |
|
106 public MWlanPacketSchedulerClient, |
|
107 public MWlanNullSender |
|
108 { |
|
109 |
|
110 public: |
|
111 |
|
112 /** |
|
113 * Return value type for AddMulticastAddress() method |
|
114 */ |
|
115 enum TGroupAddStatus |
|
116 { |
|
117 EOk, |
|
118 EFull, |
|
119 EAlreadyExists |
|
120 }; |
|
121 |
|
122 /** |
|
123 * Lookup table to map 802.11 rate defintions |
|
124 */ |
|
125 class SupportedRateLookUp |
|
126 { |
|
127 public: // Methods |
|
128 |
|
129 /** Ctor */ |
|
130 SupportedRateLookUp() : |
|
131 // these initial values don't really matter as they are always |
|
132 // overwritten |
|
133 iSupportedRate( E802Dot11Rate1MBit ), iWsaRate( 0 ) {}; |
|
134 |
|
135 private: // Methods |
|
136 |
|
137 // Prohibit copy constructor |
|
138 SupportedRateLookUp( const SupportedRateLookUp& ); |
|
139 // Prohibit assigment operator |
|
140 SupportedRateLookUp& operator== ( const SupportedRateLookUp&); |
|
141 |
|
142 public: // Data |
|
143 |
|
144 /** 802.11 rate defintions */ |
|
145 T802Dot11SupportedRate iSupportedRate; |
|
146 /** corresponding WHA rate */ |
|
147 TUint32 iWsaRate; |
|
148 }; |
|
149 |
|
150 protected: |
|
151 |
|
152 /** |
|
153 * The states of the statemachine |
|
154 */ |
|
155 struct States |
|
156 { |
|
157 public: // Methods |
|
158 |
|
159 /** |
|
160 * Ctor |
|
161 */ |
|
162 States() {}; |
|
163 |
|
164 private: // Methods |
|
165 |
|
166 // Prohibit assignment operator |
|
167 States& operator= ( const States& ); |
|
168 // Prohibit copy constructor |
|
169 States( const States& ); |
|
170 |
|
171 public: // Data |
|
172 WlanDot11InitPhase1 iInitPhase1State; |
|
173 WlanDot11MibDefaultConfigure iMibDefaultConfigure; |
|
174 WlanDot11Idle iIdleState; |
|
175 WlanDot11PrepareForBssMode iPrepareForBssMode; |
|
176 WlanDot11PrepareForIbssMode iPrepareForIbssMode; |
|
177 WlanDot11OpenAuthPending iOpenAuthPendingState; |
|
178 WlanDot11SharedAuthPending iSharedAuthPending; |
|
179 WlanDot11AssociationPending iAssociationPendingState; |
|
180 WlanDot11InfrastructureModeInit iInfrastructureModeInit; |
|
181 WlanDot11IdleScanningMode iIdleScanningMode; |
|
182 WlanDot11IbssNormalMode iIbssNormalMode; |
|
183 WlanDot11IbssScanningMode iIbssScanningMode; |
|
184 WlanDot11InfrastructureScanningMode |
|
185 iInfrastructureScanningMode; |
|
186 WlanDot11InfrastructureNormalMode |
|
187 iInfrastructureNormalMode; |
|
188 WlanDot11PwrMgmtTransitionMode iPwrMgmtTransitionMode; |
|
189 WlanDot11DisassociationPending iDisassociationPendingState; |
|
190 WlanDot11Synchronize iSynchronizeState; |
|
191 WlanDot11ReassociationPending iReassociationPendingState; |
|
192 WlanDot11DeauthPending iDeauthPendingState; |
|
193 WlanDot11SoftReset iSoftResetState; |
|
194 WlanDot11MacError iMacError; |
|
195 }; |
|
196 |
|
197 /** |
|
198 * 802.11 management frame templates |
|
199 */ |
|
200 class ManagementFrameTemplates |
|
201 { |
|
202 public: // Methods |
|
203 |
|
204 /** Ctor */ |
|
205 ManagementFrameTemplates() : |
|
206 ialign1( 0 ), |
|
207 ialign2( 0 ), |
|
208 ialign3( 0 ), |
|
209 ialign4( 0 ), |
|
210 ialign5( 0 ), |
|
211 ialign6( 0 ), |
|
212 ialign7( 0 ), |
|
213 ialign8( 0 ), |
|
214 ialign9( 0 ) |
|
215 {}; |
|
216 |
|
217 private: // Methdods |
|
218 |
|
219 // Prohibit copy constructor |
|
220 ManagementFrameTemplates( const ManagementFrameTemplates& ); |
|
221 // Prohibit assigment operator |
|
222 ManagementFrameTemplates& operator== ( |
|
223 const ManagementFrameTemplates& ); |
|
224 |
|
225 public: // Data |
|
226 |
|
227 /** authenticate frame template */ |
|
228 SAuthenticationFrame iAuthenticationFrame; |
|
229 /** |
|
230 * 32-bit align |
|
231 * only needed because these structs are packed |
|
232 */ |
|
233 TUint32 ialign1; |
|
234 /** authenticate frame template with HT Control field */ |
|
235 SHtAuthenticationFrame iHtAuthenticationFrame; |
|
236 /** |
|
237 * 32-bit align |
|
238 * only needed because these structs are packed |
|
239 */ |
|
240 TUint32 ialign2; |
|
241 /** association frame template */ |
|
242 SAssociationRequestFrame iAssociationRequestFrame; |
|
243 /** |
|
244 * 32-bit align |
|
245 * only needed because these structs are packed |
|
246 */ |
|
247 TUint32 ialign3; |
|
248 /** association frame template with HT Control field */ |
|
249 SHtAssociationRequestFrame iHtAssociationRequestFrame; |
|
250 /** |
|
251 * 32-bit align |
|
252 * only needed because these structs are packed |
|
253 */ |
|
254 TUint32 ialign4; |
|
255 /** deauthenticate frame template */ |
|
256 SDeauthenticateFrame iDeauthenticateFrame; |
|
257 /** |
|
258 * 32-bit align |
|
259 * only needed because these structs are packed |
|
260 */ |
|
261 TUint32 ialign5; |
|
262 /** deauthenticate frame template with HT Control field */ |
|
263 SHtDeauthenticateFrame iHtDeauthenticateFrame; |
|
264 /** |
|
265 * 32-bit align |
|
266 * only needed because these structs are packed |
|
267 */ |
|
268 TUint32 ialign6; |
|
269 /** disassociation frame template */ |
|
270 SDisassociateFrame iDisassociationFrame; |
|
271 /** |
|
272 * 32-bit align |
|
273 * only needed because these structs are packed |
|
274 */ |
|
275 TUint32 ialign7; |
|
276 /** disassociation frame template with HT Control field */ |
|
277 SHtDisassociateFrame iHtDisassociationFrame; |
|
278 /** |
|
279 * 32-bit align |
|
280 * only needed because these structs are packed |
|
281 */ |
|
282 TUint32 ialign8; |
|
283 /** resassociation frame template */ |
|
284 SReassociationRequestFrame iReassociationRequestFrame; |
|
285 /** |
|
286 * 32-bit align |
|
287 * only needed because these structs are packed |
|
288 */ |
|
289 TUint32 ialign9; |
|
290 /** resassociation frame template with HT Control field */ |
|
291 SHtReassociationRequestFrame iHtReassociationRequestFrame; |
|
292 }; |
|
293 |
|
294 /** |
|
295 * Container for multicast groups (specified by group mac addresses) |
|
296 * that we have joined. |
|
297 * |
|
298 * When we have joined any multicast groups |
|
299 * we would like to receive only multicast packets that have been |
|
300 * sent to those groups. |
|
301 */ |
|
302 class JoinedMulticastGroups |
|
303 { |
|
304 public: |
|
305 |
|
306 /** Ctor */ |
|
307 JoinedMulticastGroups(); |
|
308 |
|
309 /** |
|
310 * Adds a group. |
|
311 * @param |
|
312 * @return ETrue if aGroup was not fou |
|
313 */ |
|
314 TGroupAddStatus AddGroup( const TMacAddress& aGroup ); |
|
315 |
|
316 /** |
|
317 * Removes a group. |
|
318 * @param aGroup Group to be removed |
|
319 * @return ETrue if aGroup was found (and hence removed) |
|
320 * EFalse otherwise |
|
321 */ |
|
322 TBool RemoveGroup( const TMacAddress& aGroup ); |
|
323 |
|
324 /** |
|
325 * Returns the number of groups that we are joined into |
|
326 * currently. |
|
327 * @return The number of groups joined currently. |
|
328 */ |
|
329 TUint8 Count() const; |
|
330 |
|
331 /** |
|
332 * Gets all the groups by passing back a pointer to the 1st |
|
333 * group which is followed by all the other groups that |
|
334 * we are joined into. |
|
335 * @return The number of groups (group addresses) returned |
|
336 */ |
|
337 TUint8 GetGroups( const TMacAddress*& aGroups ) const; |
|
338 |
|
339 /** |
|
340 * Clears the whole container by removing all groups from it |
|
341 */ |
|
342 void Reset(); |
|
343 |
|
344 private: |
|
345 |
|
346 /** |
|
347 * Finds aGroup |
|
348 * @param aGroup Group to be located |
|
349 * @param aIndex Index pointing to aGroup if aGroup was found |
|
350 * @return ETrue if aGroup was found |
|
351 * EFalse otherwise |
|
352 */ |
|
353 TBool FindGroup( |
|
354 const TMacAddress& aGroup, |
|
355 TUint& aIndex ) const; |
|
356 |
|
357 // Prohibit copy constructor |
|
358 JoinedMulticastGroups( const JoinedMulticastGroups& ); |
|
359 // Prohibit assigment operator |
|
360 JoinedMulticastGroups& operator= |
|
361 ( const JoinedMulticastGroups& ); |
|
362 |
|
363 private: // Data |
|
364 |
|
365 /** |
|
366 * The maximum number of multicast groups that we allow. |
|
367 * Note that the adaptation layer may support also |
|
368 * any smaller number of addresses, including zero |
|
369 */ |
|
370 enum { KMaxNbrOfGroups = 32 }; |
|
371 |
|
372 /** storage for group entries */ |
|
373 TMacAddress iStorage[KMaxNbrOfGroups]; |
|
374 |
|
375 /** is the corresponding storage entry free */ |
|
376 TBool iFree[KMaxNbrOfGroups]; |
|
377 |
|
378 /** |
|
379 * 1st free index. As there are no empty storage entries in |
|
380 * the middle, this is also the number of groups that we are |
|
381 * joined into currently */ |
|
382 TUint8 iFirstFreeIndex; |
|
383 }; |
|
384 |
|
385 public: |
|
386 |
|
387 /** |
|
388 * C++ constructor. |
|
389 * @param WlanContext context that owns us |
|
390 */ |
|
391 explicit WlanContextImpl( Umac& aUmac ); |
|
392 |
|
393 /** |
|
394 * Dtor |
|
395 */ |
|
396 virtual ~WlanContextImpl(); |
|
397 |
|
398 /** |
|
399 * Constructs our supported rates lookup table |
|
400 */ |
|
401 void MakeLookUpTable(); |
|
402 |
|
403 void AttachWsa( WHA::Wha* aWha ); |
|
404 void BootUp( |
|
405 const TUint8* aPda, |
|
406 TUint32 aPdaLength, |
|
407 const TUint8* aFw, |
|
408 TUint32 aFwLength ); |
|
409 inline WlanManagementSideUmacCb& WlanManagementSideCb() { return iUmac; } |
|
410 inline WHA::Wha& Wha() { return *iWha; } |
|
411 inline WlanMacState& CurrentState(); |
|
412 |
|
413 TBool OnDeferredWhaCommandComplete( |
|
414 WHA::TCompleteCommandId aCompleteCommandId, |
|
415 WHA::TStatus aStatus, |
|
416 const WHA::UCommandCompletionParams& aCommandCompletionParams ); |
|
417 |
|
418 TBool OnDeferredInternalEvent( TInternalEvent aInternalEvent ); |
|
419 |
|
420 inline void RegisterEvent( const TOIDHeader& aOid ); |
|
421 |
|
422 inline void RegisterEvent( TInternalEvent aInternalEvent ); |
|
423 |
|
424 inline TBool ChannelEnabled( WlanEventDispatcher::TChannel aChannel ) const; |
|
425 |
|
426 inline void Enable( WlanEventDispatcher::TChannel aChannelMask ); |
|
427 inline void Disable( WlanEventDispatcher::TChannel aChannelMask ); |
|
428 |
|
429 inline TBool DispatchEvent(); |
|
430 |
|
431 /** |
|
432 * Determines if a command completion event for the specified |
|
433 * command is registered |
|
434 * |
|
435 * @param aCommandId Id of the command to check |
|
436 * @return ETrue if command completion event is registered |
|
437 * EFalse otherwise |
|
438 */ |
|
439 inline TBool CommandCompletionEventRegistered( |
|
440 WHA::TCompleteCommandId aCommandId ) const; |
|
441 |
|
442 /** |
|
443 * Dispatches a single command completion event |
|
444 * |
|
445 * @since S60 3.1 |
|
446 * @return ETrue If a global state change occurred as a result of the event |
|
447 * dispatching |
|
448 * EFalse otherwise |
|
449 */ |
|
450 inline TBool DispatchCommandCompletionEvent(); |
|
451 |
|
452 inline TBool ProtocolStackTxDataAllowed() const; |
|
453 |
|
454 /** |
|
455 * Second level initializer. Does statemachine initialization |
|
456 * @return ETrue success EFalse failure |
|
457 */ |
|
458 TBool Initialize(); |
|
459 |
|
460 WlanAddBroadcastWepKey& AddBroadcastWepKey(); |
|
461 WlanConfigureTxQueueParams& ConfigureTxQueueParams(); |
|
462 WlanConfigureTxAutoRatePolicy& ConfigureTxAutoRatePolicy(); |
|
463 WlanWsaInitiliaze& WsaInitiliaze(); |
|
464 WlanWsaConfigure& WsaConfigure(); |
|
465 WlanWsaReadMib& WsaReadMib(); |
|
466 WlanWsaWriteMib& WsaWriteMib(); |
|
467 WlanWsaJoin& WsaJoin(); |
|
468 WlanWsaScan& WsaScan(); |
|
469 WlanWhaStopScan& WhaStopScan(); |
|
470 WlanWsaDisconnect& WsaDisconnect(); |
|
471 WlanWsaSetBssParameters& WsaSetBssParameters(); |
|
472 WlanWsaAddKey& WsaAddKey(); |
|
473 WlanWhaConfigureQueue& WhaConfigureQueue(); |
|
474 WlanWsaSetPsMode& WsaSetPsMode(); |
|
475 WlanWhaConfigureAc& WhaConfigureAc(); |
|
476 WlanWhaRelease& WlanWhaRelease(); |
|
477 |
|
478 inline void WHASettings( const WHA::SSettings& aSettings ); |
|
479 inline WHA::SSettings& WHASettings(); |
|
480 inline const WHA::SSettings& WHASettings() const; |
|
481 |
|
482 /** |
|
483 * Gets authentication frame template |
|
484 * @return authentication frame template |
|
485 */ |
|
486 inline SAuthenticationFrame& GetAuthenticationFrame(); |
|
487 |
|
488 /** |
|
489 * Gets authentication frame template with HT Control field |
|
490 * @return authentication frame template |
|
491 */ |
|
492 inline SHtAuthenticationFrame& GetHtAuthenticationFrame(); |
|
493 |
|
494 /** |
|
495 * Gets association request frame template |
|
496 * @return association request frame template |
|
497 */ |
|
498 inline SAssociationRequestFrame& GetAssociationRequestFrame(); |
|
499 |
|
500 /** |
|
501 * Gets association request frame template with HT Control field |
|
502 * @return association request frame template |
|
503 */ |
|
504 inline SHtAssociationRequestFrame& GetHtAssociationRequestFrame(); |
|
505 |
|
506 /** |
|
507 * Gets deauthenticate frame template |
|
508 * @return deauthenticate frame template |
|
509 */ |
|
510 inline SDeauthenticateFrame& GetDeauthenticateFrame(); |
|
511 |
|
512 /** |
|
513 * Gets deauthenticate frame template with HT Control field |
|
514 * @return deauthenticate frame template |
|
515 */ |
|
516 inline SHtDeauthenticateFrame& GetHtDeauthenticateFrame(); |
|
517 |
|
518 /** |
|
519 * Gets disassociation frame template |
|
520 * @return disassociation frame template |
|
521 */ |
|
522 inline SDisassociateFrame& GetDisassociationFrame(); |
|
523 |
|
524 /** |
|
525 * Gets disassociation frame template with HT Control field |
|
526 * @return disassociation frame template |
|
527 */ |
|
528 inline SHtDisassociateFrame& GetHtDisassociationFrame(); |
|
529 |
|
530 /** |
|
531 * Gets resassociation frame template |
|
532 * @return resassociation frame template |
|
533 */ |
|
534 inline SReassociationRequestFrame& GetReassociationRequestFrame(); |
|
535 |
|
536 /** |
|
537 * Gets resassociation frame template with HT Control field |
|
538 * @return resassociation frame template |
|
539 */ |
|
540 inline SHtReassociationRequestFrame& GetHtReassociationRequestFrame(); |
|
541 |
|
542 /** |
|
543 * Gets null data frame template |
|
544 * @return resassociation frame template |
|
545 */ |
|
546 inline SNullDataFrame& NullDataFrame(); |
|
547 |
|
548 /** |
|
549 * Gets QoS Null data frame template |
|
550 * @return QoS Null data frame template |
|
551 */ |
|
552 inline SHtQosNullDataFrame& QosNullDataFrame(); |
|
553 |
|
554 /** |
|
555 * Returns the length of the QoS Null data frame template when we |
|
556 * know our current/target network. |
|
557 * It's the length of a HT QoS Null data frame in case of a HT nw |
|
558 * and otherwise the length of a regular (non-HT) QoS Null data frame |
|
559 * @return Length of the currently relevant QoS Null data frame |
|
560 */ |
|
561 inline TUint16 QosNullDataFrameLength() const; |
|
562 |
|
563 /** |
|
564 * Gets data frame template |
|
565 * @return data frame template |
|
566 */ |
|
567 inline SDataFrameHeader& GetDataFrameHeader(); |
|
568 |
|
569 /** |
|
570 * Gets protocol stack side ethernet tx context |
|
571 * @return protocol stack side ethernet write context |
|
572 */ |
|
573 inline TWlanUserTxDataCntx& GetTxDataCntx(); |
|
574 inline const TWlanUserTxDataCntx& GetTxDataCntx() const; |
|
575 |
|
576 /** |
|
577 * Gets EAPOL stack side ethernet tx context |
|
578 * @return EAPOL stack side ethernet write context |
|
579 */ |
|
580 inline TWlanUserTxDataCntx& GetMgmtTxDataCntx(); |
|
581 inline const TWlanUserTxDataCntx& GetMgmtTxDataCntx() const; |
|
582 |
|
583 /** |
|
584 * Resets authentication sequnece expected counter to initial state |
|
585 */ |
|
586 inline void ResetAuthSeqNmbrExpected(); |
|
587 |
|
588 /** |
|
589 * Gets the current Tx rate and related rate policy associated with the |
|
590 * specified Tx queue |
|
591 * |
|
592 * @param aQueueId id of the Tx queue |
|
593 * @param aUseSpecialRatePolicy If ETrue, the use of the special Tx rate |
|
594 * policy is requested |
|
595 * If EFalse, the use of the special Tx rate policy is not requested |
|
596 * @param aRate initial max Tx rate to use; if relevant |
|
597 * @param aPolicyId ID of the rate class / policy to use |
|
598 */ |
|
599 inline void TxRatePolicy( |
|
600 WHA::TQueueId aQueueId, |
|
601 TBool aUseSpecialRatePolicy, |
|
602 WHA::TRate& aRate, |
|
603 TUint8& aPolicyId ) const; |
|
604 |
|
605 /** |
|
606 * Gets BSSID |
|
607 * @return BSSID |
|
608 */ |
|
609 inline TMacAddress& GetBssId(); |
|
610 |
|
611 inline void Aid( const TUint32 aAid ); |
|
612 inline TUint32 Aid() const; |
|
613 |
|
614 inline void AtimWindow( const TUint32 aAtimWindow ); |
|
615 inline TUint32 AtimWindow() const; |
|
616 |
|
617 /** |
|
618 * Gets SSID |
|
619 * @return SSID |
|
620 */ |
|
621 inline TSSID& GetSsId(); |
|
622 |
|
623 /** |
|
624 * Gets used privacy mode |
|
625 * @return used privacy mode |
|
626 */ |
|
627 inline TEncryptionStatus& EncryptionStatus(); |
|
628 |
|
629 inline WHA::TOperationMode NetworkOperationMode() const; |
|
630 inline void NetworkOperationMode( |
|
631 WHA::TOperationMode aOperationMode ); |
|
632 |
|
633 // setters and getters for key type |
|
634 inline void GroupKeyType( WHA::TKeyType aKeyType ); |
|
635 inline WHA::TKeyType GroupKeyType() const; |
|
636 inline void PairWiseKeyType( WHA::TKeyType aKeyType ); |
|
637 inline WHA::TKeyType PairWiseKeyType() const; |
|
638 |
|
639 inline void PairwiseCipher( TWlanCipherSuite aCipherSuite ); |
|
640 inline TWlanCipherSuite PairwiseCipher() const; |
|
641 |
|
642 inline WHA::TChannelNumber NetworkChannelNumeber() const; |
|
643 inline void NetworkChannelNumeber( WHA::TChannelNumber aChannelNumber ); |
|
644 |
|
645 inline TUint32 NetworkBeaconInterval() const; |
|
646 inline void NetworkBeaconInterval( TUint32 aBeaconInterval ); |
|
647 |
|
648 inline WHA::TPsMode DesiredDot11PwrMgmtMode() const; |
|
649 inline void DesiredDot11PwrMgmtMode( WHA::TPsMode aPsMode ); |
|
650 |
|
651 inline WHA::TPsMode CurrentDot11PwrMgmtMode() const; |
|
652 inline void CurrentDot11PwrMgmtMode( WHA::TPsMode aPsMode ); |
|
653 |
|
654 inline const TDot11PsModeWakeupSetting& DesiredPsModeConfig() const; |
|
655 inline void SetDesiredPsModeConfig( |
|
656 const TDot11PsModeWakeupSetting& aPsModeWakeupSetting ); |
|
657 |
|
658 TPowerMgmtMode CurrentPwrMgmtMode() const; |
|
659 |
|
660 inline WHA::TPsMode ClientDot11PwrMgmtMode() const; |
|
661 inline void ClientDot11PwrMgmtMode( TPowerMode aPsMode ); |
|
662 |
|
663 inline const TDot11PsModeWakeupSetting& ClientLightPsModeConfig() const; |
|
664 inline void SetClientLightPsModeConfig( |
|
665 TWlanWakeUpInterval aWakeupMode, |
|
666 TUint8 aListenInterval ); |
|
667 |
|
668 inline const TDot11PsModeWakeupSetting& ClientDeepPsModeConfig() const; |
|
669 inline void SetClientDeepPsModeConfig( |
|
670 TWlanWakeUpInterval aWakeupMode, |
|
671 TUint8 aListenInterval ); |
|
672 |
|
673 inline TBool DynamicPwrModeMgtDisabled() const; |
|
674 void DynamicPwrModeMgtDisabled( TBool aValue ); |
|
675 |
|
676 inline TBool UseShortPreamble() const; |
|
677 void UseShortPreamble( TBool aValue ); |
|
678 |
|
679 inline TBool Reassociate() const; |
|
680 void Reassociate( TBool aValue ); |
|
681 |
|
682 inline TBool UseShortSlotTime() const; |
|
683 void UseShortSlotTime( TBool aValue ); |
|
684 |
|
685 inline TBool ProtectionBitSet() const; |
|
686 void ProtectionBitSet( TBool aValue ); |
|
687 |
|
688 inline TBool QosEnabled() const; |
|
689 void QosEnabled( TBool aValue ); |
|
690 |
|
691 inline TBool UapsdEnabled() const; |
|
692 void UapsdEnabled( TBool aValue ); |
|
693 |
|
694 inline TBool MulticastFilteringDisAllowed() const; |
|
695 void MulticastFilteringDisAllowed( TBool aValue ); |
|
696 |
|
697 inline TBool ErpIePresent() const; |
|
698 void ErpIePresent( TBool aValue ); |
|
699 |
|
700 inline TBool DisassociatedByAp() const; |
|
701 void DisassociatedByAp( TBool aValue ); |
|
702 |
|
703 inline TBool UapsdRequestedForVoice() const; |
|
704 void UapsdRequestedForVoice( TBool aValue ); |
|
705 |
|
706 inline TBool UapsdRequestedForVideo() const; |
|
707 void UapsdRequestedForVideo( TBool aValue ); |
|
708 |
|
709 inline TBool UapsdRequestedForBestEffort() const; |
|
710 void UapsdRequestedForBestEffort( TBool aValue ); |
|
711 |
|
712 inline TBool UapsdRequestedForBackground() const; |
|
713 void UapsdRequestedForBackground( TBool aValue ); |
|
714 |
|
715 inline TBool UapsdUsedForVoice() const; |
|
716 void UapsdUsedForVoice( TBool aValue ); |
|
717 |
|
718 inline TBool UapsdUsedForVideo() const; |
|
719 void UapsdUsedForVideo( TBool aValue ); |
|
720 |
|
721 inline TBool UapsdUsedForBestEffort() const; |
|
722 void UapsdUsedForBestEffort( TBool aValue ); |
|
723 |
|
724 inline TBool UapsdUsedForBackground() const; |
|
725 void UapsdUsedForBackground( TBool aValue ); |
|
726 |
|
727 inline TBool ApTestOpportunitySeekStarted() const; |
|
728 void ApTestOpportunitySeekStarted( TBool aValue ); |
|
729 |
|
730 inline TBool ApTestOpportunityIndicated() const; |
|
731 void ApTestOpportunityIndicated( TBool aValue ); |
|
732 |
|
733 inline TBool HtSupportedByNw() const; |
|
734 void HtSupportedByNw( TBool aValue ); |
|
735 |
|
736 inline TUint8 WmmParameterSetCount() const; |
|
737 inline void WmmParameterSetCount( TUint8 aValue ); |
|
738 |
|
739 inline TUint32 RateBitMask() const; |
|
740 inline void RateBitMask( TUint32 aValue ); |
|
741 |
|
742 inline TCwMinVector& CwMinVector(); |
|
743 inline TCwMaxVector& CwMaxVector(); |
|
744 inline TAifsVector& AifsVector(); |
|
745 inline TTxOplimitVector& TxOplimitVector(); |
|
746 inline TAcmVector& AcmVector(); |
|
747 /** |
|
748 * Returns our Wmm IE |
|
749 * @return WMM IE |
|
750 */ |
|
751 inline STxWmmIE& OurWmmIe(); |
|
752 |
|
753 /** |
|
754 * Returns the WLAN Mgmt client provided Tx rate policy |
|
755 * |
|
756 * @since S60 3.1 |
|
757 * @return Tx rate policy |
|
758 */ |
|
759 inline TTxRatePolicy& RatePolicy(); |
|
760 |
|
761 /** |
|
762 * Returns the WLAN Mgmt client provided Tx queue to Tx rate policy mapping |
|
763 * |
|
764 * @since S60 3.1 |
|
765 * @return Tx queue to Tx rate policy mapping |
|
766 */ |
|
767 inline TQueue2RateClass& Queue2RateClass(); |
|
768 |
|
769 /** |
|
770 * Returns the WLAN Mgmt client provided initial max Tx rate for every |
|
771 * Mgmt client provided rate policy object |
|
772 * |
|
773 * @since S60 3.1 |
|
774 * @return initial max Tx rate for every relevant Tx rate policy object |
|
775 */ |
|
776 inline TInitialMaxTxRate4RateClass& InitialMaxTxRate4RateClass(); |
|
777 |
|
778 /** |
|
779 * Returns the WLAN Mgmt client provided Tx auto rate policy |
|
780 * |
|
781 * @return Tx auto rate policy |
|
782 */ |
|
783 inline TTxAutoRatePolicy& AutoRatePolicy(); |
|
784 |
|
785 /** |
|
786 * Returns the ID of the special Tx auto rate policy |
|
787 * Returns zero if a special Tx auto rate policy is not available |
|
788 * |
|
789 * @return the ID of the special Tx auto rate policy, or zero |
|
790 */ |
|
791 inline TUint8 SpecialTxAutoRatePolicy() const; |
|
792 |
|
793 /** |
|
794 * Sets the ID of the special Tx auto rate policy |
|
795 * |
|
796 * @param aPolicyId the ID of the special Tx auto rate policy. Zero |
|
797 * if a special Tx auto rate policy is not available |
|
798 */ |
|
799 inline void SpecialTxAutoRatePolicy( TUint8 aPolicyId ); |
|
800 |
|
801 /** |
|
802 * Returns the WLAN Mgmt client provided HT MCS policy |
|
803 * |
|
804 * @since S60 3.1 |
|
805 * @return Tx rate policy |
|
806 */ |
|
807 inline THtMcsPolicy& HtMcsPolicy(); |
|
808 |
|
809 /** |
|
810 * Returns the WLAN Mgmt client provided Maximum U-APSD Service Period |
|
811 * length |
|
812 * |
|
813 * @since S60 3.2 |
|
814 * @return Maximum U-APSD Service Period length |
|
815 */ |
|
816 inline TQosInfoUapsdMaxSpLen& UapsdMaxSpLen(); |
|
817 |
|
818 inline TUint32 WhaCommandAct() const; |
|
819 inline void WhaCommandAct( TUint32 aAct ); |
|
820 |
|
821 inline TUint32 Random(); |
|
822 |
|
823 /** |
|
824 * Returns reference to the authentication algorithm number to be used |
|
825 * @return authentication algorithm number |
|
826 */ |
|
827 inline TUint16& AuthenticationAlgorithmNumber(); |
|
828 |
|
829 /** |
|
830 * To be called upon every Tx frame send completion |
|
831 * @param aRate actual rate transmitted |
|
832 * @param aSuccess was the frame transmitted successfully or not |
|
833 * @param aRequestedRate Tx rate that was originally requested |
|
834 */ |
|
835 inline void OnTxCompleted( |
|
836 const TUint32 aRate, |
|
837 const TBool aSuccess, |
|
838 WHA::TQueueId aQueueId, |
|
839 WHA::TRate aRequestedRate ); |
|
840 |
|
841 /** |
|
842 * Gets buffer for Rx data |
|
843 * |
|
844 * @param aLengthinBytes Requested length of the buffer |
|
845 * @param aInternal ETrue if the buffer request was triggered inside UMAC |
|
846 * EFalse if it was triggered from WHA layer |
|
847 * @return Pointer to the beginning of the buffer on success |
|
848 * NULL if a buffer couldn't be allocated |
|
849 */ |
|
850 TUint8* GetRxBuffer( |
|
851 const TUint16 aLengthinBytes, |
|
852 TBool aInternal = EFalse ); |
|
853 |
|
854 /** |
|
855 * Allocates Rx frame meta header |
|
856 * @return Rx frame meta header upon success |
|
857 * NULL otherwise |
|
858 */ |
|
859 TDataBuffer* GetRxFrameMetaHeader(); |
|
860 |
|
861 /** |
|
862 * Deallocates Rx frame meta header |
|
863 * @param aMetaHeader Meta header to deallocate |
|
864 */ |
|
865 void FreeRxFrameMetaHeader( TDataBuffer* aMetaHeader ); |
|
866 |
|
867 TUint8* TxBuffer( TBool aWaitIfNotFree = EFalse ); |
|
868 |
|
869 /** |
|
870 * Cancels the default timer |
|
871 */ |
|
872 inline void CancelTimer(); |
|
873 |
|
874 /** |
|
875 * Gets the authentication sequence number expected |
|
876 * @return authentication sequence number expected |
|
877 */ |
|
878 inline TUint8 GetAuthSeqNmbrExpected() const; |
|
879 |
|
880 /** |
|
881 * Gets our supported rates IE |
|
882 * @return supported rates IE |
|
883 */ |
|
884 inline SSupportedRatesIE& GetOurSupportedRatesIE(); |
|
885 |
|
886 /** |
|
887 * Gets our extended supported rates IE |
|
888 * @return extended supported rates IE |
|
889 */ |
|
890 inline SExtendedSupportedRatesIE& GetOurExtendedSupportedRatesIE(); |
|
891 |
|
892 /** |
|
893 * Stores a Beacon or Probe Response frame body from the |
|
894 * network we are going to connect to |
|
895 * |
|
896 * @since S60 3.2 |
|
897 * @param aBody pointer to the frame body |
|
898 */ |
|
899 inline void SetScanResponseFrameBody( const TUint8* aBody ); |
|
900 |
|
901 /** |
|
902 * Returns a pointer to a Beacon or Probe Response frame body from the |
|
903 * network we are going to connect to |
|
904 * |
|
905 * @since S60 3.2 |
|
906 * @return pointer to the frame body |
|
907 */ |
|
908 inline const TUint8* ScanResponseFrameBody() const; |
|
909 |
|
910 /** |
|
911 * Stores a Beacon or Probe Response frame body length |
|
912 * |
|
913 * @since S60 3.2 |
|
914 * @param aLength frame body length |
|
915 */ |
|
916 inline void SetScanResponseFrameBodyLength( TUint16 aLength ); |
|
917 |
|
918 /** |
|
919 * Returns the length of a Beacon or Probe Response frame body from the |
|
920 * network we are going to connect to |
|
921 * |
|
922 * @since S60 3.2 |
|
923 * @return length of the frame body |
|
924 */ |
|
925 inline const TUint16 ScanResponseFrameBodyLength() const; |
|
926 |
|
927 /** |
|
928 * Stores the IE(s) to be included into the (re-)association request. |
|
929 * |
|
930 * @since S60 3.2 |
|
931 * @param aIeData pointer to the IE(s). NULL, if none to be included |
|
932 */ |
|
933 inline void IeData( const TUint8* aIeData ); |
|
934 |
|
935 /** |
|
936 * Returns the IE(s) to be included into the (re-)association request. |
|
937 * |
|
938 * @since S60 3.2 |
|
939 * @return pointer to the IE(s). NULL, if none to be included |
|
940 */ |
|
941 inline const TUint8* IeData() const; |
|
942 |
|
943 /** |
|
944 * Stores the length of the IE(s) to be included into the (re-)association |
|
945 * request. |
|
946 * |
|
947 * @since S60 3.2 |
|
948 * @param aIeDataLength length of the IE(s) |
|
949 */ |
|
950 inline void IeDataLength( TUint16 aIeDataLength ); |
|
951 |
|
952 /** |
|
953 * Returns the length of the IE(s) to be included into the (re-)association |
|
954 * request. |
|
955 * |
|
956 * @since S60 3.2 |
|
957 * @return length of the IE(s) |
|
958 */ |
|
959 inline TUint16 IeDataLength() const; |
|
960 |
|
961 /** |
|
962 * Stores the Radio Measurement value to be included into the (re-)association |
|
963 * request. |
|
964 * |
|
965 * @since S60 9.2 |
|
966 * @param aRadioMeasurement True if Measurement on, otherwise false |
|
967 */ |
|
968 inline void RadioMeasurement( TBool aRadioMeasurement ); |
|
969 |
|
970 /** |
|
971 * Returns the Radio Measurement value to be included into the (re-)association |
|
972 * request. |
|
973 * |
|
974 * @since S60 9.2 |
|
975 * @return Radio Measurement setting |
|
976 */ |
|
977 inline TBool RadioMeasurement() const; |
|
978 |
|
979 /** |
|
980 * Sets desired privacy mode filter |
|
981 * @param aEncryptionStatus desired privacy mode |
|
982 */ |
|
983 inline void SetActivePrivacyModeFilter( |
|
984 WlanContextImpl& aCtxImpl, |
|
985 TEncryptionStatus aEncryptionStatus ); |
|
986 |
|
987 /** |
|
988 * Executes current privacy mode filter |
|
989 * @param aFrameheader Header of the received frame |
|
990 * @param aUserDataEnabled is protocol stack side datapath |
|
991 * enabled or not |
|
992 * @param aEthernetType Ethernet Type of the received frame |
|
993 * @param aUnicastKeyExists AP <-> client unicast key |
|
994 * is configured or not |
|
995 * @param aAesOrTkipOrWapiEncrypted ETrue if the frame is encrypted with AES, |
|
996 * TKIP or WAPI, EFalse otherwise |
|
997 * @return ETrue if frame can be accepted, EFalse otherwise |
|
998 */ |
|
999 inline TBool ExecuteActivePrivacyModeFilter( |
|
1000 const SDataFrameHeader& aFrameheader, |
|
1001 TBool aUserDataEnabled, |
|
1002 TUint16 aEthernetType, |
|
1003 TBool aUnicastKeyExists, |
|
1004 TBool aAesOrTkipOrWapiEncrypted ) const; |
|
1005 |
|
1006 /** |
|
1007 * Gets capability information field |
|
1008 * @return capability information field |
|
1009 */ |
|
1010 inline SCapabilityInformationField& GetCapabilityInformation(); |
|
1011 |
|
1012 /** |
|
1013 * Resets BSS loss indication flags. |
|
1014 */ |
|
1015 inline void ResetBssLossIndications(); |
|
1016 |
|
1017 /** |
|
1018 * Gets AP advertised supported rates IE |
|
1019 * @return supported rates IE |
|
1020 */ |
|
1021 inline SSupportedRatesIE& GetApSupportedRatesIE(); |
|
1022 |
|
1023 /** |
|
1024 * Gets AP advertised extended supported rates IE |
|
1025 * @return extended supported rates IE |
|
1026 */ |
|
1027 inline SExtendedSupportedRatesIE& GetApExtendedSupportedRatesIE(); |
|
1028 |
|
1029 /** Resets Tx rate adaptation object */ |
|
1030 inline void ResetTxRateAdaptation(); |
|
1031 |
|
1032 /** |
|
1033 * Gets min basic rate of BSS |
|
1034 * @return min basic rate of BSS |
|
1035 */ |
|
1036 inline TUint32& GetMinBasicRate(); |
|
1037 |
|
1038 inline TUint32& GetMaxBasicRate(); |
|
1039 |
|
1040 inline void ClearBasicRateSet(); |
|
1041 inline void BasicRateSetBitSet( const TUint32 aRateBitToSet ); |
|
1042 inline TUint32 BasicRateSet() const; |
|
1043 |
|
1044 inline TBool WsaCmdActive() const; |
|
1045 inline void ActivateWsaCmd(); |
|
1046 inline void DeActivateWsaCmd(); |
|
1047 |
|
1048 /** |
|
1049 * Increments authentication sequnece expected counter |
|
1050 * to next expected sequence number |
|
1051 */ |
|
1052 inline void IncrementAuthSeqNmbrExpected(); |
|
1053 |
|
1054 /** |
|
1055 * Sets the rate adaptation object |
|
1056 */ |
|
1057 inline TBool SetTxRateAdaptationRates( |
|
1058 TUint8 aPolicyId, |
|
1059 WHA::TRate aRateBitmask ); |
|
1060 |
|
1061 /** |
|
1062 * Sets the Tx rate adaptation policy to be used with the specified Tx queue |
|
1063 * @param aQueueId id of the Tx queue |
|
1064 * @param aPolicyId id of the Tx rate policy |
|
1065 */ |
|
1066 inline void SetTxRatePolicy( WHA::TQueueId aQueueId, TUint8 aPolicyId ); |
|
1067 |
|
1068 /** |
|
1069 * Sets the current max Tx rate which should be initially used when sending |
|
1070 * frames using the specified Tx rate policy. |
|
1071 * If this rate is not present in the specified rate policy, or if |
|
1072 * it is not supported either by the nw or by WHA layer, the next possible |
|
1073 * lower rate will be used instead. |
|
1074 * However, if the specified rate is lower that any rate in the specified |
|
1075 * rate policy, the lowest rate in the policy will be used. |
|
1076 * |
|
1077 * @since S60 3.1 |
|
1078 * @param aPolicyId id of the Tx rate policy |
|
1079 * @param aRate initial max Tx rate |
|
1080 */ |
|
1081 inline void SetCurrentMaxTxRate( TUint8 aPolicyId, WHA::TRate aRate ); |
|
1082 |
|
1083 /** |
|
1084 * Sets the Tx rate adaptation algorithm parameters |
|
1085 * |
|
1086 * @since S60 3.1 |
|
1087 * @param aMinStepUpCheckpoint minimum and initial rate increase |
|
1088 * checkpoint in units of frames |
|
1089 * Range: [aStepDownCheckpoint,aMaxStepUpCheckpoint] |
|
1090 * @param aMaxStepUpCheckpoint maximum rate increase checkpoint in units |
|
1091 * of frames |
|
1092 * Range: [aStepDownCheckpoint,UCHAR_MAX] |
|
1093 * @param aStepUpCheckpointFactor StepUpCheckpoint is multiplied with this |
|
1094 * value if sending a probe frame fails |
|
1095 * Range: [1,aMaxStepUpCheckpoint] |
|
1096 * @param aStepDownCheckpoint after this many frames the need to decrease |
|
1097 * the rate is checked |
|
1098 * Range: [2,UCHAR_MAX] |
|
1099 * @param aMinStepUpThreshold minimum and initial StepUpThreshold |
|
1100 * percentage |
|
1101 * Range: [1,aMaxStepUpThreshold] |
|
1102 * @param aMaxStepUpThreshold maximum StepUpThreshold percentage |
|
1103 * Range: [1,100] |
|
1104 * @param aStepUpThresholdIncrement StepUpThreshold is incremented by this |
|
1105 * value if sending a probe frame fails |
|
1106 * Range: [0,aMaxStepUpThreshold] |
|
1107 * @param aStepDownThreshold if the percentage of frames which failed to |
|
1108 * be transmitted at the originally requested rate is at least |
|
1109 * aStepDownThreshold at the aStepDownCheckpoint, the rate will |
|
1110 * be decreased |
|
1111 * Range: [1,100] |
|
1112 * @param aDisableProbeHandling if EFalse, the rate adaptation algorithm |
|
1113 * handles the first frame transmitted after a rate increase in a |
|
1114 * special way. Otherwise the special handling is disabled |
|
1115 */ |
|
1116 inline void SetTxRateAdaptationAlgorithmParams( |
|
1117 TUint8 aMinStepUpCheckpoint, |
|
1118 TUint8 aMaxStepUpCheckpoint, |
|
1119 TUint8 aStepUpCheckpointFactor, |
|
1120 TUint8 aStepDownCheckpoint, |
|
1121 TUint8 aMinStepUpThreshold, |
|
1122 TUint8 aMaxStepUpThreshold, |
|
1123 TUint8 aStepUpThresholdIncrement, |
|
1124 TUint8 aStepDownThreshold, |
|
1125 TBool aDisableProbeHandling ); |
|
1126 |
|
1127 /** |
|
1128 * To be called when BSS Lost indication is received from WLAN PDD |
|
1129 * |
|
1130 * @since S60 5.0 |
|
1131 * @return ETrue if Consecutive Beacons Lost indication needs to be sent to |
|
1132 * WLAN Mgmt Client |
|
1133 * EFalse otherwise |
|
1134 */ |
|
1135 inline TBool OnConsecutiveBeaconsLost(); |
|
1136 |
|
1137 /** |
|
1138 * To be called after more than threshold number of consecutive Tx failures |
|
1139 * |
|
1140 * @since S60 5.0 |
|
1141 * @return ETrue if Consecutive Tx Failures indication needs to be sent to |
|
1142 * WLAN Mgmt Client |
|
1143 * EFalse otherwise |
|
1144 */ |
|
1145 inline TBool OnConsecutiveTxFailures(); |
|
1146 |
|
1147 /** |
|
1148 * To be called after more than threshold number of consecutive 802.11 Power |
|
1149 * Mgmt Mode setting failures |
|
1150 * |
|
1151 * @since S60 5.0 |
|
1152 * @return ETrue if Consecutive Power Mode Set Failures indication needs to |
|
1153 * be sent to WLAN Mgmt Client |
|
1154 * EFalse otherwise |
|
1155 */ |
|
1156 inline TBool OnConsecutivePwrModeSetFailures(); |
|
1157 |
|
1158 /** |
|
1159 * To be called when we have successfully communicated with the current AP |
|
1160 * |
|
1161 * @since S60 3.1 |
|
1162 * @return ETrue if BSS Regained indication needs to be sent to WLAN Mgmt |
|
1163 * Client |
|
1164 * EFalse otherwise |
|
1165 */ |
|
1166 TBool OnBssRegained(); |
|
1167 |
|
1168 /** |
|
1169 * Pushes a packet to the packet scheduler |
|
1170 * |
|
1171 * @since S60 3.1 |
|
1172 * @param aPacket the packet to transmit |
|
1173 * @param aLength length of the packet |
|
1174 * @param aQueueId id of the queue to use when sending the packet |
|
1175 * @param aPacketId frame type |
|
1176 * @param aMetaHeader frame meta header |
|
1177 * @param aMore ETrue if another frame is also ready to be transmitted |
|
1178 * EFalse otherwise |
|
1179 * @param aMulticastData ETrue if this is a multicast data frame |
|
1180 * @param aUseSpecialRatePolicy ETrue if use of the special Tx rate |
|
1181 * policy is requested for this frame Tx |
|
1182 * @return ETrue packet was accepted, EFalse otherwise |
|
1183 */ |
|
1184 inline TBool PushPacketToPacketScheduler( |
|
1185 const TAny* aPacket, |
|
1186 TUint32 aLength, |
|
1187 WHA::TQueueId aQueueId, |
|
1188 TUint32 aPacketId, |
|
1189 const TDataBuffer* aMetaHeader, |
|
1190 TBool aMore, |
|
1191 TBool aMulticastData, |
|
1192 TBool aUseSpecialRatePolicy = EFalse ); |
|
1193 |
|
1194 /** |
|
1195 * Removes all pending packet transmission entrys from |
|
1196 * the packet scheduler |
|
1197 * |
|
1198 * @since S60 3.1 |
|
1199 */ |
|
1200 inline void FlushPacketScheduler(); |
|
1201 |
|
1202 /** |
|
1203 * Schedules a packet and sends it if possible. |
|
1204 * If no packets to schedule exists does nothing |
|
1205 * If packet was send it is removed from the storage |
|
1206 * |
|
1207 * @since S60 3.1 |
|
1208 * @param aMore ETrue if another frame is also ready to be transmitted |
|
1209 * EFalse otherwise |
|
1210 */ |
|
1211 inline void SchedulePackets( TBool aMore ); |
|
1212 |
|
1213 /** |
|
1214 * Are there unsent Tx packets, i.e. packets not yet completed by WHA |
|
1215 * layer |
|
1216 * |
|
1217 * @since S60 3.2 |
|
1218 * @return ETrue if there are packets not yet completed by WHA layer |
|
1219 * EFalse otherwise |
|
1220 */ |
|
1221 inline TBool UnsentTxPackets() const; |
|
1222 |
|
1223 /** |
|
1224 * Increments the failed Tx packet counter |
|
1225 * |
|
1226 * @since S60 3.1 |
|
1227 */ |
|
1228 inline void IncrementFailedTxPacketCount(); |
|
1229 |
|
1230 /** |
|
1231 * Returns the value of failed Tx packet counter |
|
1232 * |
|
1233 * @since S60 3.1 |
|
1234 */ |
|
1235 inline TUint8 FailedTxPacketCount() const; |
|
1236 |
|
1237 /** |
|
1238 * Resets the failed Tx packet counter |
|
1239 * |
|
1240 * @since S60 3.1 |
|
1241 */ |
|
1242 inline void ResetFailedTxPacketCount(); |
|
1243 |
|
1244 /** |
|
1245 * Initializes the set power mgmt mode counter |
|
1246 * |
|
1247 * @since S60 3.1 |
|
1248 */ |
|
1249 inline void InitializeSetPsModeCount(); |
|
1250 |
|
1251 /** |
|
1252 * Decrements the set power mgmt mode counter by one |
|
1253 * |
|
1254 * @since S60 3.1 |
|
1255 */ |
|
1256 inline void DecrementSetPsModeCount(); |
|
1257 |
|
1258 /** |
|
1259 * Returns the value of the set power mgmt mode counter |
|
1260 * |
|
1261 * @since S60 3.1 |
|
1262 * @return Set power mgmt mode counter value |
|
1263 */ |
|
1264 inline TUint SetPsModeCount() const; |
|
1265 |
|
1266 /** |
|
1267 * Starts dynamic power mode management |
|
1268 * |
|
1269 * @since S60 3.1 |
|
1270 */ |
|
1271 inline void StartPowerModeManagement(); |
|
1272 |
|
1273 /** |
|
1274 * Stops dynamic power mode management |
|
1275 * |
|
1276 * @since S60 3.1 |
|
1277 */ |
|
1278 inline void StopPowerModeManagement(); |
|
1279 |
|
1280 /** |
|
1281 * To be called when transmitting a user data or WLAN Management Client frame |
|
1282 * |
|
1283 * Informs Dynamic Power Mode Manager about frame Tx. |
|
1284 * Determines the need to make a power mode transition. |
|
1285 * |
|
1286 * @since S60 3.1 |
|
1287 * @param aQueueId Id of the queue/AC via which the frame will be |
|
1288 * transmitted |
|
1289 * @param aEtherType Ethernet type of the frame |
|
1290 * @return To which power management mode to change; if any at all |
|
1291 */ |
|
1292 inline TPowerMgmtModeChange OnFrameTx( |
|
1293 WHA::TQueueId aQueueId, |
|
1294 TUint16 aEtherType ); |
|
1295 |
|
1296 /** |
|
1297 * To be called when accepting an Rx frame |
|
1298 * |
|
1299 * @since S60 3.1 |
|
1300 * @param aAccessCategory AC/Queue via which the frame has beeen transmitted |
|
1301 * @param aEtherType Ethernet type of the received frame |
|
1302 * @param aPayloadLength length of the ethernet frame payload |
|
1303 * @param aDaType DA type (Unicast, Multicast or Broadcast) of the frame |
|
1304 * @return To which power management mode to change; if any at all |
|
1305 */ |
|
1306 inline TPowerMgmtModeChange OnFrameRx( |
|
1307 WHA::TQueueId aAccessCategory, |
|
1308 TUint16 aEtherType, |
|
1309 TUint aPayloadLength, |
|
1310 TDaType aDaType ); |
|
1311 |
|
1312 /** |
|
1313 * Sets the dynamic power mode transition algorithm parameters |
|
1314 * |
|
1315 * @since S60 3.1 |
|
1316 * @param aCtxImpl statemachine context |
|
1317 * @param aToLightPsTimeout time interval in microseconds after which |
|
1318 * transition from Active mode to Light PS mode is considered |
|
1319 * @param aToLightPsFrameThreshold frame count threshold used when |
|
1320 * considering transition from Active to Light PS mode |
|
1321 * @param aToActiveTimeout time interval in microseconds after which the |
|
1322 * frame counter used when considering transition from Light PS |
|
1323 * to Active mode is reset |
|
1324 * @param aToActiveFrameThreshold frame count threshold used when |
|
1325 * considering transition from Light PS to Active mode |
|
1326 * @param aToDeepPsTimeout time interval in microseconds after which |
|
1327 * transition from Light PS mode to Deep PS mode is considered |
|
1328 * @param aToDeepPsFrameThreshold frame count threshold used when |
|
1329 * considering transition from Light PS to Deep PS mode |
|
1330 * @param aUapsdRxFrameLengthThreshold received frame |
|
1331 * payload length (in bytes) threshold in U-APSD network for |
|
1332 * Best Effort Access Category |
|
1333 * @return ETrue if a state change occurred |
|
1334 * EFalse otherwise |
|
1335 */ |
|
1336 inline void SetPowerModeManagementParameters( |
|
1337 TUint32 aToLightPsTimeout, |
|
1338 TUint16 aToLightPsFrameThreshold, |
|
1339 TUint32 aToActiveTimeout, |
|
1340 TUint16 aToActiveFrameThreshold, |
|
1341 TUint32 aToDeepPsTimeout, |
|
1342 TUint16 aToDeepPsFrameThreshold, |
|
1343 TUint16 aUapsdRxFrameLengthThreshold ); |
|
1344 |
|
1345 /** |
|
1346 * Configures dynamic power mode management traffic override |
|
1347 * |
|
1348 * The settings here become effective once using the PS mode has been |
|
1349 * allowed by WLAN Mgmt Client. |
|
1350 * When a setting below is ETrue, any amount of Rx or Tx traffic via |
|
1351 * the AC in question won't cause a change from PS to CAM mode once PS |
|
1352 * mode has been entered, and traffic via that AC won't make us to |
|
1353 * stay in CAM either. |
|
1354 * Every AC has a separate setting for U-APSD and legacy PS. |
|
1355 * The U-APSD setting is used if U-APSD is used for the AC in question. |
|
1356 * Otherwise the corresponding legacy setting is used. |
|
1357 * |
|
1358 * @since S60 3.2 |
|
1359 * @param aCtxImpl statemachine context |
|
1360 * @param aStayInPsDespiteUapsdVoiceTraffic U-APSD Voice AC setting |
|
1361 * @param aStayInPsDespiteUapsdVideoTraffic U-APSD Video AC setting |
|
1362 * @param aStayInPsDespiteUapsdBestEffortTraffic U-APSD Best Effort AC |
|
1363 * setting |
|
1364 * @param aStayInPsDespiteUapsdBackgroundTraffic U-APSD Background AC |
|
1365 * setting |
|
1366 * @param aStayInPsDespiteLegacyVoiceTraffic legacy Voice AC setting |
|
1367 * @param aStayInPsDespiteLegacyVideoTraffic legacy Video AC setting |
|
1368 * @param aStayInPsDespiteLegacyBestEffortTraffic legacy Best Effort AC |
|
1369 * setting |
|
1370 * @param aStayInPsDespiteLegacyBackgroundTraffic legacy Background AC |
|
1371 * setting |
|
1372 * @return ETrue if a state change occurred |
|
1373 * EFalse otherwise |
|
1374 */ |
|
1375 inline void ConfigurePwrModeMgmtTrafficOverride( |
|
1376 TBool aStayInPsDespiteUapsdVoiceTraffic, |
|
1377 TBool aStayInPsDespiteUapsdVideoTraffic, |
|
1378 TBool aStayInPsDespiteUapsdBestEffortTraffic, |
|
1379 TBool aStayInPsDespiteUapsdBackgroundTraffic, |
|
1380 TBool aStayInPsDespiteLegacyVoiceTraffic, |
|
1381 TBool aStayInPsDespiteLegacyVideoTraffic, |
|
1382 TBool aStayInPsDespiteLegacyBestEffortTraffic, |
|
1383 TBool aStayInPsDespiteLegacyBackgroundTraffic ); |
|
1384 |
|
1385 /** |
|
1386 * Freezes the dynamic power mode management traffic override settings |
|
1387 * provided earlier with the ConfigurePwrModeMgmtTrafficOverride() method |
|
1388 * and based on whether U-APSD is used for the different ACs/Tx queues |
|
1389 * |
|
1390 * @since S60 3.2 |
|
1391 */ |
|
1392 inline void FreezePwrModeMgmtTrafficOverride(); |
|
1393 |
|
1394 /** |
|
1395 * To be called upon Active to Light PS timer timeout |
|
1396 * |
|
1397 * @since S60 v5.1 |
|
1398 * @return ETrue if power mode transition should be done, |
|
1399 * EFalse otherwise |
|
1400 */ |
|
1401 inline TBool OnActiveToLightPsTimerTimeout(); |
|
1402 |
|
1403 /** |
|
1404 * To be called upon Light PS to Active timer timeout |
|
1405 * |
|
1406 * @since S60 v5.1 |
|
1407 * @return ETrue if power mode transition should be done, |
|
1408 * EFalse otherwise |
|
1409 */ |
|
1410 inline TBool OnLightPsToActiveTimerTimeout(); |
|
1411 |
|
1412 /** |
|
1413 * To be called upon Light PS to Deep PS timer timeout |
|
1414 * |
|
1415 * @since S60 v5.1 |
|
1416 * @return ETrue if power mode transition should be done, |
|
1417 * EFalse otherwise |
|
1418 */ |
|
1419 inline TBool OnLightPsToDeepPsTimerTimeout(); |
|
1420 |
|
1421 /** |
|
1422 * Adds a multicast (Rx) address to our internal bookkeeping. |
|
1423 * @param aMacAddress Address to be added |
|
1424 * @return See TGroupAddStatus definition. |
|
1425 */ |
|
1426 inline TGroupAddStatus AddMulticastAddress( |
|
1427 const TMacAddress& aMacAddress ); |
|
1428 |
|
1429 /** |
|
1430 * Removes a multicast (Rx) address from our internal bookkeeping. |
|
1431 * @param aMacAddress MAC address to be removed |
|
1432 * @return ETrue if address was found (and hence removed) |
|
1433 * EFalse otherwise |
|
1434 */ |
|
1435 inline TBool RemoveMulticastAddress( const TMacAddress& aMacAddress ); |
|
1436 |
|
1437 /** |
|
1438 * Returns the number of multicast (Rx) addresses that exist in our |
|
1439 * internal bookkeeping currently |
|
1440 * @return Address count |
|
1441 */ |
|
1442 inline TUint8 MulticastAddressCount() const; |
|
1443 |
|
1444 /** |
|
1445 * Gets all the multicast (Rx) addresses from our internal bookkeeping |
|
1446 * by passing back a pointer to the 1st address which is followed by |
|
1447 * all the other addresses. |
|
1448 * @return The number of addresses returned. |
|
1449 */ |
|
1450 inline TUint8 GetMulticastAddresses( |
|
1451 const TMacAddress*& aMacAddresses ) const; |
|
1452 |
|
1453 /** |
|
1454 * Clears our internal multicast (Rx) address bookkeeping by removing |
|
1455 * all addresses. |
|
1456 */ |
|
1457 inline void ResetMulticastAddresses(); |
|
1458 |
|
1459 inline void MarkInternalTxBufFree(); |
|
1460 |
|
1461 inline TBool InternalTxBufBeingWaited() const; |
|
1462 |
|
1463 inline void ClearInternalTxBufBeingWaitedFlag(); |
|
1464 |
|
1465 /** |
|
1466 * Resets frame statistics |
|
1467 * |
|
1468 * @since S60 3.2 |
|
1469 */ |
|
1470 inline void ResetFrameStatistics(); |
|
1471 |
|
1472 /** |
|
1473 * Increments Rx unicast data frame count by one |
|
1474 * |
|
1475 * @since S60 3.2 |
|
1476 * @param aAccessCategory AC/Queue via which the frame was transmitted |
|
1477 */ |
|
1478 inline void IncrementRxUnicastDataFrameCount( |
|
1479 WHA::TQueueId aAccessCategory ); |
|
1480 |
|
1481 /** |
|
1482 * Increments Tx unicast data frame count by one |
|
1483 * |
|
1484 * @since S60 3.2 |
|
1485 * @param aAccessCategory AC/Queue via which the frame was transmitted |
|
1486 */ |
|
1487 inline void IncrementTxUnicastDataFrameCount( |
|
1488 WHA::TQueueId aAccessCategory ); |
|
1489 |
|
1490 /** |
|
1491 * Increments Rx multicast data frame count by one |
|
1492 * |
|
1493 * @since S60 3.2 |
|
1494 * @param aAccessCategory AC/Queue via which the frame was transmitted |
|
1495 */ |
|
1496 inline void IncrementRxMulticastDataFrameCount( |
|
1497 WHA::TQueueId aAccessCategory ); |
|
1498 |
|
1499 /** |
|
1500 * Increments Tx multicast data frame count by one |
|
1501 * |
|
1502 * @since S60 3.2 |
|
1503 * @param aAccessCategory AC/Queue via which the frame was transmitted |
|
1504 */ |
|
1505 inline void IncrementTxMulticastDataFrameCount( |
|
1506 WHA::TQueueId aAccessCategory ); |
|
1507 |
|
1508 /** |
|
1509 * Increments Tx frame retry count by aCount |
|
1510 * |
|
1511 * @since S60 3.2 |
|
1512 * @param aAccessCategory AC/Queue via which the frame was transmitted |
|
1513 * @param aCount number to add to the current count |
|
1514 */ |
|
1515 inline void IncrementTxRetryCount( |
|
1516 WHA::TQueueId aAccessCategory, |
|
1517 TUint aCount ); |
|
1518 |
|
1519 /** |
|
1520 * Increments Tx error count by one |
|
1521 * |
|
1522 * @since S60 3.2 |
|
1523 * @param aAccessCategory AC/Queue via which the frame was transmitted |
|
1524 */ |
|
1525 inline void IncrementTxErrorCount(WHA::TQueueId aAccessCategory ); |
|
1526 |
|
1527 /** |
|
1528 * Increments cumulative Tx Media Delay by aDelay |
|
1529 * |
|
1530 * @since S60 3.2 |
|
1531 * @param aAccessCategory AC/Queue via which the frame was transmitted |
|
1532 * @param aDelay Amount of delay to add to the current cumulative delay |
|
1533 */ |
|
1534 inline void IncrementTxMediaDelay( |
|
1535 WHA::TQueueId aAccessCategory, |
|
1536 TUint aDelay ); |
|
1537 |
|
1538 /** |
|
1539 * Returns the average Tx Media Delay of the specified Access Category |
|
1540 * |
|
1541 * Note! When this method is called the txMediaDelay field shall contain |
|
1542 * the cumulative Tx Media Delay. |
|
1543 * |
|
1544 * @since S60 3.2 |
|
1545 * @param aAccessCategory AC/Queue for which the average is requested |
|
1546 * @return Average Tx Media Delay |
|
1547 */ |
|
1548 TUint AverageTxMediaDelay( WHA::TQueueId aAccessCategory ) const; |
|
1549 |
|
1550 /** |
|
1551 * Calculates the average Tx Media Delay for all Access Categories |
|
1552 * and stores the results into frame statistics results |
|
1553 * |
|
1554 * @since S60 3.2 |
|
1555 */ |
|
1556 void CalculateAverageTxMediaDelays(); |
|
1557 |
|
1558 /** |
|
1559 * Increments cumulative Total Tx Delay by aDelay |
|
1560 * |
|
1561 * @since S60 3.2 |
|
1562 * @param aAccessCategory AC/Queue via which the frame was transmitted |
|
1563 * @param aDelay Amount of delay to add to the current cumulative delay |
|
1564 */ |
|
1565 inline void IncrementTotalTxDelay( |
|
1566 WHA::TQueueId aAccessCategory, |
|
1567 TUint aDelay ); |
|
1568 |
|
1569 /** |
|
1570 * Updates Total Tx Delay histogram |
|
1571 * |
|
1572 * @since S60 3.2 |
|
1573 * @param aAccessCategory AC/Queue via which the frame was transmitted |
|
1574 * @param aDelay Total Tx Delay of the frame |
|
1575 */ |
|
1576 void UpdateTotalTxDelayHistogram( |
|
1577 WHA::TQueueId aAccessCategory, |
|
1578 TUint aDelay ); |
|
1579 |
|
1580 /** |
|
1581 * Returns the average Total Tx Delay of the specified Access Category |
|
1582 * |
|
1583 * Note! When this method is called the totalTxDelay field shall contain |
|
1584 * the cumulative Total Tx Delay. |
|
1585 |
|
1586 * @since S60 3.2 |
|
1587 * @param aAccessCategory AC/Queue for which the average is requested |
|
1588 * @return Average Total Tx Delay |
|
1589 */ |
|
1590 TUint AverageTotalTxDelay( WHA::TQueueId aAccessCategory ) const; |
|
1591 |
|
1592 /** |
|
1593 * Calculates the average Total Tx Delay for all Access Categories |
|
1594 * and stores the results into frame statistics results |
|
1595 * |
|
1596 * @since S60 3.2 |
|
1597 */ |
|
1598 void CalculateAverageTotalTxDelays(); |
|
1599 |
|
1600 /** |
|
1601 * Stores FCS error count recorded in received MPDUs |
|
1602 * |
|
1603 * @since S60 3.2 |
|
1604 * @param aCount the value to set |
|
1605 */ |
|
1606 inline void StoreFcsErrorCount( TUint aCount ); |
|
1607 |
|
1608 /** |
|
1609 * Returns frame statistics |
|
1610 * |
|
1611 * @since S60 3.2 |
|
1612 * @return reference to frame statistics |
|
1613 */ |
|
1614 inline const TStatisticsResponse& FrameStatistics() const; |
|
1615 |
|
1616 /** |
|
1617 * Sets Null Frame Send Controller parameters |
|
1618 * |
|
1619 * @since S60 3.2 |
|
1620 * @param aVoiceCallEntryTimeout when we are not in Voice over WLAN Call |
|
1621 * state and we transmit at least aVoiceCallEntryTxThreshold |
|
1622 * Voice priority frames during the time period (microseconds) |
|
1623 * denoted by this parameter, we enter Voice over WLAN Call state |
|
1624 * @param aVoiceCallEntryTxThreshold Threshold value for the number of |
|
1625 * Voice priority Tx frames to enter Voice over WLAN Call state |
|
1626 * @param aNullTimeout NULL frame sending interval |
|
1627 * @param aNoVoiceTimeout after this long time of no Voice priority data |
|
1628 * Tx, exit voice call state |
|
1629 * @param aKeepAliveTimeout Keep Alive frame sending interval in |
|
1630 * infrastructure mode |
|
1631 */ |
|
1632 inline void SetNullSendControllerParameters( |
|
1633 TUint32 aVoiceCallEntryTimeout, |
|
1634 TUint32 aVoiceCallEntryTxThreshold, |
|
1635 TUint32 aNullTimeout, |
|
1636 TUint32 aNoVoiceTimeout, |
|
1637 TUint32 aKeepAliveTimeout ); |
|
1638 |
|
1639 /** |
|
1640 * Starts Voice over WLAN Call maintenance |
|
1641 * |
|
1642 * @since S60 3.2 |
|
1643 */ |
|
1644 inline void StartVoiceOverWlanCallMaintenance(); |
|
1645 |
|
1646 /** |
|
1647 * Stops Voice over WLAN Call maintenance |
|
1648 * |
|
1649 * @since S60 3.2 |
|
1650 */ |
|
1651 inline void StopVoiceOverWlanCallMaintenance(); |
|
1652 |
|
1653 /** |
|
1654 * Terminates Voice over WLAN Call maintenance |
|
1655 */ |
|
1656 inline void TerminateVoiceOverWlanCallMaintenance(); |
|
1657 |
|
1658 /** |
|
1659 * Resumes QoS null frame sending, if relevant. |
|
1660 * Doesn't change the Voice over WLAN Call state |
|
1661 * |
|
1662 * @since S60 3.2 |
|
1663 */ |
|
1664 inline void ResumeQosNullSending(); |
|
1665 |
|
1666 /** |
|
1667 * Starts Keep Alive frame sending |
|
1668 * |
|
1669 * @since S60 3.2 |
|
1670 */ |
|
1671 inline void StartKeepAlive(); |
|
1672 |
|
1673 /** |
|
1674 * Stops Keep Alive frame sending |
|
1675 * |
|
1676 * @since S60 3.2 |
|
1677 */ |
|
1678 inline void StopKeepAlive(); |
|
1679 |
|
1680 /** |
|
1681 * To be called upon every RX Data frame (other than Null and QoS Null Data) |
|
1682 * |
|
1683 * @since S60 3.2 |
|
1684 * @param aQueueId Id of the queue/AC via which the frame will be transmitted |
|
1685 * @param aPayloadLength length of the ethernet frame payload |
|
1686 */ |
|
1687 inline void OnDataRxCompleted( |
|
1688 WHA::TQueueId aQueueId, |
|
1689 TUint aPayloadLength ); |
|
1690 |
|
1691 /** |
|
1692 * To be called upon every Data frame (other than Null and QoS Null Data) |
|
1693 * send completion |
|
1694 * |
|
1695 * @since S60 3.2 |
|
1696 * @param aQueueId Id of the queue/AC via which the frame will be transmitted |
|
1697 */ |
|
1698 inline void OnDataTxCompleted( WHA::TQueueId aQueueId ); |
|
1699 |
|
1700 /** |
|
1701 * To be called upon every QoS Null Data frame send completion |
|
1702 * |
|
1703 * @since S60 3.2 |
|
1704 */ |
|
1705 inline void OnQosNullDataTxCompleted(); |
|
1706 |
|
1707 /** |
|
1708 * To be called upon every Null Data frame send completion |
|
1709 * |
|
1710 * @since S60 3.2 |
|
1711 */ |
|
1712 inline void OnNullDataTxCompleted(); |
|
1713 |
|
1714 /** |
|
1715 * To be called upon Voice Call Entry Timer timeout |
|
1716 * |
|
1717 * @since S60 3.2 |
|
1718 */ |
|
1719 inline void OnVoiceCallEntryTimerTimeout(); |
|
1720 |
|
1721 /** |
|
1722 * To be called upon Null Timer timeout |
|
1723 * |
|
1724 * @since S60 3.2 |
|
1725 */ |
|
1726 inline void OnNullTimerTimeout(); |
|
1727 |
|
1728 /** |
|
1729 * To be called upon Voice Timer timeout |
|
1730 * |
|
1731 * @since S60 3.2 |
|
1732 */ |
|
1733 inline void OnNoVoiceTimerTimeout(); |
|
1734 |
|
1735 /** |
|
1736 * To be called upon Keep Alive Timer timeout |
|
1737 * |
|
1738 * @since S60 3.2 |
|
1739 */ |
|
1740 void OnKeepAliveTimerTimeout(); |
|
1741 |
|
1742 /** |
|
1743 * Insert new RCPI value into the Signal Predictor. |
|
1744 * |
|
1745 * @since S60 3.2 |
|
1746 * @param aTimestamp Current time (in microseconds) |
|
1747 * @param aRcpi RCPI value from HW |
|
1748 * @return ETrue if an indication about weakening signal should be created |
|
1749 * EFalse otherwise |
|
1750 */ |
|
1751 inline TBool InsertNewRcpiIntoPredictor( TInt64 aTimestamp, WHA::TRcpi aRcpi ); |
|
1752 |
|
1753 /** |
|
1754 * Gets the latest median RCPI value from Signal Predictor. |
|
1755 * |
|
1756 * @since S60 v3.2 |
|
1757 * @param aTimestamp Current time (in microseconds). |
|
1758 * @param aLatestMedian reference to the median. |
|
1759 * @return ETrue if median RCPI value is available. |
|
1760 * EFalse otherwise |
|
1761 */ |
|
1762 inline TBool GetLatestMedianRcpiFromPredictor( |
|
1763 TInt64 aTimestamp, |
|
1764 WHA::TRcpi& aLatestMedian ) const; |
|
1765 |
|
1766 /** |
|
1767 * Configures the Signal Predictor. |
|
1768 * |
|
1769 * @since S60 v5.0 |
|
1770 * @param aTimeToWarnLevel Specifies the time (in microseconds) |
|
1771 * how far into the future signal prediction is done. |
|
1772 * @param aTimeToNextInd The minimum time difference (in |
|
1773 * microseconds) between two signal loss prediction indications. |
|
1774 * @param aRcpiWarnLevel If this RCPI level is predicted to be |
|
1775 * reached within the time specified by aSpTimeToCountPrediction, |
|
1776 * a signal loss prediction indication is sent. |
|
1777 */ |
|
1778 inline void ConfigureWlanSignalPredictor( |
|
1779 TUint32 aTimeToWarnLevel, |
|
1780 TUint32 aTimeToNextInd, |
|
1781 WHA::TRcpi aRcpiWarnLevel ); |
|
1782 |
|
1783 /** |
|
1784 * Adds a WLAN feature supported by us to the list of those supported |
|
1785 * features which are indicated in BSS membership selector |
|
1786 * |
|
1787 * @param aFeature Feature to add |
|
1788 */ |
|
1789 void AddBssMembershipFeature( T802Dot11BssMembershipSelector aFeature ); |
|
1790 |
|
1791 /** |
|
1792 * Checks if the specified item is a WLAN feature indicated in BSS |
|
1793 * membership selector and if it is supported by us |
|
1794 * |
|
1795 * @param aItem Item to check |
|
1796 * @return ETrue if supported |
|
1797 * EFalse otherwise |
|
1798 */ |
|
1799 TBool BssMembershipFeatureSupported( TUint8 aItem ) const; |
|
1800 |
|
1801 /** |
|
1802 * Gets our HT Capabilities element |
|
1803 * @return HT Capabilities element |
|
1804 */ |
|
1805 inline SHtCapabilitiesIE& GetOurHtCapabilitiesIe(); |
|
1806 |
|
1807 /** |
|
1808 * Gets target/current network's HT Capabilities element |
|
1809 * @return HT Capabilities element |
|
1810 */ |
|
1811 inline SHtCapabilitiesIE& GetNwHtCapabilitiesIe(); |
|
1812 |
|
1813 /** |
|
1814 * Gets target/current network's HT Operation element |
|
1815 * @return HT Operation element |
|
1816 */ |
|
1817 inline SHtOperationIE& GetNwHtOperationIe(); |
|
1818 |
|
1819 /** |
|
1820 * Gets HT Block Ack configuration provided by WLAN Mgmt client |
|
1821 * @return HT Block Ack configuration |
|
1822 */ |
|
1823 inline WHA::ShtBlockAckConfigure& GetHtBlockAckConfigure(); |
|
1824 |
|
1825 /** |
|
1826 * Gets proprietary SNAP header provided by WLAN Mgmt client |
|
1827 * @return Proprieatary SNAP header |
|
1828 */ |
|
1829 inline SSnapHeader& GetProprietarySnapHeader(); |
|
1830 |
|
1831 /** |
|
1832 * Gets WHA layer transmission status |
|
1833 * |
|
1834 * @param aTxQueueState State (full / not full) of every WHA transmit queue |
|
1835 * @return ETrue if the Tx pipeline is active, i.e. Tx frame submission |
|
1836 * is allowed |
|
1837 * EFalse if the Tx pipeline is not active, i.e. Tx frame submission |
|
1838 * is not allowed |
|
1839 */ |
|
1840 inline TBool GetWhaTxStatus( TWhaTxQueueState& aTxQueueState ) const; |
|
1841 |
|
1842 protected: |
|
1843 |
|
1844 /** |
|
1845 * Method called when packet has been transferred to the WLAN device |
|
1846 * |
|
1847 * @since S60 3.1 |
|
1848 * @param aCtxImpl global state machine context |
|
1849 * @param aPacketId packet whose transfer is complete |
|
1850 * @param aMetaHeader frame meta header |
|
1851 */ |
|
1852 virtual void OnPacketTransferComplete( |
|
1853 WlanContextImpl& aCtxImpl, |
|
1854 TUint32 aPacketId, |
|
1855 TDataBuffer* aMetaHeader ); |
|
1856 |
|
1857 virtual void OnPacketSendComplete( |
|
1858 WlanContextImpl& aCtxImpl, |
|
1859 WHA::TStatus aStatus, |
|
1860 TUint32 aPacketId, |
|
1861 WHA::TRate aRate, |
|
1862 TUint32 aPacketQueueDelay, |
|
1863 TUint32 aMediaDelay, |
|
1864 TUint aTotalTxDelay, |
|
1865 TUint8 aAckFailures, |
|
1866 WHA::TQueueId aQueueId, |
|
1867 WHA::TRate aRequestedRate, |
|
1868 TBool aMulticastData ); |
|
1869 |
|
1870 /** |
|
1871 * Method called when packet has been flushed (removed) |
|
1872 * from packet scheduler |
|
1873 * |
|
1874 * @since S60 3.1 |
|
1875 * @param aCtxImpl global state machine context |
|
1876 * @param aPacketId packet that was flushed |
|
1877 * @param aMetaHeader frame meta header |
|
1878 */ |
|
1879 virtual void OnPacketFlushEvent( |
|
1880 WlanContextImpl& aCtxImpl, |
|
1881 TUint32 aPacketId, |
|
1882 TDataBuffer* aMetaHeader ); |
|
1883 |
|
1884 /** |
|
1885 * Method called when Packet Scheduler's packet scheduling method |
|
1886 * should be called, as there exists a packet that is suitable for |
|
1887 * transmission. |
|
1888 * NOTE: if any other Packet Scheduler method is called within this |
|
1889 * context the result is undefined. |
|
1890 * |
|
1891 * @param aCtxImpl global state machine context |
|
1892 * @param aMore ETrue if another frame is also ready to be transmitted |
|
1893 * EFalse otherwise |
|
1894 */ |
|
1895 virtual void CallPacketSchedule( |
|
1896 WlanContextImpl& aCtxImpl, |
|
1897 TBool aMore ); |
|
1898 |
|
1899 virtual void OnPacketPushPossible( WlanContextImpl& aCtxImpl ); |
|
1900 |
|
1901 virtual void CommandResponse( |
|
1902 WHA::TCommandId aCommandId, |
|
1903 WHA::TStatus aStatus, |
|
1904 const WHA::UCommandResponseParams& aCommandResponseParams ); |
|
1905 |
|
1906 virtual void CommandComplete( |
|
1907 WHA::TCompleteCommandId aCompleteCommandId, |
|
1908 WHA::TStatus aStatus, |
|
1909 const WHA::UCommandCompletionParams& aCommandCompletionParams ); |
|
1910 |
|
1911 virtual void Indication( |
|
1912 WHA::TIndicationId aIndicationId, |
|
1913 const WHA::UIndicationParams& aIndicationParams ); |
|
1914 |
|
1915 // Frame sending callbacks |
|
1916 |
|
1917 virtual void SendPacketTransfer( |
|
1918 WHA::TPacketId aPacketId ); |
|
1919 |
|
1920 virtual void SendPacketComplete( |
|
1921 WHA::TStatus aStatus, |
|
1922 WHA::TPacketId aPacketId, |
|
1923 WHA::TRate aRate, |
|
1924 TUint32 aPacketQueueDelay, |
|
1925 TUint32 aMediaDelay, |
|
1926 TUint8 aAckFailures, |
|
1927 TUint16 aSequenceNumber ); |
|
1928 |
|
1929 |
|
1930 // Frame receive |
|
1931 |
|
1932 virtual TAny* RequestForBuffer( TUint16 aLength ); |
|
1933 |
|
1934 virtual void ReceivePacket( |
|
1935 WHA::TStatus aStatus, |
|
1936 const void* aFrame, |
|
1937 TUint16 aLength, |
|
1938 WHA::TRate aRate, |
|
1939 WHA::TRcpi aRcpi, |
|
1940 WHA::TChannelNumber aChannel, |
|
1941 void* aBuffer, |
|
1942 TUint32 aFlags ); |
|
1943 |
|
1944 /** |
|
1945 * Request to send a Null Data Frame |
|
1946 * |
|
1947 * @since S60 v3.2 |
|
1948 * @param aCtxImpl statemachine context |
|
1949 * @param aQosNull ETrue if a QoS Null Data frame should be transmitted |
|
1950 * EFalse if a regular Null Data frame should be transmitted |
|
1951 * @return ETrue if the send request was successfully submitted |
|
1952 * EFalse otherwise |
|
1953 */ |
|
1954 virtual TBool TxNullDataFrame( |
|
1955 WlanContextImpl& aCtxImpl, |
|
1956 TBool aQosNull ); |
|
1957 |
|
1958 // Prohibit copy constructor |
|
1959 WlanContextImpl( const WlanContextImpl& aCntx ); |
|
1960 // Prohibit assigment operator |
|
1961 WlanContextImpl& operator= ( const WlanContextImpl& ); |
|
1962 |
|
1963 public: // data |
|
1964 |
|
1965 WlanMacState* iCurrentMacState; |
|
1966 Umac& iUmac; |
|
1967 |
|
1968 |
|
1969 /** The states of the statemachine */ |
|
1970 States iStates; |
|
1971 /** 802.11 MIB */ |
|
1972 SWlanMib iWlanMib; |
|
1973 /** supported rates lookup table */ |
|
1974 SupportedRateLookUp |
|
1975 iSupportedRatesLookUpTable[KMaxNumberOfDot11bAndgRates]; |
|
1976 /** is protocol stack side datapath enabled or not */ |
|
1977 TBool iEnableUserData; |
|
1978 |
|
1979 TUint8* iCurrentRxBuffer; |
|
1980 |
|
1981 private: // definitions |
|
1982 |
|
1983 /** |
|
1984 * max number of features in our WLAN feature array (see below) |
|
1985 */ |
|
1986 static const TUint KMaxNumOfWlanFeatures = 1; |
|
1987 |
|
1988 /** |
|
1989 * value used in WLAN feature array for unallocated elements |
|
1990 */ |
|
1991 static const TUint8 KUnallocated = 0; |
|
1992 |
|
1993 /** |
|
1994 * container type for IDs of those WLAN features which are indicated in BSS |
|
1995 * membership selector |
|
1996 */ |
|
1997 typedef TUint8 TWlanFeatureArray[KMaxNumOfWlanFeatures]; |
|
1998 |
|
1999 private: // data |
|
2000 |
|
2001 /** |
|
2002 * ETrue if the Tx data buffer for frames created internally in this |
|
2003 * component is free (applies both to the DMA and the non-DMA Tx buffer). |
|
2004 * EFalse if it is in use |
|
2005 */ |
|
2006 TBool iInternalTxBufFree; |
|
2007 |
|
2008 /** |
|
2009 * ETrue if someone if waiting for the internal Tx Buffer to become |
|
2010 * available. EFalse othwerwise |
|
2011 */ |
|
2012 TBool iInternalTxBufBeingWaited; |
|
2013 |
|
2014 TWlanUserTxDataCntx iTxDataCntx; |
|
2015 TWlanUserTxDataCntx iMgmtTxDataCntx; |
|
2016 |
|
2017 /** data frame header template */ |
|
2018 SDataFrameHeader iDataFrameHeader; |
|
2019 |
|
2020 TUint32 iAlignNullData; |
|
2021 SNullDataFrame iNullDataFrame; |
|
2022 |
|
2023 TUint32 iAlignQosNullData; |
|
2024 SHtQosNullDataFrame iQosNullDataFrame; |
|
2025 |
|
2026 /** authentication sequence expected counter */ |
|
2027 WlanAuthSeqNmbrExpected iAuthSeqNmbrExpected; |
|
2028 /** connection state info */ |
|
2029 |
|
2030 WlanConnectContext iConnectContext; |
|
2031 /** available privacy mode filters */ |
|
2032 WlanPrivacyModeFilters iPrivacyModeFilters; |
|
2033 /** |
|
2034 * container for joined multicast (Rx) groups. Contains the |
|
2035 * multicast MAC addresses denoting the groups. |
|
2036 */ |
|
2037 JoinedMulticastGroups iJoinedMulticastGroups; |
|
2038 /** |
|
2039 * has Consecutive Beacons Lost indication already been sent to |
|
2040 * WLAN Mgmt Client |
|
2041 */ |
|
2042 TBool iConsecutiveBeaconsLostIndicated; |
|
2043 /** |
|
2044 * has Consecutive Tx Failures indication already been sent to |
|
2045 * WLAN Mgmt Client |
|
2046 */ |
|
2047 TBool iConsecutiveTxFailuresIndicated; |
|
2048 /** |
|
2049 * has Consecutive 802.11 Power Mgmt Mode Set Failures indication already |
|
2050 * been sent to WLAN Mgmt Client |
|
2051 */ |
|
2052 TBool iConsecutivePwrModeSetFailuresIndicated; |
|
2053 /** |
|
2054 * failed Tx packet counter used to determine if we should indicate |
|
2055 * Consecutive Tx Failures |
|
2056 */ |
|
2057 TUint8 iFailedTxPacketCount; |
|
2058 /** |
|
2059 * counter which states how many times we will still try to change the |
|
2060 * 802.11 power management mode before indicating Consecutive 802.11 |
|
2061 * Power Mgmt Mode Set Failures, if we continue to be unsuccessful in |
|
2062 * the power management mode changing |
|
2063 */ |
|
2064 TUint iSetPsModeCount; |
|
2065 |
|
2066 /** is a WHA cmd active */ |
|
2067 TBool iWsaCmdActive; |
|
2068 |
|
2069 WlanTxRateAdaptation iTxRateAdaptation; |
|
2070 |
|
2071 WlanPRNGenerator iPrnGenerator; |
|
2072 |
|
2073 // Asynchronous Completion Token for WHA command |
|
2074 TUint32 iWhaCommandAct; |
|
2075 |
|
2076 /** 802.11 management frame templates */ |
|
2077 ManagementFrameTemplates iManagementFrameTemplates; |
|
2078 |
|
2079 WHA::Wha* iWha; |
|
2080 WHA::SSettings iWHASettings; |
|
2081 |
|
2082 SWsaCommands* iWsaCommands; |
|
2083 |
|
2084 WlanEventDispatcher iEventDispatcher; |
|
2085 WlanPacketScheduler iPacketScheduler; |
|
2086 /** dynamic power mode context */ |
|
2087 WlanDynamicPowerModeMgmtCntx iDynamicPowerModeCntx; |
|
2088 |
|
2089 /** frame statistics counters */ |
|
2090 TStatisticsResponse iFrameStatistics; |
|
2091 |
|
2092 /** Null Data Frame sending controller */ |
|
2093 WlanNullSendController iNullSendController; |
|
2094 |
|
2095 /** WLAN signal predictor */ |
|
2096 WlanSignalPredictor iWlanSignalPredictor; |
|
2097 |
|
2098 /** |
|
2099 * includes IDs of those WLAN features which are indicated in BSS membership |
|
2100 * selector and which we support |
|
2101 */ |
|
2102 TWlanFeatureArray iOurBssMembershipFeatureArray; |
|
2103 |
|
2104 /** |
|
2105 * HT Capabilities element which we use to inform about our static HT |
|
2106 * capabilities |
|
2107 */ |
|
2108 SHtCapabilitiesIE iOurHtCapabilitiesIe; |
|
2109 |
|
2110 /** HT Block Ack configuration provided by WLAN Mgmt Client */ |
|
2111 WHA::ShtBlockAckConfigure iHtBlockAckConfigure; |
|
2112 |
|
2113 /** |
|
2114 * Otherwise valid received 802.11 Data frames containing this SNAP header |
|
2115 * are accepted and forwarded to the WLAN Management Client. |
|
2116 */ |
|
2117 SSnapHeader iProprietarySnapHeader; |
|
2118 }; |
|
2119 |
|
2120 #include "UmacContextImpl.inl" |
|
2121 |
|
2122 #endif // WLANCONTEXTIMPL_H |