aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/csr/csr_wifi_router_free_upstream_contents.c
blob: 4cd126338e27910cba3fc0ab5939da29739b66f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*****************************************************************************

	(c) Cambridge Silicon Radio Limited 2011
	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 <linux/slab.h>
#include "csr_wifi_router_prim.h"
#include "csr_wifi_router_lib.h"

/*----------------------------------------------------------------------------*
 *  NAME
 *      CsrWifiRouterFreeUpstreamMessageContents
 *
 *  DESCRIPTION
 *
 *
 *  PARAMETERS
 *      eventClass: only the value CSR_WIFI_ROUTER_PRIM will be handled
 *      message:    the message to free
 *----------------------------------------------------------------------------*/
void CsrWifiRouterFreeUpstreamMessageContents(u16 eventClass, void *message)
{
	if (eventClass != CSR_WIFI_ROUTER_PRIM)
		return;
	if (NULL == message)
		return;
	switch (*((CsrWifiRouterPrim *) message)) {
	case CSR_WIFI_ROUTER_MA_PACKET_IND:
	{
		CsrWifiRouterMaPacketInd *p =
			(CsrWifiRouterMaPacketInd *) message;
		kfree(p->frame);
		p->frame = NULL;
		break;
	}
	default:
		break;
	}
}