|
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 WlanDot11Associated class |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 46 % |
|
20 */ |
|
21 |
|
22 #ifndef WLANDOT11ASSOCIATED_H |
|
23 #define WLANDOT11ASSOCIATED_H |
|
24 |
|
25 #include "UmacDot11State.h" |
|
26 #include "FrameXferBlock.h" |
|
27 #include "umacinternaldefinitions.h" |
|
28 |
|
29 class TWlanUserTxDataCntx; |
|
30 |
|
31 /** |
|
32 * This is a state where STA has entered to state where |
|
33 * it is able send MPDU's to a network |
|
34 */ |
|
35 class WlanDot11Associated : public WlanDot11State |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Transmit a protocol stack frame |
|
41 * |
|
42 * The frame to be sent needs to be in 802.3 format |
|
43 * @param aCtxImpl global state machine context |
|
44 * @param aDataBuffer meta header of the frame to be transmitted |
|
45 * @param aMore ETrue if another frame is also ready to be transmitted |
|
46 * EFalse otherwise |
|
47 */ |
|
48 virtual TBool TxData( |
|
49 WlanContextImpl& aCtxImpl, |
|
50 TDataBuffer& aDataBuffer, |
|
51 TBool aMore ); |
|
52 |
|
53 virtual TAny* RequestForBuffer( |
|
54 WlanContextImpl& aCtxImpl, |
|
55 TUint16 aLength ); |
|
56 |
|
57 virtual void ReceivePacket( |
|
58 WlanContextImpl& aCtxImpl, |
|
59 WHA::TStatus aStatus, |
|
60 const void* aFrame, |
|
61 TUint16 aLength, |
|
62 WHA::TRate aRate, |
|
63 WHA::TRcpi aRcpi, |
|
64 WHA::TChannelNumber aChannel, |
|
65 TUint8* aBuffer, |
|
66 TUint32 aFlags ); |
|
67 |
|
68 protected: |
|
69 |
|
70 /** |
|
71 * C++ default constructor. |
|
72 */ |
|
73 WlanDot11Associated() {}; |
|
74 |
|
75 /** |
|
76 * Destructor. |
|
77 */ |
|
78 virtual ~WlanDot11Associated() {}; |
|
79 |
|
80 virtual void DoSetTxMpduDaAddress( |
|
81 SDataFrameHeader& aDataFrameHeader, |
|
82 const TMacAddress& aMac ) const = 0; |
|
83 |
|
84 virtual TBool DoIsRxFrameSAourAddress( |
|
85 WlanContextImpl& aCtxImpl, |
|
86 const SDataFrameHeader& aFrameHeader, |
|
87 const SAmsduSubframeHeader* aSubFrameHeader = NULL ) const = 0; |
|
88 |
|
89 /** |
|
90 * Called to check is To/From DS bit combination valid |
|
91 |
|
92 * @return ETrue valid combination, EFalse else |
|
93 */ |
|
94 virtual TBool DoIsValidAddressBitCombination( |
|
95 const SDataFrameHeader& aFrameHeader ) const = 0; |
|
96 |
|
97 virtual void DoBuildEthernetFrame( |
|
98 TDataBuffer& aBuffer, |
|
99 const SDataMpduHeader& aDot11DataMpdu, |
|
100 const TUint8* aStartOfEtherPayload, |
|
101 TUint aEtherPayloadLength, |
|
102 TBool aAmsdu, |
|
103 TUint8* aCopyBuffer ) = 0; |
|
104 |
|
105 /** |
|
106 * Handles a received frame having a proprietary SNAP header |
|
107 * |
|
108 * @since S60 3.1 |
|
109 * @param aBuffer meta header for the Rx frame |
|
110 * @param aQosData ETrue if this is a QoS data frame |
|
111 * @param aFrame pointer to the start of the frame |
|
112 * @param aSubFrameHeader Pointer to the beginning of the subframe header. |
|
113 * NULL if the MSDU is not a subframe within an A-MSDU |
|
114 * @param aLength frame length |
|
115 * @param aDecryptHeaderLen length of the decrypt header of the |
|
116 * frame (e.g. IV etc.) |
|
117 * @param aDecryptTrailerLen length of the decrypt trailer of the |
|
118 * frame (e.g. MIC etc.) |
|
119 * @param aHtControlLen length of the HT Control field of the |
|
120 * frame's MAC header; or zero if field is not present |
|
121 * @param aCopyBuffer If not NULL, the frame is part of an A-MSDU |
|
122 * and it needs to be copied to the buffer denoted by this |
|
123 * pointer |
|
124 */ |
|
125 void HandleProprietarySnapRxFrame( |
|
126 TDataBuffer& aBuffer, |
|
127 TBool aQosData, |
|
128 const TAny* const aFrame, |
|
129 const SAmsduSubframeHeader* aSubFrameHeader, |
|
130 TUint aLength, |
|
131 TUint aDecryptHeaderLen, |
|
132 TUint aDecryptTrailerLen, |
|
133 TUint aHtControlLen, |
|
134 TUint8* aCopyBuffer ) const; |
|
135 |
|
136 /** |
|
137 * Called upon receiving a beacon frame |
|
138 * @param aCtxImpl statemachine context |
|
139 * @param aRcpi RCPI of the frame |
|
140 * @param aBuffer pointer to the beginning of the Rx buffer allocated |
|
141 * for the frame |
|
142 */ |
|
143 virtual void OnBeaconFrameRx( |
|
144 WlanContextImpl& aCtxImpl, |
|
145 const TAny* aFrame, |
|
146 const TUint32 aLength, |
|
147 WHA::TRcpi aRcpi, |
|
148 TUint8* aBuffer ); |
|
149 |
|
150 /** |
|
151 * Called upon receiving a probe response frame |
|
152 * @param aCtxImpl statemachine context |
|
153 * @param aRcpi RCPI of the frame |
|
154 * @param aBuffer pointer to the beginning of the Rx buffer allocated |
|
155 * for the frame |
|
156 */ |
|
157 virtual void OnProbeResponseFrameRx( |
|
158 WlanContextImpl& aCtxImpl, |
|
159 const TAny* aFrame, |
|
160 const TUint32 aLength, |
|
161 WHA::TRcpi aRcpi, |
|
162 TUint8* aBuffer ); |
|
163 |
|
164 /** |
|
165 * Called upon receiving a deauthentication frame |
|
166 * @param aCtxImpl statemachine context |
|
167 * @param aBuffer pointer to the beginning of the Rx buffer allocated |
|
168 * for the frame |
|
169 */ |
|
170 virtual void OnDeauthenticateFrameRx( |
|
171 WlanContextImpl& aCtxImpl, |
|
172 TUint8* aBuffer ); |
|
173 |
|
174 /** |
|
175 * Called upon receiving a disassociation frame |
|
176 * @param aCtxImpl statemachine context |
|
177 * @param aBuffer pointer to the beginning of the Rx buffer allocated |
|
178 * for the frame |
|
179 */ |
|
180 virtual void OnDisassociateFrameRx( |
|
181 WlanContextImpl& aCtxImpl, |
|
182 TUint8* aBuffer ); |
|
183 |
|
184 /** |
|
185 * Determines if the received 802.11 Data MPDU - excluding the contained |
|
186 * MSDU or A-MSDU - is valid |
|
187 * @param aLength Length of the MPDU |
|
188 * @param aFrameHeader MAC header of the MPDU |
|
189 * @param aQosData ETrue if the MPDU is a QoS Data frame |
|
190 * EFalse othwerwise |
|
191 * @param aAmsdu ETrue if the MPDU contains an A-MSDU |
|
192 * EFalse othwerwise |
|
193 * @param aHtControlLen Length of the HT Control field in the MPDU's MAC |
|
194 * header. Zero if the field is not present |
|
195 * @param aSecurityHeaderLen Length of the security header of the MPDU. |
|
196 * Zero if the payload is not encrypted |
|
197 * @param aSecurityTrailerLen Length of the security trailer of the MPDU. |
|
198 * Zero if the payload is not encrypted |
|
199 * @return ETrue if the MPDU is valid, EFalse otherwise |
|
200 */ |
|
201 inline TBool RxDataMpduValid( |
|
202 const TUint32 aLength, |
|
203 const SDataFrameHeader& aFrameHeader, |
|
204 TBool aQosData, |
|
205 TBool aAmsdu, |
|
206 TUint aHtControlLen, |
|
207 TUint aSecurityHeaderLen, |
|
208 TUint aSecurityTrailerLen ) const; |
|
209 |
|
210 /** |
|
211 * Determines the minimum length that the received 802.11 Data MPDU must |
|
212 * have so that we are able to process is |
|
213 * @param aQosData ETrue if the frame is a QoS Data frame |
|
214 * EFalse othwerwise |
|
215 * @param aAmsdu ETrue if the MPDU contains an A-MSDU |
|
216 * EFalse othwerwise |
|
217 * @param aHtControlLen Length of the HT Control field in the MPDU's MAC |
|
218 * header. Zero if the field is not present |
|
219 * @param aSecurityHeaderLen Length of the security header of the MPDU. |
|
220 * Zero if the payload is not encrypted |
|
221 * @param aSecurityTrailerLen Length of the security trailer of the MPDU. |
|
222 * Zero if the payload is not encrypted |
|
223 * @return |
|
224 */ |
|
225 inline TUint MinAcceptableRxDataMpduLen( |
|
226 TBool aQosData, |
|
227 TBool aAmsdu, |
|
228 TUint aHtControlLen, |
|
229 TUint aSecurityHeaderLen, |
|
230 TUint aSecurityTrailerLen ) const; |
|
231 |
|
232 /** |
|
233 * Determines whether the Destination Address (DA) of the received MPDU is |
|
234 * a unicast, a brodcast or a multicast (but not a broadcast) address |
|
235 * @param aFrameHeader MAC header of the MPDU |
|
236 * @return See above |
|
237 */ |
|
238 inline TDaType RxFrameDaType( |
|
239 const SDataFrameHeader& aFrameHeader ) const; |
|
240 |
|
241 /** |
|
242 * Determines if the received MSDU is valid to be forwarded to the |
|
243 * relevant client |
|
244 * @param aCtxImpl statemachine context |
|
245 * @param aFrameHeader MAC header of the MPDU encapsulating the MSDU |
|
246 * @param aSubFrameHeader Pointer to the beginning of the subframe header. |
|
247 * NULL if the MSDU is not a subframe within an A-MSDU |
|
248 * @param aStartOfSnap Pointer to the beginning of the SNAP header |
|
249 * @param aEtherType Ethernet type of the received MSDU |
|
250 * @param aMulticast ETrue if the frame is a multicast, EFalse otherwise |
|
251 * @param aFlags Flags from WHA frame receive method |
|
252 * @param aSnapstatus Result of the SNAP header check of the received MSDU |
|
253 * @return ETrue if the MSDU is valid, EFalse otherwise |
|
254 */ |
|
255 inline TBool RxMsduValid( |
|
256 WlanContextImpl& aCtxImpl, |
|
257 const SDataFrameHeader& aFrameHeader, |
|
258 const SAmsduSubframeHeader* aSubFrameHeader, |
|
259 const TUint8* aStartOfSnap, |
|
260 TUint16 aEtherType, |
|
261 TBool aMulticast, |
|
262 TUint32 aFlags, |
|
263 TSnapStatus& aSnapStatus ) const; |
|
264 |
|
265 /** |
|
266 * Determines the Ethernet payload length of an MSDU, which may or may not |
|
267 * be a part of an A-MSDU |
|
268 * @param aMpduLength Length of the received MPDU |
|
269 * @param aSubframeLength Length of the A-MSDU subframe. Zero if the MPDU |
|
270 * doesn't contain an A-MSDU |
|
271 * @param aQosData ETrue if the frame is a QoS Data frame |
|
272 * EFalse othwerwise |
|
273 * @param aHtControlLen Length of the HT Control field in the MPDU's MAC |
|
274 * header. Zero if the field is not present |
|
275 * @param aSecurityHeaderLen Length of the security header of the MPDU. |
|
276 * Zero if the payload is not encrypted |
|
277 * @param aSecurityTrailerLen Length of the security trailer of the MPDU. |
|
278 * Zero if the payload is not encrypted |
|
279 * @return Ethernet payload length of the MSDU |
|
280 */ |
|
281 inline TUint RxMsduEthernetPayloadLength( |
|
282 const TUint32 aMpduLength, |
|
283 TUint aSubframeLength, |
|
284 TBool aQosData, |
|
285 TUint aHtControlLen, |
|
286 TUint aSecurityHeaderLen, |
|
287 TUint aSecurityTrailerLen ) const; |
|
288 |
|
289 /** |
|
290 * Allocates a new Rx buffer for a frame to be forwarded to WLAN Mgmt client |
|
291 * @param aCtxImpl statemachine context |
|
292 * @param aProprieatarySnapFrame ETrue if the frame contains a proprietary |
|
293 * SNAP header, EFalse othwerwise |
|
294 * @param aQosFrame ETrue if the frame is a QoS Data frame |
|
295 * EFalse othwerwise |
|
296 * @param aHtControlLen Length of the HT Control field in the frame's MAC |
|
297 * header. Zero if the field is not present |
|
298 * @param aEtherPayloadLength Length of the frame's Ethernet payload |
|
299 * @return Pointer to the beginning of the allocated buffer |
|
300 * NULL if allocation is unsuccessful |
|
301 */ |
|
302 inline TUint8* NewBufForMgmtClientRxFrame( |
|
303 WlanContextImpl& aCtxImpl, |
|
304 TBool aProprieatarySnapFrame, |
|
305 TBool aQosFrame, |
|
306 TUint aHtControlLen, |
|
307 TUint aEtherPayloadLength ) const; |
|
308 |
|
309 /** |
|
310 * Determines if the received MSDU is for the protocol stack client |
|
311 * @param aEtherType Ethernet type of the received MSDU |
|
312 * @param aSnapstatus Result of the SNAP header check of the received MSDU |
|
313 * @return ETrue if the MSDU is for the protocol stack client |
|
314 * EFalse if the MSDU is for the WLAN Mgmt client |
|
315 */ |
|
316 inline TBool RxMsduForUser( |
|
317 TUint16 aEtherType, |
|
318 TSnapStatus aSnapstatus ) const; |
|
319 |
|
320 /** |
|
321 * Updates 802.11 Data frame Rx statistics |
|
322 * @param aCtxImpl statemachine context |
|
323 * @param aEtherType Ethernet type of the received frame |
|
324 * @param aMulticast ETrue if the frame is a multicast, EFalse otherwise |
|
325 * @param aAccessCategory Access Category of the received frame |
|
326 */ |
|
327 inline void UpdateDataFrameRxStatistics( |
|
328 WlanContextImpl& aCtxImpl, |
|
329 TUint16 aEtherType, |
|
330 TBool aMulticast, |
|
331 WHA::TQueueId aAccessCategory ) const; |
|
332 |
|
333 /** |
|
334 * Called upon receiving a dot11 data MPDU |
|
335 * @param aCtxImpl statemachine context |
|
336 * @param aFlags Flags from WHA frame receive method |
|
337 * @param aRcpi RCPI of the frame |
|
338 * @param aBuffer pointer to the beginning of the Rx buffer allocated |
|
339 * for the frame |
|
340 */ |
|
341 virtual void OnDataFrameRx( |
|
342 WlanContextImpl& aCtxImpl, |
|
343 const TAny* aFrame, |
|
344 const TUint32 aLength, |
|
345 TUint32 aFlags, |
|
346 WHA::TRcpi aRcpi, |
|
347 TUint8* aBuffer ); |
|
348 |
|
349 /** |
|
350 * Called upon receiving a 802.11 Management Action frame. |
|
351 * |
|
352 * @since S60 3.2 |
|
353 * @param aCtxImpl statemachine context |
|
354 * @param aFrame Pointer to the beginning of the received frame |
|
355 * @param aLength Length of the frame. Measured from the first byte of |
|
356 * the MAC header to the last byte of the frame body |
|
357 * @param aRcpi Received channel power indicator |
|
358 * @param aBuffer pointer to the beginning of the Rx buffer allocated |
|
359 * for the frame |
|
360 */ |
|
361 void OnManagementActionFrameRx( |
|
362 WlanContextImpl& aCtxImpl, |
|
363 const TAny* aFrame, |
|
364 const TUint32 aLength, |
|
365 WHA::TRcpi aRcpi, |
|
366 TUint8* aBuffer ) const; |
|
367 |
|
368 void EncapsulateFrame( |
|
369 WlanContextImpl& aCtxImpl, |
|
370 TWlanUserTxDataCntx& aDataCntx, |
|
371 TDataBuffer& aDataBuffer, |
|
372 TUint16& aEtherType ); |
|
373 |
|
374 /** |
|
375 * Determines if Tx frames need to be encrypted |
|
376 * |
|
377 * @since S60 3.2 |
|
378 * @param aCtxImpl statemachine context |
|
379 * @param aDataBuffer meta header of the frame to be transmitted |
|
380 * @return ETrue if Tx frames need to be encrypted |
|
381 * EFalse otherwise |
|
382 */ |
|
383 TBool EncryptTxFrames( |
|
384 WlanContextImpl& aCtxImpl, |
|
385 const TDataBuffer& aDataBuffer ) const; |
|
386 |
|
387 /** |
|
388 * Determines the space in bytes to be reserved for the security header |
|
389 * in the MPDU to be transmitted |
|
390 * |
|
391 * @param aCtxImpl statemachine context |
|
392 * @param aDataBuffer meta header of the frame to be transmitted |
|
393 * @return See above |
|
394 */ |
|
395 TUint ComputeEncryptionOffsetAmount( |
|
396 const WlanContextImpl& aCtxImpl, |
|
397 const TDataBuffer& aDataBuffer ) const; |
|
398 |
|
399 /** |
|
400 * Determines the space in bytes to be reserved for the security trailer |
|
401 * in the MPDU to be transmitted |
|
402 * |
|
403 * @param aCtxImpl statemachine context |
|
404 * @param aDataBuffer meta header of the frame to be transmitted |
|
405 * @return See above |
|
406 */ |
|
407 TUint EncryptTrailerLength( |
|
408 WlanContextImpl& aCtxImpl, |
|
409 const TDataBuffer& aDataBuffer ) const; |
|
410 |
|
411 TUint ComputeQosOffsetAmount( WlanContextImpl& aCtxImpl ) const; |
|
412 |
|
413 TUint DecryptHdrOffset( |
|
414 WlanContextImpl& aCtxImpl, |
|
415 TUint32 aFlags ) const; |
|
416 |
|
417 TUint DecryptTrailerOffset( |
|
418 WlanContextImpl& aCtxImpl, |
|
419 TUint32 aFlags ) const; |
|
420 |
|
421 /** |
|
422 * Checks the validity of SNAP header |
|
423 * |
|
424 * @since S60 3.1 |
|
425 * @param aCtxImpl statemachine context |
|
426 * @param aStartOfSnap is a pointer to the start of the SNAP header |
|
427 */ |
|
428 TSnapStatus ValiDateSnapHeader( |
|
429 WlanContextImpl& aCtxImpl, |
|
430 const TUint8* aStartOfSnap ) const; |
|
431 |
|
432 void EncapsulateEthernetFrame( |
|
433 WlanContextImpl& aCtxImpl, |
|
434 TWlanUserTxDataCntx& aDataCntx, |
|
435 TDataBuffer& aDataBuffer, |
|
436 TUint16& aEtherType ) const; |
|
437 |
|
438 /** |
|
439 * Encapsulates a frame starting with a proprietary SNAP header inside an |
|
440 * MPDU |
|
441 * |
|
442 * @since S60 3.1 |
|
443 * @param aCtxImpl global statemachine context |
|
444 * @param aDataCntx user Tx frame context |
|
445 * @param aDataBuffer meta header of the frame to be transmitted |
|
446 * @param aEncrypt ETrue if the frame needs to be encrypted |
|
447 * EFalse otherwise |
|
448 * @param aEncryptionOffset Length (bytes) to be reserved for the |
|
449 * encryption header |
|
450 * @param aEncryptTrailerLength Length (bytes) to be reserved for the |
|
451 * encryption trailer |
|
452 * @param aQosOffset Length (bytes) to be reserved for the |
|
453 * QoS Control field |
|
454 * @param aHtControlOffset Length (bytes) to be reserved for the |
|
455 * HT Control field |
|
456 */ |
|
457 void EncapsulateSnapFrame( |
|
458 WlanContextImpl& aCtxImpl, |
|
459 TWlanUserTxDataCntx& aDataCntx, |
|
460 TDataBuffer& aDataBuffer, |
|
461 TBool aEncrypt, |
|
462 TUint aEncryptionOffset, |
|
463 TUint aEncryptTrailerLength, |
|
464 TUint aQosOffset, |
|
465 TUint aHtControlOffset ) const; |
|
466 |
|
467 /** |
|
468 * Sets a ready made 802.11 frame to Tx buffer |
|
469 * |
|
470 * @since S60 3.2 |
|
471 * @param aCtxImpl global statemachine context |
|
472 * @param aDataCntx user Tx frame context |
|
473 * @param aDataBuffer meta header of the frame to be transmitted |
|
474 */ |
|
475 void SetDot11FrameToTxBuffer( |
|
476 const WlanContextImpl& aCtxImpl, |
|
477 TWlanUserTxDataCntx& aDataCntx, |
|
478 TDataBuffer& aDataBuffer ) const; |
|
479 |
|
480 /** |
|
481 * Indicates Consecutive Beacons Lost |
|
482 * to WLAN Mgmt Client; if necessary |
|
483 * |
|
484 * @since S60 5.0 |
|
485 * @param aCtxImpl global statemachine context |
|
486 */ |
|
487 virtual void DoConsecutiveBeaconsLostIndication( WlanContextImpl& aCtxImpl ); |
|
488 |
|
489 /** |
|
490 * Indicates Consecutive Tx Failures |
|
491 * to WLAN Mgmt Client; if necessary |
|
492 * |
|
493 * @since S60 5.0 |
|
494 * @param aCtxImpl global statemachine context |
|
495 */ |
|
496 virtual void DoConsecutiveTxFailuresIndication( WlanContextImpl& aCtxImpl ); |
|
497 |
|
498 virtual void DoRegainedBSSIndication( WlanContextImpl& aCtxImpl ); |
|
499 |
|
500 virtual void OnPacketSendComplete( |
|
501 WlanContextImpl& aCtxImpl, |
|
502 WHA::TStatus aStatus, |
|
503 TUint32 aPacketId, |
|
504 WHA::TRate aRate, |
|
505 TUint32 aPacketQueueDelay, |
|
506 TUint32 aMediaDelay, |
|
507 TUint aTotalTxDelay, |
|
508 TUint8 aAckFailures, |
|
509 WHA::TQueueId aQueueId, |
|
510 WHA::TRate aRequestedRate, |
|
511 TBool aMulticastData ); |
|
512 |
|
513 /** |
|
514 * Adds a multicast MAC address and starts to filter (Rx) multicast |
|
515 * traffic sent to any other MAC addresses than those that have been |
|
516 * specified using this method |
|
517 * @param aCtxImpl statemachine context |
|
518 * @param aMacAddr The address to be added |
|
519 * @return ETrue if a state change occurred in the state machine |
|
520 * EFalse otherwise |
|
521 */ |
|
522 virtual TBool AddMulticastAddr( |
|
523 WlanContextImpl& aCtxImpl, |
|
524 const TMacAddress& aMacAddr ); |
|
525 |
|
526 /** |
|
527 * Removes a multicast MAC address from multicast (Rx) filtering |
|
528 * configuration. So any packet that we receive and which has been sent |
|
529 * to the multicast address in question is not accepted any more (i.e. |
|
530 * it is filtered). |
|
531 * However, if there are no addresses left in the multicast (Rx) filtering |
|
532 * configuration after this remove, the multicast filtering is disabled |
|
533 * and all (otherwise acceptable) multicast packets are accepted again. |
|
534 * @param aCtxImpl statemachine context |
|
535 * @param aMacAddr The address to be removed |
|
536 * @return ETrue if a state change occurred in the state machine |
|
537 * EFalse otherwise |
|
538 */ |
|
539 virtual TBool RemoveMulticastAddr( |
|
540 WlanContextImpl& aCtxImpl, |
|
541 TBool aRemoveAll, |
|
542 const TMacAddress& aMacAddr ); |
|
543 |
|
544 /** |
|
545 * From MWlanUserEvent |
|
546 * Add/set (or replace) a broadcast WEP key |
|
547 * |
|
548 * @since S60 3.1 |
|
549 * @param aCtxImpl statemachine context |
|
550 * @param aKeyIndex Index of the key in the default key table |
|
551 * @param aKeyLength Length of the key in BYTES |
|
552 * @param aKey The WEP key |
|
553 * @param aMac MAC address associated with the key |
|
554 * @return ETrue if state transition occurred, EFalse otherwise |
|
555 */ |
|
556 virtual TBool AddBroadcastWepKey( |
|
557 WlanContextImpl& aCtxImpl, |
|
558 TUint32 aKeyIndex, |
|
559 TBool aUseAsDefaulKey, |
|
560 TUint32 aKeyLength, |
|
561 const TUint8 aKey[KMaxWEPKeyLength], |
|
562 const TMacAddress& aMac ); |
|
563 |
|
564 /** |
|
565 * From MWlanUserEvent |
|
566 * Reconfigures the specified Tx queue if necessary |
|
567 * |
|
568 * @since S60 v3.2 |
|
569 * @param aCtxImpl statemachine context |
|
570 * @param aQueueId ID of the queue to reconfigure |
|
571 * @param aMediumTime The amount of time the queue is allowed to access |
|
572 * the WLAN air interface. |
|
573 * @param aMaxTxMSDULifetime Maximum Transmit MSDU Lifetime to be used |
|
574 * for the specified queue. |
|
575 * @return ETrue if a state change occurred |
|
576 * EFalse otherwise |
|
577 */ |
|
578 virtual TBool ConfigureTxQueueIfNecessary( |
|
579 WlanContextImpl& aCtxImpl, |
|
580 TQueueId aQueueId, |
|
581 TUint16 aMediumTime, |
|
582 TUint32 aMaxTxMSDULifetime ); |
|
583 |
|
584 /** |
|
585 * Sets the WHA::KMibDot11GroupAddressesTable MIB |
|
586 * |
|
587 * @param aCtxImpl statemachine context |
|
588 * @return ETrue if a state change occurred in the state machine |
|
589 * EFalse otherwise |
|
590 */ |
|
591 TBool SetGroupAddressesTableMib( |
|
592 WlanContextImpl& aCtxImpl ); |
|
593 |
|
594 /** |
|
595 * If the power mgmt mode needs to be changed - based on |
|
596 * aPowerMgmtModeChange - proceeds with the necessary actions |
|
597 * |
|
598 * @param aCtxImpl statemachine context |
|
599 * @param aPowerMgmtModeChange |
|
600 * @return ETrue if a state change occurred in the state machine |
|
601 * EFalse otherwise |
|
602 */ |
|
603 TBool PowerMgmtModeChange( |
|
604 WlanContextImpl& aCtxImpl, |
|
605 TPowerMgmtModeChange aPowerMgmtModeChange ); |
|
606 |
|
607 private: |
|
608 |
|
609 /** |
|
610 * Configures Tx rate policy objects, sets the policy object to use for |
|
611 * every Tx Queue / QoS AC, and also sets the Initial Max Tx Rate to be |
|
612 * used for the configured policy objects |
|
613 * |
|
614 * @since S60 v3.1 |
|
615 * @param aCtxImpl statemachine context |
|
616 * @param aRatePolicy rate policy (policy objects) |
|
617 * @param aQueue2RateClass Tx queue (AC) to rate policy object mapping |
|
618 * @param aInitialMaxTxRate4RateClass initial max Tx rate for the |
|
619 * policy objects |
|
620 * @param aAutoRatePolicy auto rate policy |
|
621 * @param aHtMcsPolicy HT MCS policy |
|
622 * @return ETrue if a state change occurred |
|
623 * EFalse otherwise |
|
624 */ |
|
625 virtual TBool ConfigureTxRatePolicies( |
|
626 WlanContextImpl& aCtxImpl, |
|
627 const TTxRatePolicy& aRatePolicy, |
|
628 const TQueue2RateClass& aQueue2RateClass, |
|
629 const TInitialMaxTxRate4RateClass& aInitialMaxTxRate4RateClass, |
|
630 const TTxAutoRatePolicy& aAutoRatePolicy, |
|
631 const THtMcsPolicy& aHtMcsPolicy ); |
|
632 |
|
633 /** |
|
634 * Configures dynamic power mode management traffic override |
|
635 * |
|
636 * The settings here become effective once using the PS mode has been |
|
637 * allowed by WLAN Mgmt Client. |
|
638 * When a setting below is ETrue, any amount of Rx or Tx traffic via |
|
639 * the AC in question won't cause a change from PS to CAM mode once PS |
|
640 * mode has been entered, and traffic via that AC won't make us to |
|
641 * stay in CAM either. |
|
642 * Every AC has a separate setting for U-APSD and legacy PS. |
|
643 * The U-APSD setting is used if U-APSD is used for the AC in question. |
|
644 * Otherwise the corresponding legacy setting is used. |
|
645 * |
|
646 * @since S60 3.2 |
|
647 * @param aCtxImpl statemachine context |
|
648 * @param aStayInPsDespiteUapsdVoiceTraffic U-APSD Voice AC setting |
|
649 * @param aStayInPsDespiteUapsdVideoTraffic U-APSD Video AC setting |
|
650 * @param aStayInPsDespiteUapsdBestEffortTraffic U-APSD Best Effort AC |
|
651 * setting |
|
652 * @param aStayInPsDespiteUapsdBackgroundTraffic U-APSD Background AC |
|
653 * setting |
|
654 * @param aStayInPsDespiteLegacyVoiceTraffic legacy Voice AC setting |
|
655 * @param aStayInPsDespiteLegacyVideoTraffic legacy Video AC setting |
|
656 * @param aStayInPsDespiteLegacyBestEffortTraffic legacy Best Effort AC |
|
657 * setting |
|
658 * @param aStayInPsDespiteLegacyBackgroundTraffic legacy Background AC |
|
659 * setting |
|
660 * @return ETrue if a state change occurred |
|
661 * EFalse otherwise |
|
662 */ |
|
663 virtual TBool ConfigurePwrModeMgmtTrafficOverride( |
|
664 WlanContextImpl& aCtxImpl, |
|
665 TBool aStayInPsDespiteUapsdVoiceTraffic, |
|
666 TBool aStayInPsDespiteUapsdVideoTraffic, |
|
667 TBool aStayInPsDespiteUapsdBestEffortTraffic, |
|
668 TBool aStayInPsDespiteUapsdBackgroundTraffic, |
|
669 TBool aStayInPsDespiteLegacyVoiceTraffic, |
|
670 TBool aStayInPsDespiteLegacyVideoTraffic, |
|
671 TBool aStayInPsDespiteLegacyBestEffortTraffic, |
|
672 TBool aStayInPsDespiteLegacyBackgroundTraffic ); |
|
673 |
|
674 // Prohibit copy constructor |
|
675 WlanDot11Associated( const WlanDot11Associated& ); |
|
676 // Prohibit assigment operator |
|
677 WlanDot11Associated& operator= ( const WlanDot11Associated& ); |
|
678 |
|
679 }; |
|
680 |
|
681 #endif // WLANDOT11ASSOCIATED_H |