2012-06-19 17:15:42 -06:00
|
|
|
/*****************************************************************************
|
|
|
|
|
2012-06-19 18:33:16 -06:00
|
|
|
(c) Cambridge Silicon Radio Limited 2012
|
2012-06-19 17:15:42 -06:00
|
|
|
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. */
|
2012-07-20 16:59:12 -06:00
|
|
|
#include <linux/slab.h>
|
2012-06-19 17:15:42 -06:00
|
|
|
#include "csr_wifi_router_ctrl_prim.h"
|
|
|
|
#include "csr_wifi_router_ctrl_lib.h"
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------------*
|
|
|
|
* NAME
|
|
|
|
* CsrWifiRouterCtrlFreeUpstreamMessageContents
|
|
|
|
*
|
|
|
|
* DESCRIPTION
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* PARAMETERS
|
|
|
|
* eventClass: only the value CSR_WIFI_ROUTER_CTRL_PRIM will be handled
|
|
|
|
* message: the message to free
|
|
|
|
*----------------------------------------------------------------------------*/
|
2012-07-20 13:00:10 -06:00
|
|
|
void CsrWifiRouterCtrlFreeUpstreamMessageContents(u16 eventClass, void *message)
|
2012-06-19 17:15:42 -06:00
|
|
|
{
|
|
|
|
if (eventClass != CSR_WIFI_ROUTER_CTRL_PRIM)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (NULL == message)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (*((CsrWifiRouterCtrlPrim *) message))
|
|
|
|
{
|
|
|
|
case CSR_WIFI_ROUTER_CTRL_HIP_IND:
|
|
|
|
{
|
|
|
|
CsrWifiRouterCtrlHipInd *p = (CsrWifiRouterCtrlHipInd *)message;
|
2012-07-20 16:59:12 -06:00
|
|
|
kfree(p->mlmeCommand);
|
2012-06-19 17:15:42 -06:00
|
|
|
p->mlmeCommand = NULL;
|
2012-07-20 16:59:12 -06:00
|
|
|
kfree(p->dataRef1);
|
2012-06-19 17:15:42 -06:00
|
|
|
p->dataRef1 = NULL;
|
2012-07-20 16:59:12 -06:00
|
|
|
kfree(p->dataRef2);
|
2012-06-19 17:15:42 -06:00
|
|
|
p->dataRef2 = NULL;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case CSR_WIFI_ROUTER_CTRL_MULTICAST_ADDRESS_IND:
|
|
|
|
{
|
|
|
|
CsrWifiRouterCtrlMulticastAddressInd *p = (CsrWifiRouterCtrlMulticastAddressInd *)message;
|
2012-07-20 16:59:12 -06:00
|
|
|
kfree(p->setAddresses);
|
2012-06-19 17:15:42 -06:00
|
|
|
p->setAddresses = NULL;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case CSR_WIFI_ROUTER_CTRL_WIFI_ON_IND:
|
|
|
|
{
|
|
|
|
CsrWifiRouterCtrlWifiOnInd *p = (CsrWifiRouterCtrlWifiOnInd *)message;
|
2012-07-20 16:59:12 -06:00
|
|
|
kfree(p->versions.routerBuild);
|
2012-06-19 17:15:42 -06:00
|
|
|
p->versions.routerBuild = NULL;
|
|
|
|
break;
|
|
|
|
}
|
2012-06-19 18:33:16 -06:00
|
|
|
case CSR_WIFI_ROUTER_CTRL_WAPI_RX_MIC_CHECK_IND:
|
2012-06-19 17:15:42 -06:00
|
|
|
{
|
2012-06-19 18:33:16 -06:00
|
|
|
CsrWifiRouterCtrlWapiRxMicCheckInd *p = (CsrWifiRouterCtrlWapiRxMicCheckInd *)message;
|
2012-07-20 16:59:12 -06:00
|
|
|
kfree(p->signal);
|
2012-06-19 17:15:42 -06:00
|
|
|
p->signal = NULL;
|
2012-07-20 16:59:12 -06:00
|
|
|
kfree(p->data);
|
2012-06-19 17:15:42 -06:00
|
|
|
p->data = NULL;
|
|
|
|
break;
|
|
|
|
}
|
2012-06-19 18:33:16 -06:00
|
|
|
case CSR_WIFI_ROUTER_CTRL_WAPI_UNICAST_TX_ENCRYPT_IND:
|
|
|
|
{
|
|
|
|
CsrWifiRouterCtrlWapiUnicastTxEncryptInd *p = (CsrWifiRouterCtrlWapiUnicastTxEncryptInd *)message;
|
2012-07-20 16:59:12 -06:00
|
|
|
kfree(p->data);
|
2012-06-19 18:33:16 -06:00
|
|
|
p->data = NULL;
|
|
|
|
break;
|
|
|
|
}
|
2012-06-19 17:15:42 -06:00
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|