diff options
author | Lauri Hintsala <lauri.hintsala@bluegiga.com> | 2012-06-21 13:29:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-25 11:36:45 -0700 |
commit | fa6173a0be1844ccea58afb2247f71abab1e53c5 (patch) | |
tree | f760c9c2d0377881188719a687de2ec4ca752e4b /drivers/staging/csr/csr_wifi_nme_ap_free_downstream_contents.c | |
parent | 8c3337fec4c78f796767459de6429eecf2dc35c9 (diff) |
Staging: csr: add WEXT and AP mode support
Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/csr/csr_wifi_nme_ap_free_downstream_contents.c')
-rw-r--r-- | drivers/staging/csr/csr_wifi_nme_ap_free_downstream_contents.c | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/drivers/staging/csr/csr_wifi_nme_ap_free_downstream_contents.c b/drivers/staging/csr/csr_wifi_nme_ap_free_downstream_contents.c new file mode 100644 index 00000000000..8a95f3ceeff --- /dev/null +++ b/drivers/staging/csr/csr_wifi_nme_ap_free_downstream_contents.c @@ -0,0 +1,85 @@ +/***************************************************************************** + + (c) Cambridge Silicon Radio Limited 2012 + All rights reserved and confidential information of CSR + + Refer to LICENSE.txt included with this source for details + on the license terms. + +*****************************************************************************/ + +/* Note: this is an auto-generated file. */ + +#include "csr_pmem.h" +#include "csr_wifi_nme_ap_prim.h" +#include "csr_wifi_nme_ap_lib.h" + +/*----------------------------------------------------------------------------* + * NAME + * CsrWifiNmeApFreeDownstreamMessageContents + * + * DESCRIPTION + * + * + * PARAMETERS + * eventClass: only the value CSR_WIFI_NME_AP_PRIM will be handled + * message: the message to free + *----------------------------------------------------------------------------*/ +void CsrWifiNmeApFreeDownstreamMessageContents(CsrUint16 eventClass, void *message) +{ + if (eventClass != CSR_WIFI_NME_AP_PRIM) + { + return; + } + if (NULL == message) + { + return; + } + + switch (*((CsrWifiNmeApPrim *) message)) + { + case CSR_WIFI_NME_AP_CONFIG_SET_REQ: + { + CsrWifiNmeApConfigSetReq *p = (CsrWifiNmeApConfigSetReq *)message; + CsrPmemFree(p->apMacConfig.macAddressList); + p->apMacConfig.macAddressList = NULL; + break; + } + case CSR_WIFI_NME_AP_START_REQ: + { + CsrWifiNmeApStartReq *p = (CsrWifiNmeApStartReq *)message; + switch (p->apCredentials.authType) + { + case CSR_WIFI_SME_AP_AUTH_TYPE_PERSONAL: + switch (p->apCredentials.nmeAuthType.authTypePersonal.pskOrPassphrase) + { + case CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PASSPHRASE: + CsrPmemFree(p->apCredentials.nmeAuthType.authTypePersonal.authPers_credentials.passphrase.passphrase); + p->apCredentials.nmeAuthType.authTypePersonal.authPers_credentials.passphrase.passphrase = NULL; + break; + default: + break; + } + break; + default: + break; + } + { + CsrUint16 i3; + for (i3 = 0; i3 < p->p2pGoParam.operatingChanList.channelEntryListCount; i3++) + { + CsrPmemFree(p->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel); + p->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel = NULL; + } + } + CsrPmemFree(p->p2pGoParam.operatingChanList.channelEntryList); + p->p2pGoParam.operatingChanList.channelEntryList = NULL; + break; + } + + default: + break; + } +} + + |