|
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: Implementation of the WlanDot11MibDefaultConfigure class |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 26 % |
|
20 */ |
|
21 |
|
22 #include "config.h" |
|
23 #include "UmacDot11MibDefaultConfigure.h" |
|
24 #include "wha_mibDefaultvalues.h" |
|
25 #include "umacwhatodot11typeconverter.h" |
|
26 #include "UmacWsaWriteMib.h" |
|
27 #include "UmacContextImpl.h" |
|
28 |
|
29 const TUint KAllocLen = 512; |
|
30 |
|
31 #ifndef NDEBUG |
|
32 const TInt8 WlanDot11MibDefaultConfigure::iName[] |
|
33 = "dot11-mibdefaultconfigure"; |
|
34 |
|
35 const TUint8 WlanDot11MibDefaultConfigure::iStateName |
|
36 [ESTATEMAX][KMaxStateStringLength] = |
|
37 { |
|
38 {"EINIT"}, |
|
39 {"ESETDOT11MAXRECEIVELIFETIME"}, |
|
40 {"ESETDOT11SLOTTIME"}, |
|
41 {"ESETDOT11GROUPADDRSTABLE"}, |
|
42 {"ESETDOT11WEPDEFAULTKEY"}, |
|
43 {"ESETDOT11CURRENTTXPOWERLEVEL"}, |
|
44 {"ESETDOT11RTSTHRESHOLD"}, |
|
45 {"ESETCTSTOSELF"}, |
|
46 {"ESETARPIPADDRSTABLE"}, |
|
47 {"ESETPROBEREQUESTTEMPLATE"}, |
|
48 {"ESETRXFILTER"}, |
|
49 {"ESETBEACONFILTERIETABLE"}, |
|
50 {"ESETBEACONFILTERENABLE"}, |
|
51 {"ESETWLANWAKEUPINTERVAL"}, |
|
52 {"ESETBEACONLOSTCOUNT"}, |
|
53 {"ESETRCPITHRESHOLD"}, |
|
54 {"ESETTXRATEPOLICY"}, |
|
55 {"ESETHTCAPABILITIES"}, |
|
56 {"ESETHTBSSOPERATION"}, |
|
57 {"ESETHTSECONDARYBEACON"}, |
|
58 {"ESETHTBLOCKACKCONFIGURE"}, |
|
59 {"ECONTINUEDOT11TRAVERSE"} |
|
60 }; |
|
61 |
|
62 const TUint8 WlanDot11MibDefaultConfigure::iEventName |
|
63 [EEVENTMAX][KMaxEventStringLength] = |
|
64 { |
|
65 {"ESTATEENTRY"}, {"ETXCOMPLETE"}, {"EABORT"} |
|
66 }; |
|
67 #endif |
|
68 |
|
69 // ============================ MEMBER FUNCTIONS =============================== |
|
70 |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 WlanDot11MibDefaultConfigure::~WlanDot11MibDefaultConfigure() |
|
77 { |
|
78 iMemory = NULL; |
|
79 } |
|
80 |
|
81 #ifndef NDEBUG |
|
82 // ----------------------------------------------------------------------------- |
|
83 // |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 const TInt8* WlanDot11MibDefaultConfigure::GetStateName( |
|
87 TUint8& aLength ) const |
|
88 { |
|
89 aLength = sizeof( iName ); |
|
90 return iName; |
|
91 } |
|
92 #endif |
|
93 |
|
94 // --------------------------------------------------------- |
|
95 // WlanDot11MibDefaultConfigure::Entry |
|
96 // (other items were commented in a header). |
|
97 // --------------------------------------------------------- |
|
98 // |
|
99 void WlanDot11MibDefaultConfigure::Entry( |
|
100 WlanContextImpl& aCtxImpl ) |
|
101 { |
|
102 if ( aCtxImpl.WsaCmdActive() ) |
|
103 { |
|
104 // sanity checking code |
|
105 OsAssert( (TUint8*)("UMAC * panic"), |
|
106 (TUint8*)(WLAN_FILE), __LINE__ ); |
|
107 } |
|
108 |
|
109 // we don't want to do event dispatching here as we want to set the |
|
110 // mib default values without interruptions |
|
111 |
|
112 if ( iState != EINIT ) |
|
113 { |
|
114 // this is NOT the start of the the FSM actions |
|
115 // note that we send the ETXCOMPLETE event as the states |
|
116 // that wait for it are the only ones that can be interrupted |
|
117 // as they are asynchronous operations by nature |
|
118 // and wait for corresponding WHA completion method |
|
119 Fsm( aCtxImpl, ETXCOMPLETE ); |
|
120 } |
|
121 else |
|
122 { |
|
123 // this is the start of the the FSM actions |
|
124 Fsm( aCtxImpl, ESTATEENTRY ); |
|
125 } |
|
126 } |
|
127 |
|
128 // --------------------------------------------------------- |
|
129 // WlanDot11MibDefaultConfigure::Exit |
|
130 // (other items were commented in a header). |
|
131 // --------------------------------------------------------- |
|
132 // |
|
133 void WlanDot11MibDefaultConfigure::Exit( |
|
134 WlanContextImpl& /*aCtxImpl*/ ) |
|
135 { |
|
136 // we are traversing to a new dot11 state |
|
137 // make sure we don't generate a memory leakage |
|
138 os_free( iMemory ); |
|
139 iState = EINIT; |
|
140 } |
|
141 |
|
142 // --------------------------------------------------------- |
|
143 // WlanDot11MibDefaultConfigure::ChangeInternalState |
|
144 // (other items were commented in a header). |
|
145 // --------------------------------------------------------- |
|
146 // |
|
147 void WlanDot11MibDefaultConfigure::ChangeInternalState( |
|
148 WlanContextImpl& aCtxImpl, |
|
149 TState aNewState ) |
|
150 { |
|
151 iState = aNewState; |
|
152 Fsm( aCtxImpl, ESTATEENTRY ); |
|
153 } |
|
154 |
|
155 // ----------------------------------------------------------------------------- |
|
156 // WlanDot11MibDefaultConfigure::Fsm |
|
157 // (other items were commented in a header). |
|
158 // ----------------------------------------------------------------------------- |
|
159 // |
|
160 void WlanDot11MibDefaultConfigure::Fsm( |
|
161 WlanContextImpl& aCtxImpl, |
|
162 TEvent aEvent ) |
|
163 { |
|
164 OsTracePrint( KUmacDetails, |
|
165 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::Fsm(): FSM EVENT") ); |
|
166 #ifndef NDEBUG |
|
167 OsTracePrint( |
|
168 KUmacDetails, |
|
169 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::Fsm(): event:")); |
|
170 OsTracePrint( KUmacDetails, iEventName[aEvent] ); |
|
171 OsTracePrint( |
|
172 KUmacDetails, |
|
173 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::Fsm(): state:")); |
|
174 OsTracePrint( KUmacDetails, iStateName[iState] ); |
|
175 #endif |
|
176 |
|
177 switch ( aEvent ) |
|
178 { |
|
179 case ESTATEENTRY: |
|
180 OnStateEntryEvent( aCtxImpl ); |
|
181 break; |
|
182 case ETXCOMPLETE: |
|
183 OnTxCompleteEvent( aCtxImpl ); |
|
184 break; |
|
185 case EABORT: |
|
186 OnAbortEvent( aCtxImpl ); |
|
187 break; |
|
188 default: |
|
189 // catch internal FSM programming error |
|
190 OsTracePrint( |
|
191 KErrorLevel, |
|
192 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::Fsm(): event: %d"), aEvent); |
|
193 OsAssert( |
|
194 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::Fsm(): panic"), |
|
195 (TUint8*)(WLAN_FILE), __LINE__ ); |
|
196 break; |
|
197 } |
|
198 } |
|
199 |
|
200 // ----------------------------------------------------------------------------- |
|
201 // WlanDot11MibDefaultConfigure::OnStateEntryEvent |
|
202 // Handler for state entry event. |
|
203 // It is guaranteed by the FSM framework that no WHA command is pending |
|
204 // when this method is entered |
|
205 // (other items were commented in a header). |
|
206 // ----------------------------------------------------------------------------- |
|
207 // |
|
208 void WlanDot11MibDefaultConfigure::OnStateEntryEvent( |
|
209 WlanContextImpl& aCtxImpl ) |
|
210 { |
|
211 switch ( iState ) |
|
212 { |
|
213 case EINIT: |
|
214 iMemory = os_alloc( KAllocLen ); |
|
215 if ( iMemory ) |
|
216 { |
|
217 // start the FSM traversal |
|
218 ChangeInternalState( aCtxImpl, |
|
219 ESETDOT11MAXRECEIVELIFETIME ); |
|
220 } |
|
221 else |
|
222 { |
|
223 // allocation failure |
|
224 Fsm( aCtxImpl, EABORT ); |
|
225 } |
|
226 break; |
|
227 case ESETDOT11MAXRECEIVELIFETIME: |
|
228 SetDot11MaxReceiveLifeTime( aCtxImpl ); |
|
229 break; |
|
230 case ESETDOT11SLOTTIME: |
|
231 SetDot11SlotTime( aCtxImpl ); |
|
232 break; |
|
233 case ESETDOT11GROUPADDRSTABLE: |
|
234 SetDot11GroupAddrsTable( aCtxImpl ); |
|
235 break; |
|
236 case ESETDOT11WEPDEFAULTKEY: |
|
237 SetDot11WepDefaultKey( aCtxImpl ); |
|
238 break; |
|
239 case ESETDOT11CURRENTTXPOWERLEVEL: |
|
240 SetDot11CurrentTxPowerLevel( aCtxImpl ); |
|
241 break; |
|
242 case ESETDOT11RTSTHRESHOLD: |
|
243 SetDot11RtsThreshold( aCtxImpl ); |
|
244 break; |
|
245 case ESETCTSTOSELF: |
|
246 SetCtsToSelf( aCtxImpl ); |
|
247 break; |
|
248 case ESETARPIPADDRSTABLE: |
|
249 SetArpIpAddrsTable( aCtxImpl ); |
|
250 break; |
|
251 case ESETPROBEREQUESTTEMPLATE: |
|
252 SetProbeRequestTemplate( aCtxImpl ); |
|
253 break; |
|
254 case ESETRXFILTER: |
|
255 SetRxFilter( aCtxImpl ); |
|
256 break; |
|
257 case ESETBEACONFILTERIETABLE: |
|
258 SetBeaconFilterIeTable( aCtxImpl ); |
|
259 break; |
|
260 case ESETBEACONFILTERENABLE: |
|
261 SetBeaconFilterEnable( aCtxImpl ); |
|
262 break; |
|
263 case ESETWLANWAKEUPINTERVAL: |
|
264 SetWlanWakeupInterval( aCtxImpl ); |
|
265 break; |
|
266 case ESETBEACONLOSTCOUNT: |
|
267 SetBeaconLostCount( aCtxImpl ); |
|
268 break; |
|
269 case ESETRCPITHRESHOLD: |
|
270 SetRcpiThreshold( aCtxImpl ); |
|
271 break; |
|
272 case ESETTXRATEPOLICY: |
|
273 SetTxRatePolicy( aCtxImpl ); |
|
274 break; |
|
275 case ESETHTCAPABILITIES: |
|
276 SetHtCapabilities( aCtxImpl ); |
|
277 break; |
|
278 case ESETHTBSSOPERATION: |
|
279 SetHtBssOperation( aCtxImpl ); |
|
280 break; |
|
281 case ESETHTSECONDARYBEACON: |
|
282 SetHtSecondaryBeacon( aCtxImpl ); |
|
283 break; |
|
284 case ESETHTBLOCKACKCONFIGURE: |
|
285 SetHtBlockAckConfigure( aCtxImpl ); |
|
286 break; |
|
287 case ECONTINUEDOT11TRAVERSE: |
|
288 // our dot11 transition is fixed and we shall take it |
|
289 // change global dot11 state: entry procedure triggers action |
|
290 ChangeState( aCtxImpl, |
|
291 *this, // prev state |
|
292 aCtxImpl.iStates.iIdleState // next state |
|
293 ); |
|
294 break; |
|
295 default: |
|
296 // catch internal FSM programming error |
|
297 OsTracePrint( KErrorLevel, (TUint8*) |
|
298 ("UMAC: WlanDot11MibDefaultConfigure::OnStateEntryEvent(): state: %d"), |
|
299 iState); |
|
300 OsAssert( (TUint8*) |
|
301 ("UMAC: WlanDot11MibDefaultConfigure::OnStateEntryEvent(): panic"), |
|
302 (TUint8*)(WLAN_FILE), __LINE__ ); |
|
303 break; |
|
304 } |
|
305 } |
|
306 |
|
307 // ----------------------------------------------------------------------------- |
|
308 // Handler for tx complete event. |
|
309 // It is guaranteed by the FSM framework that no WHA command is pending |
|
310 // when this method is entered |
|
311 // ----------------------------------------------------------------------------- |
|
312 // |
|
313 void WlanDot11MibDefaultConfigure::OnTxCompleteEvent( |
|
314 WlanContextImpl& aCtxImpl ) |
|
315 { |
|
316 switch ( iState ) |
|
317 { |
|
318 case ESETDOT11MAXRECEIVELIFETIME: |
|
319 if ( aCtxImpl.WHASettings().iCapability |
|
320 & WHA::SSettings::KDot11SlotTime ) |
|
321 { |
|
322 // supported |
|
323 ChangeInternalState( |
|
324 aCtxImpl, ESETDOT11SLOTTIME ); |
|
325 } |
|
326 else |
|
327 { |
|
328 OsTracePrint( KWarningLevel, (TUint8*) |
|
329 ("UMAC * dot11-mibdefaultconfigure")); |
|
330 OsTracePrint( KWarningLevel, (TUint8*) |
|
331 ("no support for dot11slottime mib skipping")); |
|
332 ChangeInternalState( aCtxImpl, |
|
333 ESETDOT11GROUPADDRSTABLE ); |
|
334 } |
|
335 break; |
|
336 case ESETDOT11SLOTTIME: |
|
337 ChangeInternalState( aCtxImpl, |
|
338 ESETDOT11GROUPADDRSTABLE ); |
|
339 break; |
|
340 case ESETDOT11GROUPADDRSTABLE: |
|
341 ChangeInternalState( aCtxImpl, |
|
342 ESETDOT11WEPDEFAULTKEY ); |
|
343 break; |
|
344 case ESETDOT11WEPDEFAULTKEY: |
|
345 ChangeInternalState( aCtxImpl, |
|
346 ESETDOT11CURRENTTXPOWERLEVEL ); |
|
347 break; |
|
348 case ESETDOT11CURRENTTXPOWERLEVEL: |
|
349 ChangeInternalState( aCtxImpl, |
|
350 ESETDOT11RTSTHRESHOLD ); |
|
351 break; |
|
352 case ESETDOT11RTSTHRESHOLD: |
|
353 ChangeInternalState( aCtxImpl, |
|
354 ESETCTSTOSELF ); |
|
355 break; |
|
356 case ESETCTSTOSELF: |
|
357 ChangeInternalState( aCtxImpl, |
|
358 ESETARPIPADDRSTABLE ); |
|
359 break; |
|
360 case ESETARPIPADDRSTABLE: |
|
361 ChangeInternalState( aCtxImpl, |
|
362 ESETPROBEREQUESTTEMPLATE ); |
|
363 break; |
|
364 case ESETPROBEREQUESTTEMPLATE: |
|
365 ChangeInternalState( aCtxImpl, |
|
366 ESETRXFILTER ); |
|
367 break; |
|
368 case ESETRXFILTER: |
|
369 ChangeInternalState( aCtxImpl, |
|
370 ESETBEACONFILTERIETABLE ); |
|
371 break; |
|
372 case ESETBEACONFILTERIETABLE: |
|
373 ChangeInternalState( aCtxImpl, |
|
374 ESETBEACONFILTERENABLE ); |
|
375 break; |
|
376 case ESETBEACONFILTERENABLE: |
|
377 ChangeInternalState( aCtxImpl, |
|
378 ESETWLANWAKEUPINTERVAL ); |
|
379 break; |
|
380 case ESETWLANWAKEUPINTERVAL: |
|
381 ChangeInternalState( aCtxImpl, |
|
382 ESETBEACONLOSTCOUNT ); |
|
383 break; |
|
384 case ESETBEACONLOSTCOUNT: |
|
385 ChangeInternalState( aCtxImpl, |
|
386 ESETRCPITHRESHOLD ); |
|
387 break; |
|
388 case ESETRCPITHRESHOLD: |
|
389 ChangeInternalState( aCtxImpl, |
|
390 ESETTXRATEPOLICY ); |
|
391 break; |
|
392 case ESETTXRATEPOLICY: |
|
393 if ( aCtxImpl.WHASettings().iCapability |
|
394 & WHA::SSettings::KHtOperation ) |
|
395 { |
|
396 // supported |
|
397 ChangeInternalState( |
|
398 aCtxImpl, ESETHTCAPABILITIES ); |
|
399 } |
|
400 else |
|
401 { |
|
402 // HT not supported, so we will skip setting the HT related |
|
403 // MIBs |
|
404 OsTracePrint( KWarningLevel, (TUint8*) |
|
405 ("UMAC: WlanDot11MibDefaultConfigure::OnTxCompleteEvent: no HT support, skipping HT related mibs")); |
|
406 ChangeInternalState( aCtxImpl, |
|
407 ECONTINUEDOT11TRAVERSE ); |
|
408 } |
|
409 break; |
|
410 case ESETHTCAPABILITIES: |
|
411 ChangeInternalState( aCtxImpl, |
|
412 ESETHTBSSOPERATION ); |
|
413 break; |
|
414 case ESETHTBSSOPERATION: |
|
415 ChangeInternalState( aCtxImpl, |
|
416 ESETHTSECONDARYBEACON ); |
|
417 break; |
|
418 case ESETHTSECONDARYBEACON: |
|
419 ChangeInternalState( aCtxImpl, |
|
420 ESETHTBLOCKACKCONFIGURE ); |
|
421 break; |
|
422 case ESETHTBLOCKACKCONFIGURE: |
|
423 ChangeInternalState( aCtxImpl, |
|
424 ECONTINUEDOT11TRAVERSE ); |
|
425 break; |
|
426 default: |
|
427 // catch internal FSM programming error |
|
428 OsTracePrint( |
|
429 KErrorLevel, |
|
430 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::OnTxCompleteEvent(): state: %d"), |
|
431 iState); |
|
432 OsAssert( |
|
433 (TUint8*)("UMAC: UMAC: WlanDot11MibDefaultConfigure::OnTxCompleteEvent(): panic"), |
|
434 (TUint8*)(WLAN_FILE), __LINE__ ); |
|
435 break; |
|
436 } |
|
437 } |
|
438 |
|
439 // --------------------------------------------------------- |
|
440 // WlanDot11MibDefaultConfigure::OnAbortEvent |
|
441 // simulate macnotresponding error |
|
442 // (other items were commented in a header). |
|
443 // --------------------------------------------------------- |
|
444 // |
|
445 void WlanDot11MibDefaultConfigure::OnAbortEvent( |
|
446 WlanContextImpl& aCtxImpl ) |
|
447 { |
|
448 // memory is released by Exit() method |
|
449 OsTracePrint( KWarningLevel, |
|
450 (TUint8*)("UMAC * dot11-mibdefaultconfigure * abort") ); |
|
451 |
|
452 DoErrorIndication( aCtxImpl, WHA::KErrorMacNotResponding ); |
|
453 } |
|
454 |
|
455 // --------------------------------------------------------- |
|
456 // WlanDot11MibDefaultConfigure::SetDot11MaxReceiveLifeTime |
|
457 // (other items were commented in a header). |
|
458 // --------------------------------------------------------- |
|
459 // |
|
460 void WlanDot11MibDefaultConfigure::SetDot11MaxReceiveLifeTime( |
|
461 WlanContextImpl& aCtxImpl ) |
|
462 { |
|
463 OsTracePrint( KUmacDetails, |
|
464 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetDot11MaxReceiveLifeTime()") ); |
|
465 |
|
466 WHA::Sdot11MaxReceiveLifeTime* mib |
|
467 = static_cast<WHA::Sdot11MaxReceiveLifeTime*>(iMemory); |
|
468 *mib = WHA::KDot11MaxReceiveLifeTimeMibDefault; |
|
469 |
|
470 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
471 |
|
472 wsa_cmd.Set( |
|
473 aCtxImpl, WHA::KMibDot11MaxReceiveLifetime, sizeof(*mib), mib ); |
|
474 |
|
475 // change global state: entry procedure triggers action |
|
476 ChangeState( aCtxImpl, |
|
477 *this, // prev state |
|
478 wsa_cmd // next state |
|
479 ); |
|
480 } |
|
481 |
|
482 // --------------------------------------------------------- |
|
483 // WlanDot11MibDefaultConfigure::SetDot11SlotTime |
|
484 // (other items were commented in a header). |
|
485 // --------------------------------------------------------- |
|
486 // |
|
487 void WlanDot11MibDefaultConfigure::SetDot11SlotTime( |
|
488 WlanContextImpl& aCtxImpl ) |
|
489 { |
|
490 OsTracePrint( KUmacDetails, |
|
491 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetDot11SlotTime()") ); |
|
492 |
|
493 WHA::Sdot11SlotTime* mib |
|
494 = static_cast<WHA::Sdot11SlotTime*>(iMemory); |
|
495 *mib = WHA::KDot11SlotTimeMibDefault; |
|
496 |
|
497 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
498 |
|
499 wsa_cmd.Set( |
|
500 aCtxImpl, WHA::KMibDot11SlotTime, sizeof(*mib), mib ); |
|
501 |
|
502 // change global state: entry procedure triggers action |
|
503 ChangeState( aCtxImpl, |
|
504 *this, // prev state |
|
505 wsa_cmd // next state |
|
506 ); |
|
507 } |
|
508 |
|
509 // --------------------------------------------------------- |
|
510 // WlanDot11MibDefaultConfigure::SetDot11GroupAddrsTable |
|
511 // (other items were commented in a header). |
|
512 // --------------------------------------------------------- |
|
513 // |
|
514 void WlanDot11MibDefaultConfigure::SetDot11GroupAddrsTable( |
|
515 WlanContextImpl& aCtxImpl ) |
|
516 { |
|
517 OsTracePrint( KUmacDetails, |
|
518 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetDot11GroupAddrsTable()") ); |
|
519 |
|
520 WHA::Sdot11GroupAddressesTable* mib |
|
521 = static_cast<WHA::Sdot11GroupAddressesTable*>(iMemory); |
|
522 *mib = WHA::KDot11GroupAddressesTableMibDefault; |
|
523 |
|
524 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
525 |
|
526 wsa_cmd.Set( |
|
527 aCtxImpl, WHA::KMibDot11GroupAddressesTable, sizeof(*mib), mib ); |
|
528 |
|
529 // change global state: entry procedure triggers action |
|
530 ChangeState( aCtxImpl, |
|
531 *this, // prev state |
|
532 wsa_cmd // next state |
|
533 ); |
|
534 } |
|
535 |
|
536 // --------------------------------------------------------- |
|
537 // WlanDot11MibDefaultConfigure::SetDot11WepDefaultKey |
|
538 // (other items were commented in a header). |
|
539 // --------------------------------------------------------- |
|
540 // |
|
541 void WlanDot11MibDefaultConfigure::SetDot11WepDefaultKey( |
|
542 WlanContextImpl& aCtxImpl ) |
|
543 { |
|
544 OsTracePrint( KUmacDetails, |
|
545 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetDot11WepDefaultKey()") ); |
|
546 |
|
547 WHA::Sdot11WepDefaultKeyId* mib |
|
548 = static_cast<WHA::Sdot11WepDefaultKeyId*>(iMemory); |
|
549 *mib = WHA::KDot11WepDefaultKeyIdMib; |
|
550 |
|
551 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
552 |
|
553 wsa_cmd.Set( |
|
554 aCtxImpl, WHA::KMibDot11WepDefaultKeyId, sizeof(*mib), mib ); |
|
555 |
|
556 // change global state: entry procedure triggers action |
|
557 ChangeState( aCtxImpl, |
|
558 *this, // prev state |
|
559 wsa_cmd // next state |
|
560 ); |
|
561 } |
|
562 |
|
563 // --------------------------------------------------------- |
|
564 // WlanDot11MibDefaultConfigure::SetDot11CurrentTxPowerLevel |
|
565 // (other items were commented in a header). |
|
566 // --------------------------------------------------------- |
|
567 // |
|
568 void WlanDot11MibDefaultConfigure::SetDot11CurrentTxPowerLevel( |
|
569 WlanContextImpl& aCtxImpl ) |
|
570 { |
|
571 OsTracePrint( KUmacDetails, |
|
572 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetDot11CurrentTxPowerLevel()") ); |
|
573 |
|
574 WHA::Sdot11CurrentTxPowerLevel* mib |
|
575 = static_cast<WHA::Sdot11CurrentTxPowerLevel*>(iMemory); |
|
576 *mib = WHA::KDot11CurrentTxPowerLevelMibDefault; |
|
577 |
|
578 // store the new power level also to our soft mib |
|
579 aCtxImpl.iWlanMib.dot11CurrentTxPowerLevel |
|
580 = mib->iDot11CurrentTxPowerLevel; |
|
581 |
|
582 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
583 |
|
584 wsa_cmd.Set( |
|
585 aCtxImpl, WHA::KMibDot11CurrentTxPowerLevel, sizeof(*mib), mib ); |
|
586 |
|
587 // change global state: entry procedure triggers action |
|
588 ChangeState( aCtxImpl, |
|
589 *this, // prev state |
|
590 wsa_cmd // next state |
|
591 ); |
|
592 } |
|
593 |
|
594 // --------------------------------------------------------- |
|
595 // WlanDot11MibDefaultConfigure::SetDot11RtsThreshold |
|
596 // (other items were commented in a header). |
|
597 // --------------------------------------------------------- |
|
598 // |
|
599 void WlanDot11MibDefaultConfigure::SetDot11RtsThreshold( |
|
600 WlanContextImpl& aCtxImpl ) |
|
601 { |
|
602 OsTracePrint( KUmacDetails, |
|
603 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetDot11RtsThreshold()") ); |
|
604 |
|
605 WHA::Sdot11RTSThreshold* mib |
|
606 = static_cast<WHA::Sdot11RTSThreshold*>(iMemory); |
|
607 mib->iDot11RTSThreshold = aCtxImpl.iWlanMib.dot11RTSThreshold; |
|
608 |
|
609 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
610 |
|
611 wsa_cmd.Set( |
|
612 aCtxImpl, WHA::KMibDot11RTSThreshold, sizeof(*mib), mib ); |
|
613 |
|
614 // change global state: entry procedure triggers action |
|
615 ChangeState( aCtxImpl, |
|
616 *this, // prev state |
|
617 wsa_cmd // next state |
|
618 ); |
|
619 } |
|
620 |
|
621 // --------------------------------------------------------- |
|
622 // WlanDot11MibDefaultConfigure::SetCtsToSelf |
|
623 // (other items were commented in a header). |
|
624 // --------------------------------------------------------- |
|
625 // |
|
626 void WlanDot11MibDefaultConfigure::SetCtsToSelf( |
|
627 WlanContextImpl& aCtxImpl ) |
|
628 { |
|
629 OsTracePrint( KUmacDetails, |
|
630 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetCtsToSelf()") ); |
|
631 |
|
632 WHA::SctsToSelf* mib |
|
633 = static_cast<WHA::SctsToSelf*>(iMemory); |
|
634 *mib = WHA::KCtsToSelfMibDefault; |
|
635 |
|
636 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
637 |
|
638 wsa_cmd.Set( |
|
639 aCtxImpl, WHA::KMibCtsToSelf, sizeof(*mib), mib ); |
|
640 |
|
641 // change global state: entry procedure triggers action |
|
642 ChangeState( aCtxImpl, |
|
643 *this, // prev state |
|
644 wsa_cmd // next state |
|
645 ); |
|
646 } |
|
647 |
|
648 // --------------------------------------------------------- |
|
649 // WlanDot11MibDefaultConfigure::SetArpIpAddrsTable |
|
650 // (other items were commented in a header). |
|
651 // --------------------------------------------------------- |
|
652 // |
|
653 void WlanDot11MibDefaultConfigure::SetArpIpAddrsTable( |
|
654 WlanContextImpl& aCtxImpl ) |
|
655 { |
|
656 OsTracePrint( KUmacDetails, |
|
657 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetArpIpAddrsTable(): ") ); |
|
658 |
|
659 WHA::SarpIpAddressTable* mib |
|
660 = static_cast<WHA::SarpIpAddressTable*>(iMemory); |
|
661 *mib = WHA::KArpIpAddressTableMibDefault; |
|
662 |
|
663 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
664 |
|
665 wsa_cmd.Set( |
|
666 aCtxImpl, WHA::KMibArpIpAddressTable, sizeof(*mib), mib ); |
|
667 |
|
668 // change global state: entry procedure triggers action |
|
669 ChangeState( aCtxImpl, |
|
670 *this, // prev state |
|
671 wsa_cmd // next state |
|
672 ); |
|
673 } |
|
674 |
|
675 // --------------------------------------------------------- |
|
676 // WlanDot11MibDefaultConfigure::SetProbeRequestTemplate |
|
677 // (other items were commented in a header). |
|
678 // --------------------------------------------------------- |
|
679 // |
|
680 void WlanDot11MibDefaultConfigure::SetProbeRequestTemplate( |
|
681 WlanContextImpl& aCtxImpl ) |
|
682 { |
|
683 OsTracePrint( KUmacDetails, (TUint8*) |
|
684 ("UMAC: WlanDot11MibDefaultConfigure::SetProbeRequestTemplate") ); |
|
685 |
|
686 SSupportedRatesIE s_ie; |
|
687 const TUint8 KHtCapabilitiesIeLength( |
|
688 aCtxImpl.GetOurHtCapabilitiesIe().GetIeLength() ); |
|
689 |
|
690 // we don't want to create this IE to stack |
|
691 // as it is a big one |
|
692 SExtendedSupportedRatesIE* ext_s_ie( |
|
693 static_cast<SExtendedSupportedRatesIE*> |
|
694 (os_alloc( sizeof(SExtendedSupportedRatesIE) ))); |
|
695 if ( !ext_s_ie ) |
|
696 { |
|
697 // alloc failue; just send abort to fsm. It takes care of the rest |
|
698 Fsm( aCtxImpl, EABORT ); |
|
699 return; |
|
700 } |
|
701 |
|
702 new (ext_s_ie) SExtendedSupportedRatesIE; |
|
703 |
|
704 // construct rate IEs from WHA rates this device supports... |
|
705 WlanWhaToDot11TypeConverter::Convert( |
|
706 aCtxImpl.WHASettings().iRates, |
|
707 s_ie, |
|
708 *ext_s_ie ); |
|
709 |
|
710 // length of the dot11 probe request frame template to be written |
|
711 const TUint32 frame_template_len( |
|
712 // dot11 management header |
|
713 sizeof(SManagementFrameHeader) + |
|
714 // an empty SSID field holds just the IE header |
|
715 sizeof(SInformationElementHeader) + |
|
716 // standard supported rate IE length |
|
717 s_ie.GetIeLength() + |
|
718 // lenght of the HT capabilities element, which is only added if lower |
|
719 // layers support HT |
|
720 (aCtxImpl.WHASettings().iCapability & WHA::SSettings::KHtOperation ? |
|
721 KHtCapabilitiesIeLength : 0 ) + |
|
722 // if extended rate IE has any elements we shall append it |
|
723 // otherwise not |
|
724 ((ext_s_ie->GetElementLength()) ? ext_s_ie->GetIeLength() : 0) + |
|
725 // if lower layers support DS Parameter Set IE in probe request, |
|
726 // we will append it; otherwise not |
|
727 (aCtxImpl.WHASettings().iCapability & |
|
728 WHA::SSettings::KDsParamSetIeInProbe ? |
|
729 sizeof( SDsParameterSetIE ) : 0 ) ); |
|
730 |
|
731 // total length of the MIB to be written |
|
732 TUint32 mib_len( |
|
733 // length of the dot11 probe request frame template to be written |
|
734 frame_template_len |
|
735 // ...and the MIB header |
|
736 + WHA::StemplateFrame::KHeaderSize ); |
|
737 |
|
738 // align length of MIB to 4-byte boundary |
|
739 mib_len = Align4( mib_len ); |
|
740 |
|
741 if ( mib_len > KAllocLen ) |
|
742 { |
|
743 // this is a programming error |
|
744 OsTracePrint( KErrorLevel, |
|
745 (TUint8*)("UMAC: mib_len %d"), mib_len); |
|
746 OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ ); |
|
747 } |
|
748 |
|
749 // start of usable memory |
|
750 WHA::StemplateFrame* mib_hdr( static_cast<WHA::StemplateFrame*>(iMemory) ); |
|
751 |
|
752 // --- begin: set MIB header |
|
753 |
|
754 mib_hdr->iFrameType = WHA::KProbeRequestTemplate; |
|
755 // this field is a don't care for probe request |
|
756 mib_hdr->iInitialTransmitRate = 0; |
|
757 mib_hdr->iLength = frame_template_len; |
|
758 |
|
759 // --- end: set MIB header |
|
760 |
|
761 // --- begin: set dot11 frame header |
|
762 |
|
763 SManagementFrameHeader* frame_hdr( |
|
764 reinterpret_cast<SManagementFrameHeader*>(mib_hdr->iTemplateData) ); |
|
765 new (frame_hdr) SManagementFrameHeader( E802Dot11FrameTypeProbeReq ); |
|
766 frame_hdr->iDA = KBroadcastMacAddr; |
|
767 frame_hdr->iSA = aCtxImpl.iWlanMib.dot11StationId; |
|
768 frame_hdr->iBSSID = KBroadcastMacAddr; |
|
769 |
|
770 // --- end: set dot11 frame header |
|
771 |
|
772 // --- begin: set IEs |
|
773 |
|
774 TUint8* ptr( reinterpret_cast<TUint8*>(++frame_hdr) ); |
|
775 |
|
776 // set an empty SSID |
|
777 new (ptr) SSsIdIE; |
|
778 // as we have an empty SSID its length only holds the |
|
779 // information element header length |
|
780 ptr += sizeof( SInformationElementHeader ); |
|
781 |
|
782 // copy supported rates IE |
|
783 os_memcpy( |
|
784 ptr, &s_ie, s_ie.GetIeLength() ); |
|
785 ptr += s_ie.GetIeLength(); |
|
786 |
|
787 // add DS Parameter Set IE, if possible |
|
788 if ( aCtxImpl.WHASettings().iCapability & |
|
789 WHA::SSettings::KDsParamSetIeInProbe ) |
|
790 { |
|
791 new (ptr) SDsParameterSetIE( 0 ); // initialize to ch zero |
|
792 ptr += sizeof( SDsParameterSetIE ); |
|
793 |
|
794 OsTracePrint( KUmacDetails, (TUint8*) |
|
795 ("UMAC: DS Param Set IE added") ); |
|
796 } |
|
797 |
|
798 if ( aCtxImpl.WHASettings().iCapability & |
|
799 WHA::SSettings::KHtOperation ) |
|
800 { |
|
801 // copy HT capabilities element |
|
802 os_memcpy( |
|
803 ptr, |
|
804 &(aCtxImpl.GetOurHtCapabilitiesIe()), |
|
805 KHtCapabilitiesIeLength ); |
|
806 |
|
807 ptr += KHtCapabilitiesIeLength; |
|
808 |
|
809 OsTracePrint( KUmacDetails, (TUint8*) |
|
810 ("UMAC: HT capabilities element added") ); |
|
811 } |
|
812 |
|
813 // copy extended supported rates IE if present |
|
814 if ( ext_s_ie->GetElementLength() ) |
|
815 { |
|
816 os_memcpy( ptr, ext_s_ie, ext_s_ie->GetIeLength() ); |
|
817 } |
|
818 |
|
819 // --- end: set IEs |
|
820 |
|
821 // and now execute |
|
822 |
|
823 WlanWsaWriteMib& wsa_cmd( aCtxImpl.WsaWriteMib() ); |
|
824 |
|
825 wsa_cmd.Set( |
|
826 aCtxImpl, WHA::KMibTemplateFrame, mib_len, mib_hdr ); |
|
827 |
|
828 // change global state: entry procedure triggers action |
|
829 ChangeState( aCtxImpl, |
|
830 *this, // prev state |
|
831 wsa_cmd // next state |
|
832 ); |
|
833 |
|
834 // as the parameters have been supplied we can now deallocate |
|
835 os_free( ext_s_ie ); |
|
836 } |
|
837 |
|
838 // --------------------------------------------------------- |
|
839 // WlanDot11MibDefaultConfigure::SetRxFilter |
|
840 // (other items were commented in a header). |
|
841 // --------------------------------------------------------- |
|
842 // |
|
843 void WlanDot11MibDefaultConfigure::SetRxFilter( |
|
844 WlanContextImpl& aCtxImpl ) |
|
845 { |
|
846 OsTracePrint( KUmacDetails, |
|
847 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetRxFilter()") ); |
|
848 |
|
849 WHA::SrxFilter* mib |
|
850 = static_cast<WHA::SrxFilter*>(iMemory); |
|
851 *mib = WHA::KRxFilterMibDefault; |
|
852 |
|
853 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
854 |
|
855 wsa_cmd.Set( |
|
856 aCtxImpl, WHA::KMibRxFilter, sizeof(*mib), mib ); |
|
857 |
|
858 // change global state: entry procedure triggers action |
|
859 ChangeState( aCtxImpl, |
|
860 *this, // prev state |
|
861 wsa_cmd // next state |
|
862 ); |
|
863 } |
|
864 |
|
865 // --------------------------------------------------------- |
|
866 // WlanDot11MibDefaultConfigure::SetBeaconFilterIeTable |
|
867 // (other items were commented in a header). |
|
868 // --------------------------------------------------------- |
|
869 // |
|
870 void WlanDot11MibDefaultConfigure::SetBeaconFilterIeTable( |
|
871 WlanContextImpl& aCtxImpl ) |
|
872 { |
|
873 OsTracePrint( KUmacDetails, |
|
874 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetBeaconFilterIeTable()") ); |
|
875 |
|
876 WHA::SbeaconFilterIeTable* mib |
|
877 = static_cast<WHA::SbeaconFilterIeTable*>(iMemory); |
|
878 *mib = WHA::KBeaconFilterIeTableMibDefault; |
|
879 |
|
880 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
881 |
|
882 wsa_cmd.Set( |
|
883 aCtxImpl, WHA::KMibBeaconFilterIeTable, sizeof(*mib), mib ); |
|
884 |
|
885 // change global state: entry procedure triggers action |
|
886 ChangeState( aCtxImpl, |
|
887 *this, // prev state |
|
888 wsa_cmd // next state |
|
889 ); |
|
890 } |
|
891 |
|
892 // --------------------------------------------------------- |
|
893 // WlanDot11MibDefaultConfigure::SetBeaconFilterEnable |
|
894 // (other items were commented in a header). |
|
895 // --------------------------------------------------------- |
|
896 // |
|
897 void WlanDot11MibDefaultConfigure::SetBeaconFilterEnable( |
|
898 WlanContextImpl& aCtxImpl ) |
|
899 { |
|
900 OsTracePrint( KUmacDetails, |
|
901 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetBeaconFilterEnable()") ); |
|
902 |
|
903 WHA::SbeaconFilterEnable* mib |
|
904 = static_cast<WHA::SbeaconFilterEnable*>(iMemory); |
|
905 *mib = WHA::KBeaconFilterEnableMibDefault; |
|
906 |
|
907 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
908 |
|
909 wsa_cmd.Set( |
|
910 aCtxImpl, WHA::KMibBeaconFilterEnable, sizeof(*mib), mib ); |
|
911 |
|
912 // change global state: entry procedure triggers action |
|
913 ChangeState( aCtxImpl, |
|
914 *this, // prev state |
|
915 wsa_cmd // next state |
|
916 ); |
|
917 } |
|
918 |
|
919 // --------------------------------------------------------- |
|
920 // WlanDot11MibDefaultConfigure::SetWlanWakeupInterval |
|
921 // (other items were commented in a header). |
|
922 // --------------------------------------------------------- |
|
923 // |
|
924 void WlanDot11MibDefaultConfigure::SetWlanWakeupInterval( |
|
925 WlanContextImpl& aCtxImpl ) |
|
926 { |
|
927 OsTracePrint( KUmacDetails, |
|
928 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetWlanWakeupInterval()") ); |
|
929 |
|
930 WHA::SwlanWakeUpInterval* mib |
|
931 = static_cast<WHA::SwlanWakeUpInterval*>(iMemory); |
|
932 *mib = WHA::KWlanWakeUpIntervalMibDefault; |
|
933 |
|
934 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
935 |
|
936 wsa_cmd.Set( |
|
937 aCtxImpl, WHA::KMibWlanWakeUpInterval, sizeof(*mib), mib ); |
|
938 |
|
939 // store the new setting also locally |
|
940 aCtxImpl.iWlanMib.iWlanWakeupInterval = mib->iMode; |
|
941 aCtxImpl.iWlanMib.iWlanListenInterval = mib->iListenInterval; |
|
942 |
|
943 // change global state: entry procedure triggers action |
|
944 ChangeState( aCtxImpl, |
|
945 *this, // prev state |
|
946 wsa_cmd // next state |
|
947 ); |
|
948 } |
|
949 |
|
950 // --------------------------------------------------------- |
|
951 // WlanDot11MibDefaultConfigure::SetBeaconLostCount |
|
952 // (other items were commented in a header). |
|
953 // --------------------------------------------------------- |
|
954 // |
|
955 void WlanDot11MibDefaultConfigure::SetBeaconLostCount( |
|
956 WlanContextImpl& aCtxImpl ) |
|
957 { |
|
958 OsTracePrint( KUmacDetails, |
|
959 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetBeaconLostCount()") ); |
|
960 |
|
961 WHA::SbeaconLostCount* mib |
|
962 = static_cast<WHA::SbeaconLostCount*>(iMemory); |
|
963 |
|
964 // if the beacon lost count has been set via the management interface, |
|
965 // that value is used (instead of the original default) |
|
966 mib->iLostCount = aCtxImpl.iWlanMib.iBeaconLostCount; |
|
967 |
|
968 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
969 |
|
970 wsa_cmd.Set( |
|
971 aCtxImpl, WHA::KMibBeaconLostCount, sizeof(*mib), mib ); |
|
972 |
|
973 // change global state: entry procedure triggers action |
|
974 ChangeState( aCtxImpl, |
|
975 *this, // prev state |
|
976 wsa_cmd // next state |
|
977 ); |
|
978 } |
|
979 |
|
980 // --------------------------------------------------------- |
|
981 // WlanDot11MibDefaultConfigure::SetRcpiThreshold |
|
982 // (other items were commented in a header). |
|
983 // --------------------------------------------------------- |
|
984 // |
|
985 void WlanDot11MibDefaultConfigure::SetRcpiThreshold( |
|
986 WlanContextImpl& aCtxImpl ) |
|
987 { |
|
988 OsTracePrint( KUmacDetails, |
|
989 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetRcpiThreshold()") ); |
|
990 |
|
991 WHA::SrcpiThreshold* mib |
|
992 = static_cast<WHA::SrcpiThreshold*>(iMemory); |
|
993 *mib = WHA::KRcpiThresholdMibDefault; |
|
994 |
|
995 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
996 |
|
997 wsa_cmd.Set( |
|
998 aCtxImpl, WHA::KMibRcpiThreshold, sizeof(*mib), mib ); |
|
999 |
|
1000 // change global state: entry procedure triggers action |
|
1001 ChangeState( aCtxImpl, |
|
1002 *this, // prev state |
|
1003 wsa_cmd // next state |
|
1004 ); |
|
1005 } |
|
1006 |
|
1007 // --------------------------------------------------------- |
|
1008 // WlanDot11MibDefaultConfigure::SetTxRatePolicy |
|
1009 // (other items were commented in a header). |
|
1010 // --------------------------------------------------------- |
|
1011 // |
|
1012 void WlanDot11MibDefaultConfigure::SetTxRatePolicy( |
|
1013 WlanContextImpl& aCtxImpl ) |
|
1014 { |
|
1015 OsTracePrint( KUmacDetails, |
|
1016 (TUint8*)("UMAC: WlanDot11MibDefaultConfigure::SetTxRatePolicy()") ); |
|
1017 |
|
1018 // we define 1 global policy ... |
|
1019 |
|
1020 WHA::StxRatePolicy* mib = static_cast<WHA::StxRatePolicy*>(iMemory); |
|
1021 |
|
1022 // ... which is our default ... |
|
1023 *mib = WHA::KTxRatePolicyMibDefault; |
|
1024 |
|
1025 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
1026 |
|
1027 wsa_cmd.Set( |
|
1028 aCtxImpl, |
|
1029 WHA::KMibTxRatePolicy, |
|
1030 sizeof( *mib ), |
|
1031 mib ); |
|
1032 |
|
1033 // change global state: entry procedure triggers action |
|
1034 ChangeState( aCtxImpl, |
|
1035 *this, // prev state |
|
1036 wsa_cmd // next state |
|
1037 ); |
|
1038 } |
|
1039 |
|
1040 // --------------------------------------------------------- |
|
1041 // |
|
1042 // --------------------------------------------------------- |
|
1043 // |
|
1044 void WlanDot11MibDefaultConfigure::SetHtCapabilities( |
|
1045 WlanContextImpl& aCtxImpl ) |
|
1046 { |
|
1047 OsTracePrint( KUmacDetails, (TUint8*) |
|
1048 ("UMAC: WlanDot11MibDefaultConfigure::SetHtCapabilities") ); |
|
1049 |
|
1050 WHA::ShtCapabilities* mib |
|
1051 = static_cast<WHA::ShtCapabilities*>(iMemory); |
|
1052 *mib = WHA::KHtCapabilitiesMibDefault; |
|
1053 |
|
1054 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
1055 |
|
1056 wsa_cmd.Set( |
|
1057 aCtxImpl, WHA::KMibHtCapabilities, sizeof( *mib ), mib ); |
|
1058 |
|
1059 // change global state: entry procedure triggers action |
|
1060 ChangeState( aCtxImpl, |
|
1061 *this, // prev state |
|
1062 wsa_cmd // next state |
|
1063 ); |
|
1064 } |
|
1065 |
|
1066 // --------------------------------------------------------- |
|
1067 // |
|
1068 // --------------------------------------------------------- |
|
1069 // |
|
1070 void WlanDot11MibDefaultConfigure::SetHtBssOperation( |
|
1071 WlanContextImpl& aCtxImpl ) |
|
1072 { |
|
1073 OsTracePrint( KUmacDetails, (TUint8*) |
|
1074 ("UMAC: WlanDot11MibDefaultConfigure::SetHtBssOperation") ); |
|
1075 |
|
1076 WHA::ShtBssOperation* mib |
|
1077 = static_cast<WHA::ShtBssOperation*>(iMemory); |
|
1078 *mib = WHA::KHtBssOperationMibDefault; |
|
1079 |
|
1080 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
1081 |
|
1082 wsa_cmd.Set( |
|
1083 aCtxImpl, WHA::KMibHtBssOperation, sizeof( *mib ), mib ); |
|
1084 |
|
1085 // change global state: entry procedure triggers action |
|
1086 ChangeState( aCtxImpl, |
|
1087 *this, // prev state |
|
1088 wsa_cmd // next state |
|
1089 ); |
|
1090 } |
|
1091 |
|
1092 // --------------------------------------------------------- |
|
1093 // |
|
1094 // --------------------------------------------------------- |
|
1095 // |
|
1096 void WlanDot11MibDefaultConfigure::SetHtSecondaryBeacon( |
|
1097 WlanContextImpl& aCtxImpl ) |
|
1098 { |
|
1099 OsTracePrint( KUmacDetails, (TUint8*) |
|
1100 ("UMAC: WlanDot11MibDefaultConfigure::SetHtSecondaryBeacon") ); |
|
1101 |
|
1102 WHA::ShtSecondaryBeacon* mib |
|
1103 = static_cast<WHA::ShtSecondaryBeacon*>(iMemory); |
|
1104 *mib = WHA::KHtSecondaryBeaconMibDefault; |
|
1105 |
|
1106 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
1107 |
|
1108 wsa_cmd.Set( |
|
1109 aCtxImpl, WHA::KMibHtSecondaryBeacon, sizeof( *mib ), mib ); |
|
1110 |
|
1111 // change global state: entry procedure triggers action |
|
1112 ChangeState( aCtxImpl, |
|
1113 *this, // prev state |
|
1114 wsa_cmd // next state |
|
1115 ); |
|
1116 } |
|
1117 |
|
1118 // --------------------------------------------------------- |
|
1119 // |
|
1120 // --------------------------------------------------------- |
|
1121 // |
|
1122 void WlanDot11MibDefaultConfigure::SetHtBlockAckConfigure( |
|
1123 WlanContextImpl& aCtxImpl ) |
|
1124 { |
|
1125 OsTracePrint( KUmacDetails, (TUint8*) |
|
1126 ("UMAC: WlanDot11MibDefaultConfigure::SetHtBlockAckConfigure") ); |
|
1127 |
|
1128 WHA::ShtBlockAckConfigure* mib |
|
1129 = static_cast<WHA::ShtBlockAckConfigure*>(iMemory); |
|
1130 *mib = WHA::KHtBlockAckConfigureMibDefault; |
|
1131 |
|
1132 WlanWsaWriteMib& wsa_cmd = aCtxImpl.WsaWriteMib(); |
|
1133 |
|
1134 wsa_cmd.Set( |
|
1135 aCtxImpl, WHA::KMibHtBlockAckConfigure, sizeof( *mib ), mib ); |
|
1136 |
|
1137 // change global state: entry procedure triggers action |
|
1138 ChangeState( aCtxImpl, |
|
1139 *this, // prev state |
|
1140 wsa_cmd // next state |
|
1141 ); |
|
1142 } |