Broadcom SDK and wireless driver: another attempt to update to ver. 5.10.147.0
[tomato.git] / release / src-rt / emf / emf / emf_linux.h
blobdb1558a051139f952e184cca38db17aa01053884
1 /*
2 * Copyright (C) 2009, Broadcom Corporation
3 * All Rights Reserved.
4 *
5 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
6 * the contents of this file may not be disclosed to third parties, copied
7 * or duplicated in any form, in whole or in part, without the prior
8 * written permission of Broadcom Corporation.
10 * $Id: emf_linux.h,v 1.2 2007/04/05 23:10:03 Exp $
13 #ifndef _EMF_LINUX_H_
14 #define _EMF_LINUX_H_
16 #define EMF_MAX_INST 8
18 #ifdef EMFDBG
19 #define EMF_DUMP_PKT(data) \
20 { \
21 int32 i; \
22 for (i = 0; i < 64; i++) \
23 printk("%02x ", (data)[i]); \
24 printk("\n"); \
26 #else /* EMFDBG */
27 #define EMF_DUMP_PKT(data)
28 #endif /* EMFDBG */
30 #define EMF_BRPORT_STATE(if) (((br_port_t *)((if)->br_port))->state)
32 typedef struct emf_iflist
34 struct emf_iflist *next; /* Next pointer */
35 struct net_device *if_ptr; /* Interface pointer */
36 } emf_iflist_t;
38 typedef struct emf_info
40 struct emf_info *next; /* Next pointer */
41 int8 inst_id[16]; /* EMF Instance identifier */
42 osl_t *osh; /* OS layer handle */
43 struct net_device *br_dev; /* Bridge device pointer */
44 struct emfc_info *emfci; /* EMFC Global data handle */
45 uint32 hooks_reg; /* EMF Hooks registration */
46 emf_iflist_t *iflist_head; /* EMF interfaces list */
47 } emf_info_t;
49 typedef struct emf_struct
51 struct sock *nl_sk; /* Netlink socket */
52 emf_info_t *list_head; /* EMF instance list */
53 osl_lock_t lock; /* EMF locking */
54 int32 hooks_reg; /* EMF hooks registration ref count */
55 int32 inst_count; /* EMF instance count */
56 } emf_struct_t;
58 typedef struct br_port
60 struct br_port *next;
61 struct net_bridge *br;
62 struct net_device *dev;
63 int32 port_no;
64 uint16 port_id;
65 int32 state;
66 } br_port_t;
68 static uint32 emf_br_pre_hook(uint32, struct sk_buff **,
69 const struct net_device *,
70 const struct net_device *,
71 int32 (*)(struct sk_buff *));
72 static uint32 emf_ip_post_hook(uint32, struct sk_buff **,
73 const struct net_device *,
74 const struct net_device *,
75 int32 (*)(struct sk_buff *));
77 #endif /* _EMF_LINUX_H_ */