|
1 /* |
|
2 * Copyright (c) 2006-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 WlanPrivacyModeFilters class. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 6 % |
|
20 */ |
|
21 |
|
22 #include "config.h" |
|
23 #include "umacprivacymodefilters.h" |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // |
|
27 // --------------------------------------------------------------------------- |
|
28 // |
|
29 void WlanPrivacyModeFilters::SetActiveFilter( |
|
30 TEncryptionStatus aEncryptionStatus ) |
|
31 { |
|
32 if ( aEncryptionStatus == EEncryptionDisabled ) |
|
33 { |
|
34 OsTracePrint( KUmacProtocolState, (TUint8*) |
|
35 ("UMAC: WlanPrivacyModeFilters::SetActiveFilter: set none mode privacy filter") ); |
|
36 iActiveFilter = &iNone; |
|
37 } |
|
38 else if ( aEncryptionStatus == EEncryptionWep ) |
|
39 { |
|
40 OsTracePrint( KUmacProtocolState, (TUint8*) |
|
41 ("UMAC: WlanPrivacyModeFilters::SetActiveFilter: set WEP mode privacy filter") ); |
|
42 iActiveFilter = &iWep; |
|
43 } |
|
44 else if ( aEncryptionStatus == EEncryption802dot1x ) |
|
45 { |
|
46 OsTracePrint( KUmacProtocolState, (TUint8*) |
|
47 ("UMAC: WlanPrivacyModeFilters::SetActiveFilter: set 802dot1x mode privacy filter") ); |
|
48 iActiveFilter = &i1x; |
|
49 } |
|
50 else if ( aEncryptionStatus == EEncryptionWpa ) |
|
51 { |
|
52 OsTracePrint( KUmacProtocolState, (TUint8*) |
|
53 ("UMAC: WlanPrivacyModeFilters::SetActiveFilter: set WPA mode privacy filter") ); |
|
54 iActiveFilter = &iWpa; |
|
55 } |
|
56 else if ( aEncryptionStatus == EEncryptionWepMixed ) |
|
57 { |
|
58 OsTracePrint( KUmacProtocolState, (TUint8*) |
|
59 ("UMAC: WlanPrivacyModeFilters::SetActiveFilter: set WEP mixed mode privacy filter") ); |
|
60 iActiveFilter = &iMixedModeWep; |
|
61 } |
|
62 else if ( aEncryptionStatus == EEncryption802dot1xMixed ) |
|
63 { |
|
64 OsTracePrint( KUmacProtocolState, (TUint8*) |
|
65 ("UMAC: WlanPrivacyModeFilters::SetActiveFilter: set 802.1x mixed mode privacy filter") ); |
|
66 iActiveFilter = &iMixedMode1x; |
|
67 } |
|
68 else if ( aEncryptionStatus == EEncryptionWAPI ) |
|
69 { |
|
70 OsTracePrint( KUmacProtocolState, (TUint8*) |
|
71 ("UMAC: WlanPrivacyModeFilters::SetActiveFilter: set WAPI mode privacy filter") ); |
|
72 iActiveFilter = &iWapi; |
|
73 } |
|
74 else |
|
75 { |
|
76 OsTracePrint( KWarningLevel, (TUint8*) |
|
77 ("UMAC: WlanPrivacyModeFilters::SetActiveFilter: no active Rx filter set; aEncryptionStatus: %d"), |
|
78 aEncryptionStatus ); |
|
79 } |
|
80 } |