|
1 /* |
|
2 * Copyright (c) 2005-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 DWlanLogicalChannel class. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 31 % |
|
20 */ |
|
21 |
|
22 #ifndef DWLANLOGICALCHANNEL_H |
|
23 #define DWLANLOGICALCHANNEL_H |
|
24 |
|
25 #include "UmacManagementSideUmacCb.h" |
|
26 #include "UmacProtocolStackSideUmacCb.h" |
|
27 #include "wllddlogicalchannelbase.h" |
|
28 #include "RWlanLogicalChannel.h" |
|
29 |
|
30 #include "wllddoidmsgstorage.h" |
|
31 #include "wlldddmausablememory.h" |
|
32 #include "wllddpowerindicator.h" |
|
33 #include "wllddpowerhandler.h" |
|
34 |
|
35 #include "EtherCardApi.h" |
|
36 #include "FrameXferBlock.h" |
|
37 |
|
38 class DWlanLogicalDevice; |
|
39 class Umac; |
|
40 |
|
41 #ifdef RD_WLAN_DDK |
|
42 class WlanOsa; |
|
43 #endif |
|
44 |
|
45 class DEthernetFrameMemMngr; |
|
46 class RFrameXferBlock; |
|
47 class WlanChunk; |
|
48 |
|
49 class DWlanLogicalChannel : |
|
50 public DWlanLogicalChannelBase, |
|
51 public WlanManagementSideUmacCb, |
|
52 public WlanProtocolStackSideUmacCb, |
|
53 public MWlanPowerIndicator |
|
54 { |
|
55 // type definitions |
|
56 // linked list entry for storing indications |
|
57 struct TIndicationListEntry |
|
58 { |
|
59 TIndication indication; |
|
60 struct TIndicationListEntry *next; |
|
61 }; |
|
62 |
|
63 /** max number of indication list entries */ |
|
64 enum { KMaxIndicationListEntries = 6 }; |
|
65 |
|
66 public: |
|
67 |
|
68 #ifndef RD_WLAN_DDK |
|
69 DWlanLogicalChannel( |
|
70 DWlanLogicalDevice& aParent, |
|
71 Umac& aUmac, |
|
72 TDynamicDfcQue& aDfcQ, |
|
73 DMutex& aMutex, |
|
74 DChunk*& aSharedMemoryChunk, |
|
75 WlanChunk*& aRxFrameMemoryPool ); |
|
76 #else |
|
77 DWlanLogicalChannel( |
|
78 DWlanLogicalDevice& aParent, |
|
79 Umac& aUmac, |
|
80 TDynamicDfcQue& aDfcQ, |
|
81 WlanOsa*& aOsa, |
|
82 DChunk*& aSharedMemoryChunk, |
|
83 WlanChunk*& aRxFrameMemoryPool ); |
|
84 #endif |
|
85 |
|
86 virtual ~DWlanLogicalChannel(); |
|
87 |
|
88 /** |
|
89 * Returns a reference to a pointer pointing to the only shared memory |
|
90 * chunk instance |
|
91 * |
|
92 * @return See above |
|
93 */ |
|
94 DChunk*& SharedMemoryChunk(); |
|
95 |
|
96 /** |
|
97 * Sets the number of extra bytes required to align Rx buffer start |
|
98 * address, to be returned to WHA layer, to allocation unit boundary |
|
99 */ |
|
100 void SetRxBufAlignmentPadding( TInt aRxBufAlignmentPadding ); |
|
101 |
|
102 /** |
|
103 * Returns the number of extra bytes required to align Rx buffer start |
|
104 * address, to be returned to WHA layer, to allocation unit boundary |
|
105 * @return See above |
|
106 */ |
|
107 TInt RxBufAlignmentPadding() const; |
|
108 |
|
109 /** |
|
110 * Second phase constructor for DLogicalChannelBase objects. |
|
111 * |
|
112 * It is called in creating thread context in a critical section with |
|
113 * no fast mutexes held. |
|
114 * The default implementation does nothing. |
|
115 * |
|
116 * @since S60 3.1 |
|
117 * @param aUnit Requested unit number |
|
118 * @param aInfo Additional info supplied by client |
|
119 * @param aVer Requested interface version |
|
120 * |
|
121 * @return KErrNone if construction was successful, |
|
122 * otherwise one of the other system-wide error codes. |
|
123 */ |
|
124 virtual TInt DoCreate(TInt aUnit, const TDesC8* aInfo, const TVersion& aVer); |
|
125 |
|
126 /** |
|
127 * Processes a message for this logical channel. |
|
128 * This function is called in the context of a DFC thread. |
|
129 * |
|
130 * @since S60 3.1 |
|
131 * @param aMsg The message to process. |
|
132 * The iValue member of this distinguishes the message type: |
|
133 * iValue==ECloseMsg, channel close message |
|
134 * iValue==KMaxTInt, a 'DoCancel' message |
|
135 * iValue>=0, a 'DoControl' message with function number equal to iValue |
|
136 * iValue<0, a 'DoRequest' message with function number equal to ~iValue |
|
137 */ |
|
138 virtual void HandleMsg(TMessageBase* aMsg); |
|
139 |
|
140 /** |
|
141 * Process a function for this logical channel. |
|
142 * This function is executed in the context of client's thread in |
|
143 * supervisor mode. All code executed in this mode MUST NOT |
|
144 * take a lot of time and MUST NOT access the WHA layer. |
|
145 * @param aFunction Defines the operation/function to be performed. |
|
146 * @param param Function specific parameter |
|
147 * @return function specific return value. |
|
148 */ |
|
149 virtual TAny* DoControlFast( TInt aFunction, TAny* param ); |
|
150 |
|
151 private: |
|
152 |
|
153 /** |
|
154 * Called from statemachine when oid has been completed. |
|
155 * Triggers handling of a new oid |
|
156 * @param aOid OID handled |
|
157 * @param aReason completion code |
|
158 */ |
|
159 virtual void OnOidCompleted( |
|
160 TInt aReason, |
|
161 SOidOutputData& OidOutputData ); |
|
162 |
|
163 /** |
|
164 * Sets the Tx offset for every frame type which can be transmitted |
|
165 * |
|
166 * @since S60 5.0 |
|
167 * @param aEthernetFrameTxOffset Tx offset for Ethernet frames and Ethernet |
|
168 * Test frames |
|
169 * @param aDot11FrameTxOffset Tx offset for 802.11 frames |
|
170 * @param aSnapFrameTxOffset Tx offset for SNAP frames |
|
171 */ |
|
172 virtual void SetMgmtSideTxOffsets( |
|
173 TUint32 aEthernetFrameTxOffset, |
|
174 TUint32 aDot11FrameTxOffset, |
|
175 TUint32 aSnapFrameTxOffset ); |
|
176 |
|
177 /** |
|
178 * Gets buffer for Rx data |
|
179 * @param aLengthinBytes Requested buffer length |
|
180 * @return buffer for Rx data upon success |
|
181 * NULL otherwise |
|
182 */ |
|
183 virtual TUint8* GetBufferForRxData( TUint aLengthinBytes ); |
|
184 |
|
185 /** |
|
186 * Completes a data read operation from management side |
|
187 * |
|
188 * @param aBufferStart first element of the array that holds pointers to |
|
189 * Rx frame meta headers |
|
190 * @param aNumOfBuffers number of meta header pointers in the array |
|
191 */ |
|
192 virtual void MgmtDataReceiveComplete( |
|
193 const TDataBuffer*& aBufferStart, |
|
194 TUint32 aNumOfBuffers ); |
|
195 |
|
196 /** |
|
197 * Completes a data write operation from management side |
|
198 * @param aErr completion code |
|
199 */ |
|
200 virtual void MgmtPathWriteComplete ( TInt aErr ); |
|
201 |
|
202 /** |
|
203 * Sends a indication to the management side |
|
204 * @param aIndication indication code |
|
205 */ |
|
206 virtual void OnInDicationEvent( TIndication aIndication ); |
|
207 |
|
208 /** |
|
209 * Frees the specified Rx frame buffer |
|
210 * |
|
211 * @param aBufferToFree The buffer to free |
|
212 */ |
|
213 virtual void MarkRxBufFree( TUint8* aBufferToFree ); |
|
214 |
|
215 /** |
|
216 * Sets the Tx offset for every frame type which can be transmitted |
|
217 * |
|
218 * @since S60 5.0 |
|
219 * @param aEthernetFrameTxOffset Tx offset for Ethernet frames |
|
220 */ |
|
221 virtual void SetProtocolStackTxOffset( |
|
222 TUint32 aEthernetFrameTxOffset ); |
|
223 |
|
224 /** |
|
225 * Called when the Tx packet in question has been trasferred to the WLAN |
|
226 * device. |
|
227 * |
|
228 * @param aCompletionCode Status of the operation. |
|
229 * @param aMetaHeader Meta header associated with the related Tx packet |
|
230 */ |
|
231 virtual void OnTxProtocolStackDataComplete( |
|
232 TInt aCompletionCode, |
|
233 TDataBuffer* aMetaHeader ); |
|
234 |
|
235 /** |
|
236 * Called when a Tx packet - submitted by someone else than the Protocol |
|
237 * Stack Side Client - has been trasferred to the WLAN device. |
|
238 */ |
|
239 virtual void OnOtherTxDataComplete(); |
|
240 |
|
241 /** |
|
242 * Called when the Tx of a frame has completed (either successfully or |
|
243 * unsuccessfully). |
|
244 */ |
|
245 virtual void OnTxDataSent(); |
|
246 |
|
247 virtual TUint8* DmaPrivateTxMemory(); |
|
248 |
|
249 /** |
|
250 * Completes a data read operation from protocol stack side |
|
251 * |
|
252 * @param aBufferStart first element of the array that holds pointers to |
|
253 * Rx frame meta headers |
|
254 * @param aNumOfBuffers number of meta header pointers in the array |
|
255 * @return ETrue if this event was processed successfully |
|
256 * EFalse otherwise |
|
257 */ |
|
258 virtual TBool ProtocolStackDataReceiveComplete( |
|
259 const TDataBuffer*& aBufferStart, |
|
260 TUint32 aNumOfBuffers ); |
|
261 |
|
262 /** |
|
263 * Determines if the Protocol Stack Side client is ready to handle any |
|
264 * callbacks from UMAC |
|
265 * |
|
266 * @return ETrue if the client is ready |
|
267 * EFalse if the client is not ready |
|
268 */ |
|
269 virtual TBool ProtocolStackSideClientReady() const; |
|
270 |
|
271 /** |
|
272 * From WlanProtocolStackSideUmacCb. |
|
273 * Indicates that WLAN Mgmt Client has (re-)enabled protocol stack side |
|
274 * user data Tx. |
|
275 */ |
|
276 virtual void UserDataReEnabled(); |
|
277 |
|
278 virtual void RegisterTimeout( |
|
279 TUint32 aTimeoutInMicroSeconds, |
|
280 TWlanTimer aTimer ); |
|
281 virtual void CancelTimeout( TWlanTimer aTimer ); |
|
282 |
|
283 virtual void RegisterDfc( TAny* aCntx ); |
|
284 virtual void CancelDfc(); |
|
285 |
|
286 /** |
|
287 * Allocates Rx frame meta header |
|
288 * @return Rx frame meta header upon success |
|
289 * NULL otherwise |
|
290 */ |
|
291 virtual TDataBuffer* GetRxFrameMetaHeader(); |
|
292 |
|
293 /** |
|
294 * Deallocates Rx frame meta header |
|
295 * @param aMetaHeader Meta header to deallocate |
|
296 */ |
|
297 virtual void FreeRxFrameMetaHeader( TDataBuffer* aMetaHeader ); |
|
298 |
|
299 void DoCancel( TInt aMask ); |
|
300 |
|
301 TInt DoRequest( |
|
302 TInt aReqNo, |
|
303 TRequestStatus* aStatus, |
|
304 TAny* a1, |
|
305 TAny* a2 ); |
|
306 TInt OnMgmtSideDoRequest( |
|
307 TInt aReqNo, |
|
308 TRequestStatus* aStatus, |
|
309 TAny* a1, |
|
310 TAny* a2 ); |
|
311 TInt OnEthernetSideRequest( |
|
312 TInt aReqNo, |
|
313 TRequestStatus* aStatus, |
|
314 TAny* a1, |
|
315 TAny* a2 ); |
|
316 |
|
317 TInt DoControl( TInt aFunction, TAny* a1, TAny* a2); |
|
318 TInt OnMgmtSideControl( TInt aFunction, TAny* a1, TAny* a2 ); |
|
319 TInt OnEthernetSideControl( TInt aFunction, TAny* a1, TAny* a2 ); |
|
320 |
|
321 TInt OnInitialiseEthernetFrameBuffers( |
|
322 TSharedChunkInfo* aSharedChunkInfo ); |
|
323 |
|
324 void OnReleaseEthernetFrameBuffers(); |
|
325 |
|
326 void TxProtocolStackData(); |
|
327 void TxManagementData(); |
|
328 |
|
329 TBool OnReadEthernetFrameRequest(); |
|
330 |
|
331 /** |
|
332 * Stores a indication to indication list |
|
333 * @param aIndication indication to be stored |
|
334 */ |
|
335 void StoreIndication( TIndication aIndication ); |
|
336 |
|
337 /** |
|
338 * Gets first stored indication and assigns it to indication buffer |
|
339 * @return ETrue a stored indication existed, otherwise EFalse |
|
340 */ |
|
341 TBool GetStoredIndication(); |
|
342 |
|
343 /** |
|
344 * Calls GetStoredIndication() and after that |
|
345 * completes the outstanding request |
|
346 */ |
|
347 void TryToCompleteIndicationRequest(); |
|
348 |
|
349 /** |
|
350 * Relases a indication list entry |
|
351 * @param entry to be relased |
|
352 */ |
|
353 void ReleaseIndicationListEntry( TIndicationListEntry* aEntry ); |
|
354 |
|
355 /** |
|
356 * Gets a next free indication list entry |
|
357 * @return a next free indication list entry |
|
358 */ |
|
359 TIndicationListEntry* GetFreeIndicationListEntry(); |
|
360 |
|
361 /** |
|
362 * Deallocates the indication list and marks all pointers NULL |
|
363 */ |
|
364 void FreeIndicationList(); |
|
365 |
|
366 /** |
|
367 * Clears all indication list entrys |
|
368 */ |
|
369 void PurgeIndicationList(); |
|
370 |
|
371 /** |
|
372 * From CWlanPhy |
|
373 * Registers the notification to the PDD. |
|
374 * This request is used for registering indication buffer to PDD |
|
375 * @param aBuffer pointer to TIndication |
|
376 */ |
|
377 void IndicationRequest( TIndication* aBuffer ); |
|
378 |
|
379 /** |
|
380 * From CWlanPhy |
|
381 * Releases indication buffer from PDD |
|
382 */ |
|
383 void CancelIndicationRequest(); |
|
384 |
|
385 /** |
|
386 * Called by the PDD when a notification is received. |
|
387 */ |
|
388 void IndicationComplete(); |
|
389 |
|
390 TBool InitIndicationListEntries(); |
|
391 |
|
392 /** |
|
393 * Default Timer timeout callback function |
|
394 * |
|
395 * @since S60 3.1 |
|
396 * @param aPtr A pointer passed to the callback function when called. |
|
397 * This pointer was given to the timer in timer construction. |
|
398 */ |
|
399 static void OnTimeOut( TAny *aPtr ); |
|
400 |
|
401 /** |
|
402 * Voice Call Entry Timer timeout DFC callback method |
|
403 * |
|
404 * @since S60 3.2 |
|
405 */ |
|
406 void RealVoiceCallEntryTimerDfc(); |
|
407 |
|
408 /** |
|
409 * Voice Call Entry Timer timeout DFC callback function |
|
410 * |
|
411 * @since S60 3.2 |
|
412 * @param aPtr this pointer (pointer to this object instance) |
|
413 */ |
|
414 static void VoiceCallEntryTimerDfcDoToggle( TAny* aPtr ); |
|
415 |
|
416 /** |
|
417 * Voice Call Entry Timer timeout callback function |
|
418 * |
|
419 * @since S60 3.2 |
|
420 * @param aPtr A pointer passed to the callback function when called. |
|
421 * This pointer was given to the timer in timer construction. |
|
422 */ |
|
423 static void OnVoiceCallEntryTimerTimeOut( TAny *aPtr ); |
|
424 |
|
425 /** |
|
426 * Null Timer timeout DFC callback method |
|
427 * |
|
428 * @since S60 3.2 |
|
429 */ |
|
430 void RealNullTimerDfc(); |
|
431 |
|
432 /** |
|
433 * Null Timer timeout DFC callback function |
|
434 * |
|
435 * @since S60 3.2 |
|
436 * @param aPtr this pointer (pointer to this object instance) |
|
437 */ |
|
438 static void NullTimerDfcDoToggle( TAny* aPtr ); |
|
439 |
|
440 /** |
|
441 * Null Timer timeout callback function |
|
442 * |
|
443 * @since S60 3.2 |
|
444 * @param aPtr A pointer passed to the callback function when called. |
|
445 * This pointer was given to the timer in timer construction. |
|
446 */ |
|
447 static void OnNullTimerTimeOut( TAny *aPtr ); |
|
448 |
|
449 /** |
|
450 * No Voice Timer timeout DFC callback method |
|
451 * |
|
452 * @since S60 3.2 |
|
453 */ |
|
454 void RealNoVoiceTimerDfc(); |
|
455 |
|
456 /** |
|
457 * No Voice Timer timeout DFC callback function |
|
458 * |
|
459 * @since S60 3.2 |
|
460 * @param aPtr this pointer (pointer to this object instance) |
|
461 */ |
|
462 static void NoVoiceTimerDfcDoToggle( TAny* aPtr ); |
|
463 |
|
464 /** |
|
465 * No Voice Timer timeout callback function |
|
466 * |
|
467 * @since S60 3.2 |
|
468 * @param aPtr A pointer passed to the callback function when called. |
|
469 * This pointer was given to the timer in timer construction. |
|
470 */ |
|
471 static void OnNoVoiceTimerTimeOut( TAny *aPtr ); |
|
472 |
|
473 /** |
|
474 * Keep Alive Timer timeout DFC callback method |
|
475 * |
|
476 * @since S60 3.2 |
|
477 */ |
|
478 void RealKeepAliveTimerDfc(); |
|
479 |
|
480 /** |
|
481 * Keep Alive Timer timeout DFC callback function |
|
482 * |
|
483 * @since S60 3.2 |
|
484 * @param aPtr this pointer (pointer to this object instance) |
|
485 */ |
|
486 static void KeepAliveTimerDfcDoToggle( TAny* aPtr ); |
|
487 |
|
488 /** |
|
489 * Keep Alive Timer timeout callback function |
|
490 * |
|
491 * @since S60 3.2 |
|
492 * @param aPtr A pointer passed to the callback function when called. |
|
493 * This pointer was given to the timer in timer construction. |
|
494 */ |
|
495 static void OnKeepAliveTimerTimeOut( TAny *aPtr ); |
|
496 |
|
497 /** |
|
498 * Active to Light PS Timer timeout DFC callback method |
|
499 * |
|
500 * @since S60 5.1 |
|
501 */ |
|
502 void RealActiveToLightPsTimerDfc(); |
|
503 |
|
504 /** |
|
505 * Active to Light PS Timer timeout DFC callback function |
|
506 * |
|
507 * @since S60 5.1 |
|
508 * @param aPtr this pointer (pointer to this object instance) |
|
509 */ |
|
510 static void ActiveToLightPsTimerDfcDoToggle( TAny* aPtr ); |
|
511 |
|
512 /** |
|
513 * Active to Light PS Timer timeout callback function |
|
514 * |
|
515 * @since S60 5.1 |
|
516 * @param aPtr A pointer passed to the callback function when called. |
|
517 * This pointer was given to the timer in timer construction. |
|
518 */ |
|
519 static void OnActiveToLightPsTimerTimeOut( TAny *aPtr ); |
|
520 |
|
521 /** |
|
522 * Light PS to Active Timer timeout DFC callback method |
|
523 * |
|
524 * @since S60 5.1 |
|
525 */ |
|
526 void RealLightPsToActiveTimerDfc(); |
|
527 |
|
528 /** |
|
529 * Light PS to Active Timer timeout DFC callback function |
|
530 * |
|
531 * @since S60 5.1 |
|
532 * @param aPtr this pointer (pointer to this object instance) |
|
533 */ |
|
534 static void LightPsToActiveTimerDfcDoToggle( TAny* aPtr ); |
|
535 |
|
536 /** |
|
537 * Light PS to Active Timer timeout callback function |
|
538 * |
|
539 * @since S60 5.1 |
|
540 * @param aPtr A pointer passed to the callback function when called. |
|
541 * This pointer was given to the timer in timer construction. |
|
542 */ |
|
543 static void OnLightPsToActiveTimerTimeOut( TAny *aPtr ); |
|
544 |
|
545 /** |
|
546 * Light PS to Deep PS Timer timeout DFC callback method |
|
547 * |
|
548 * @since S60 5.1 |
|
549 */ |
|
550 void RealLightPsToDeepPsTimerDfc(); |
|
551 |
|
552 /** |
|
553 * Light PS to Deep PS Timer timeout DFC callback function |
|
554 * |
|
555 * @since S60 5.1 |
|
556 * @param aPtr this pointer (pointer to this object instance) |
|
557 */ |
|
558 static void LightPsToDeepPsTimerDfcDoToggle( TAny* aPtr ); |
|
559 |
|
560 /** |
|
561 * Light PS to Deep PS Timer timeout callback function |
|
562 * |
|
563 * @since S60 5.1 |
|
564 * @param aPtr A pointer passed to the callback function when called. |
|
565 * This pointer was given to the timer in timer construction. |
|
566 */ |
|
567 static void OnLightPsToDeepPsTimerTimeOut( TAny *aPtr ); |
|
568 |
|
569 /** |
|
570 * Default Timer timeout DFC callback method |
|
571 * |
|
572 * @since S60 3.1 |
|
573 */ |
|
574 void RealTimerDfc(); |
|
575 |
|
576 void RealDfc(); |
|
577 |
|
578 /** |
|
579 * Default Timer timeout DFC callback function |
|
580 * |
|
581 * @since S60 3.1 |
|
582 * @param aPtr this pointer (pointer to this object instance) |
|
583 */ |
|
584 static void TimerDfcDoToggle( TAny* aPtr ); |
|
585 |
|
586 static void DfcDoToggle( TAny* aPtr ); |
|
587 |
|
588 /** |
|
589 * Protocol Stack Side Tx Trigger DFC callback method |
|
590 */ |
|
591 void RealTxTriggerDfc(); |
|
592 |
|
593 /** |
|
594 * Protocol Stack Side Tx Trigger DFC callback function |
|
595 * |
|
596 * @param aPtr this pointer (pointer to this object instance) |
|
597 */ |
|
598 static void TxTriggerDfcDoToggle( TAny* aPtr ); |
|
599 |
|
600 void FinitSystem(); |
|
601 void InitSystem( TAny* aInputBuffer, TUint aInputLength ); |
|
602 |
|
603 /** |
|
604 * Allocates kernel mode storage for actual parameters pointed to by |
|
605 * pointers in an OID command |
|
606 * |
|
607 * @since S60 3.1 |
|
608 * @return ETrue if the operation succeeds; |
|
609 * EFalse otherwise |
|
610 */ |
|
611 TBool HandlePointerParameters(); |
|
612 |
|
613 /** |
|
614 * Allocates kernel mode storage for scan response frame body and copies |
|
615 * it from user side to kernel side from the connect command parameters |
|
616 * |
|
617 * @since S60 3.2 |
|
618 * @return ETrue if the operation succeeds; |
|
619 * EFalse otherwise |
|
620 */ |
|
621 TBool HandleScanResponseFrameBodyCase(); |
|
622 |
|
623 /** |
|
624 * Allocates kernel mode storage for IE(s) and copies it (them) from user |
|
625 * side to kernel side when there is IE(s) present in the connect command |
|
626 * |
|
627 * @since S60 3.2 |
|
628 * @return ETrue if the operation succeeds; |
|
629 * EFalse otherwise |
|
630 */ |
|
631 TBool CheckAndHandleIeDataCase(); |
|
632 |
|
633 /** |
|
634 * Frees kernel mode storage allocated for scan response frame body |
|
635 * |
|
636 * @since S60 3.2 |
|
637 */ |
|
638 void FreeScanResponseFramebody(); |
|
639 |
|
640 /** |
|
641 * Frees kernel mode storage allocated for IE(s) |
|
642 * |
|
643 * @since S60 3.2 |
|
644 */ |
|
645 void FreeIeData(); |
|
646 |
|
647 /** |
|
648 * From MWlanPowerIndicator |
|
649 * Indicates that power up notification has been received from kernel |
|
650 * side Power Manager. |
|
651 */ |
|
652 virtual void OnPowerUp(); |
|
653 |
|
654 /** |
|
655 * From MWlanPowerIndicator |
|
656 * Indicates that power down request has been received from kernel |
|
657 * side Power Manager. |
|
658 * |
|
659 * @since S60 3.1 |
|
660 */ |
|
661 virtual void OnPowerDown(); |
|
662 |
|
663 // Prohibit copy constructor. |
|
664 DWlanLogicalChannel ( const DWlanLogicalChannel & ); |
|
665 // Prohibit assigment operator. |
|
666 DWlanLogicalChannel & operator= ( const DWlanLogicalChannel & ); |
|
667 |
|
668 private: // data |
|
669 |
|
670 const TUint32 KFreeOpenParamsMask = ( 1 << 0 ); |
|
671 const TUint32 KFreeScanResponseFramebodyMask = ( 1 << 1 ); |
|
672 const TUint32 KDfcCancelledMask = ( 1 << 2 ); |
|
673 const TUint32 KFreeIeDataMask = ( 1 << 3 ); |
|
674 const TUint32 KPowerHandlerRegistered = ( 1 << 4 ); |
|
675 const TUint32 KTxTriggerArmed = ( 1 << 5 ); |
|
676 |
|
677 TOpenParam iOpenParam; |
|
678 |
|
679 DThread* iClient; |
|
680 TInt iUnit; |
|
681 Umac& iUmac; |
|
682 /** pointer to our DFC queue. Not own */ |
|
683 TDynamicDfcQue* iDfcQ; |
|
684 DWlanLogicalDevice& iParent; |
|
685 |
|
686 /** management side requests */ |
|
687 TRequestStatus* iWlanGeneralRequestStatus; |
|
688 TRequestStatus* iWlanRequestNotifyStatus; |
|
689 TRequestStatus* iWlanReceiveFrameStatus; |
|
690 TRequestStatus* iWlanSendFrameStatus; |
|
691 |
|
692 /** indication request buffer to USER mode */ |
|
693 TIndication* iIndicationBuffer; |
|
694 /** pointer to first stored indication */ |
|
695 TIndicationListEntry* iIndicationListHead; |
|
696 /** pointer to the first free indication list entry */ |
|
697 TIndicationListEntry* iFreeIndicationListHead; |
|
698 |
|
699 /** protocol stack side requests */ |
|
700 TRequestStatus* iResumeTxStatus; |
|
701 TRequestStatus* iEthernetReceiveFrameStatus; |
|
702 |
|
703 /** Pointer to ethernet memory manager */ |
|
704 DEthernetFrameMemMngr* iEthernetFrameMemMngr; |
|
705 |
|
706 /** Default Timer DFC object */ |
|
707 TDfc iTimerDfc; |
|
708 /** Default Timer object */ |
|
709 NTimer iTimer; |
|
710 /** Voice Call Entry Timer object */ |
|
711 NTimer iVoiceCallEntryTimer; |
|
712 /** Voice Call Entry Timer DFC object */ |
|
713 TDfc iVoiceCallEntryTimerDfc; |
|
714 /** NULL Timer object */ |
|
715 NTimer iNullTimer; |
|
716 /** NULL Timer DFC object */ |
|
717 TDfc iNullTimerDfc; |
|
718 /** No Voice Timer object */ |
|
719 NTimer iNoVoiceTimer; |
|
720 /** No Voice Timer DFC object */ |
|
721 TDfc iNoVoiceTimerDfc; |
|
722 /** Keep Alive Timer object */ |
|
723 NTimer iKeepAliveTimer; |
|
724 /** Keep Alive Timer DFC object */ |
|
725 TDfc iKeepAliveTimerDfc; |
|
726 /** Active to Light PS Timer object */ |
|
727 NTimer iActiveToLightPsTimer; |
|
728 /** Active to Light PS Timer DFC object */ |
|
729 TDfc iActiveToLightPsTimerDfc; |
|
730 /** Light PS to Active Timer object */ |
|
731 NTimer iLightPsToActiveTimer; |
|
732 /** Light PS to Active Timer DFC object */ |
|
733 TDfc iLightPsToActiveTimerDfc; |
|
734 /** Light PS to Deep PS Timer object */ |
|
735 NTimer iLightPsToDeepPsTimer; |
|
736 /** Light PS to Deep PS DFC object */ |
|
737 TDfc iLightPsToDeepPsTimerDfc; |
|
738 |
|
739 TDfc iDfc; |
|
740 /** Protocol Stack Side Tx Trigger DFC object */ |
|
741 TDfc iTxTriggerDfc; |
|
742 |
|
743 SOidMsgStorage iOidMsgStorage; |
|
744 TUint32 iFlags; |
|
745 |
|
746 /** our power handler */ |
|
747 DWlanPowerHandler iPowerHandler; |
|
748 /** |
|
749 * ETrue if we are powering down because power manager has requested us |
|
750 * to do so |
|
751 */ |
|
752 TBool iPoweringDown; |
|
753 |
|
754 TAny* iDfcCtx; |
|
755 |
|
756 WlanDmaUsableMemory iDmaTxMemory; |
|
757 |
|
758 #ifndef RD_WLAN_DDK |
|
759 /** |
|
760 * reference to mutex used to protect LDD from simultaneous execution |
|
761 * by several different threads. |
|
762 */ |
|
763 DMutex& iMutex; |
|
764 #else |
|
765 /** |
|
766 * OS abstraction object reference |
|
767 */ |
|
768 WlanOsa*& iOsa; |
|
769 #endif |
|
770 |
|
771 /** |
|
772 * reference to shared memory chunk for frame transfer between user and |
|
773 * kernel address spaces |
|
774 */ |
|
775 DChunk*& iSharedMemoryChunk; |
|
776 |
|
777 /** |
|
778 * reference to Rx frame memory pool manager |
|
779 */ |
|
780 WlanChunk*& iRxFrameMemoryPool; |
|
781 |
|
782 /** |
|
783 * ETrue if the Tx packet submission loop is active. |
|
784 * Is used to deny calling UMAC TxProtocolStackData() if the loop is |
|
785 * already active. This prevents also recursive call stack growth. |
|
786 */ |
|
787 TBool iTxActive; |
|
788 |
|
789 /** |
|
790 * ETrue if the user mode client is allowed to add new frames to Tx |
|
791 * queues |
|
792 */ |
|
793 TBool iAddTxFrameAllowed; |
|
794 }; |
|
795 |
|
796 |
|
797 #endif // DWLANLOGICALCHANNEL_H |
|
798 |