Commit | Line | Data |
---|---|---|
fa6173a0 LH |
1 | /***************************************************************************** |
2 | ||
3 | (c) Cambridge Silicon Radio Limited 2012 | |
4 | All rights reserved and confidential information of CSR | |
5 | ||
6 | Refer to LICENSE.txt included with this source for details | |
7 | on the license terms. | |
8 | ||
9 | *****************************************************************************/ | |
10 | ||
11 | /* Note: this is an auto-generated file. */ | |
55a27055 | 12 | #include <linux/slab.h> |
fa6173a0 LH |
13 | #include "csr_wifi_nme_ap_prim.h" |
14 | #include "csr_wifi_nme_ap_lib.h" | |
15 | ||
16 | /*----------------------------------------------------------------------------* | |
17 | * NAME | |
18 | * CsrWifiNmeApFreeDownstreamMessageContents | |
19 | * | |
20 | * DESCRIPTION | |
21 | * | |
22 | * | |
23 | * PARAMETERS | |
24 | * eventClass: only the value CSR_WIFI_NME_AP_PRIM will be handled | |
25 | * message: the message to free | |
26 | *----------------------------------------------------------------------------*/ | |
8c87f69a | 27 | void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message) |
fa6173a0 LH |
28 | { |
29 | if (eventClass != CSR_WIFI_NME_AP_PRIM) | |
30 | { | |
31 | return; | |
32 | } | |
33 | if (NULL == message) | |
34 | { | |
35 | return; | |
36 | } | |
37 | ||
38 | switch (*((CsrWifiNmeApPrim *) message)) | |
39 | { | |
40 | case CSR_WIFI_NME_AP_CONFIG_SET_REQ: | |
41 | { | |
42 | CsrWifiNmeApConfigSetReq *p = (CsrWifiNmeApConfigSetReq *)message; | |
55a27055 | 43 | kfree(p->apMacConfig.macAddressList); |
fa6173a0 LH |
44 | p->apMacConfig.macAddressList = NULL; |
45 | break; | |
46 | } | |
47 | case CSR_WIFI_NME_AP_START_REQ: | |
48 | { | |
49 | CsrWifiNmeApStartReq *p = (CsrWifiNmeApStartReq *)message; | |
50 | switch (p->apCredentials.authType) | |
51 | { | |
52 | case CSR_WIFI_SME_AP_AUTH_TYPE_PERSONAL: | |
53 | switch (p->apCredentials.nmeAuthType.authTypePersonal.pskOrPassphrase) | |
54 | { | |
55 | case CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PASSPHRASE: | |
55a27055 | 56 | kfree(p->apCredentials.nmeAuthType.authTypePersonal.authPers_credentials.passphrase.passphrase); |
fa6173a0 LH |
57 | p->apCredentials.nmeAuthType.authTypePersonal.authPers_credentials.passphrase.passphrase = NULL; |
58 | break; | |
59 | default: | |
60 | break; | |
61 | } | |
62 | break; | |
63 | default: | |
64 | break; | |
65 | } | |
66 | { | |
8c87f69a | 67 | u16 i3; |
fa6173a0 LH |
68 | for (i3 = 0; i3 < p->p2pGoParam.operatingChanList.channelEntryListCount; i3++) |
69 | { | |
55a27055 | 70 | kfree(p->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel); |
fa6173a0 LH |
71 | p->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel = NULL; |
72 | } | |
73 | } | |
55a27055 | 74 | kfree(p->p2pGoParam.operatingChanList.channelEntryList); |
fa6173a0 LH |
75 | p->p2pGoParam.operatingChanList.channelEntryList = NULL; |
76 | break; | |
77 | } | |
78 | ||
79 | default: | |
80 | break; | |
81 | } | |
82 | } | |
83 | ||
84 |