Root/drivers/staging/csr/csr_wifi_router_ctrl_free_downstream_contents.c

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. */
12#include <linux/slab.h>
13#include "csr_wifi_router_ctrl_prim.h"
14#include "csr_wifi_router_ctrl_lib.h"
15
16/*----------------------------------------------------------------------------*
17 * NAME
18 * CsrWifiRouterCtrlFreeDownstreamMessageContents
19 *
20 * DESCRIPTION
21 *
22 *
23 * PARAMETERS
24 * eventClass: only the value CSR_WIFI_ROUTER_CTRL_PRIM will be handled
25 * message: the message to free
26 *----------------------------------------------------------------------------*/
27void CsrWifiRouterCtrlFreeDownstreamMessageContents(u16 eventClass, void *message)
28{
29    if (eventClass != CSR_WIFI_ROUTER_CTRL_PRIM)
30    {
31        return;
32    }
33    if (NULL == message)
34    {
35        return;
36    }
37
38    switch (*((CsrWifiRouterCtrlPrim *) message))
39    {
40        case CSR_WIFI_ROUTER_CTRL_HIP_REQ:
41        {
42            CsrWifiRouterCtrlHipReq *p = (CsrWifiRouterCtrlHipReq *)message;
43            kfree(p->mlmeCommand);
44            p->mlmeCommand = NULL;
45            kfree(p->dataRef1);
46            p->dataRef1 = NULL;
47            kfree(p->dataRef2);
48            p->dataRef2 = NULL;
49            break;
50        }
51        case CSR_WIFI_ROUTER_CTRL_MULTICAST_ADDRESS_RES:
52        {
53            CsrWifiRouterCtrlMulticastAddressRes *p = (CsrWifiRouterCtrlMulticastAddressRes *)message;
54            kfree(p->getAddresses);
55            p->getAddresses = NULL;
56            break;
57        }
58        case CSR_WIFI_ROUTER_CTRL_TCLAS_ADD_REQ:
59        {
60            CsrWifiRouterCtrlTclasAddReq *p = (CsrWifiRouterCtrlTclasAddReq *)message;
61            kfree(p->tclas);
62            p->tclas = NULL;
63            break;
64        }
65        case CSR_WIFI_ROUTER_CTRL_TCLAS_DEL_REQ:
66        {
67            CsrWifiRouterCtrlTclasDelReq *p = (CsrWifiRouterCtrlTclasDelReq *)message;
68            kfree(p->tclas);
69            p->tclas = NULL;
70            break;
71        }
72        case CSR_WIFI_ROUTER_CTRL_WIFI_ON_REQ:
73        {
74            CsrWifiRouterCtrlWifiOnReq *p = (CsrWifiRouterCtrlWifiOnReq *)message;
75            kfree(p->data);
76            p->data = NULL;
77            break;
78        }
79        case CSR_WIFI_ROUTER_CTRL_WIFI_ON_RES:
80        {
81            CsrWifiRouterCtrlWifiOnRes *p = (CsrWifiRouterCtrlWifiOnRes *)message;
82            kfree(p->smeVersions.smeBuild);
83            p->smeVersions.smeBuild = NULL;
84            break;
85        }
86        case CSR_WIFI_ROUTER_CTRL_WAPI_RX_PKT_REQ:
87        {
88            CsrWifiRouterCtrlWapiRxPktReq *p = (CsrWifiRouterCtrlWapiRxPktReq *)message;
89            kfree(p->signal);
90            p->signal = NULL;
91            kfree(p->data);
92            p->data = NULL;
93            break;
94        }
95        case CSR_WIFI_ROUTER_CTRL_WAPI_UNICAST_TX_PKT_REQ:
96        {
97            CsrWifiRouterCtrlWapiUnicastTxPktReq *p = (CsrWifiRouterCtrlWapiUnicastTxPktReq *)message;
98            kfree(p->data);
99            p->data = NULL;
100            break;
101        }
102
103        default:
104            break;
105    }
106}
107
108
109

Archive Download this file



interactive