Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[linux-2.6-block.git] / drivers / staging / csr / csr_wifi_router_free_downstream_contents.c
CommitLineData
635d2b00
GKH
1/*****************************************************************************
2
3 (c) Cambridge Silicon Radio Limited 2011
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>
635d2b00
GKH
13#include "csr_wifi_router_prim.h"
14#include "csr_wifi_router_lib.h"
15
16/*----------------------------------------------------------------------------*
17 * NAME
18 * CsrWifiRouterFreeDownstreamMessageContents
19 *
20 * DESCRIPTION
21 *
22 *
23 * PARAMETERS
24 * eventClass: only the value CSR_WIFI_ROUTER_PRIM will be handled
25 * message: the message to free
26 *----------------------------------------------------------------------------*/
8c87f69a 27void CsrWifiRouterFreeDownstreamMessageContents(u16 eventClass, void *message)
635d2b00
GKH
28{
29 if (eventClass != CSR_WIFI_ROUTER_PRIM)
30 {
31 return;
32 }
33 if (NULL == message)
34 {
35 return;
36 }
37
38 switch (*((CsrWifiRouterPrim *) message))
39 {
40 case CSR_WIFI_ROUTER_MA_PACKET_REQ:
41 {
42 CsrWifiRouterMaPacketReq *p = (CsrWifiRouterMaPacketReq *)message;
55a27055 43 kfree(p->frame);
635d2b00
GKH
44 p->frame = NULL;
45 break;
46 }
47
48 default:
49 break;
50 }
51}
52
53