--- zzzz-none-000/linux-2.6.28.10/net/bridge/br_private.h 2009-05-02 18:54:43.000000000 +0000 +++ puma5-6360-529/linux-2.6.28.10/net/bridge/br_private.h 2009-10-23 13:23:35.000000000 +0000 @@ -9,6 +9,25 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +/*---------------------------------------------------------------------------- +// Copyright 2007, Texas Instruments Incorporated +// +// This program has been modified from its original operation by Texas Instruments +// to do the following: +// +// 1. TI Layer 2 Selective Packet Handling Framework +// 2. Support for the TI packet processor +// +// THIS MODIFIED SOFTWARE AND DOCUMENTATION ARE PROVIDED +// "AS IS," AND TEXAS INSTRUMENTS MAKES NO REPRESENTATIONS +// OR WARRENTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +// TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY +// PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR +// DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, +// COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. +// +// These changes are covered as per original license +//-----------------------------------------------------------------------------*/ #ifndef _BR_PRIVATE_H #define _BR_PRIVATE_H @@ -40,13 +59,40 @@ unsigned char addr[6]; }; +#if defined(CONFIG_FUSIV_KERNEL_AP_2_AP) || defined(CONFIG_FUSIV_KERNEL_AP_2_AP_MODULE) +struct apBridgeEntryInfo +{ + void *pApBridgeEntry; + unsigned short hashValue; + unsigned char apId; +}; +#endif + struct mac_addr { unsigned char addr[6]; }; +/* Packet Processor Specific Flags */ +#ifdef CONFIG_TI_PACKET_PROCESSOR + +/* The status of a FDB entry is defaulted to this, indicating that there is no + * PP session activity corresponding to this FDB entry and can be deleted + * as per bridge aging logic. */ +#define TI_PP_FDB_INACTIVE 0x0 + +/* When this flag is set in the status of a FDB entry, it indicates that PP has + * a session active corresponding to it and it should not be deleted although + * "aged out" in the bridge. */ +#define TI_PP_FDB_ACTIVE 0x1 + +#endif + struct net_bridge_fdb_entry { +#if defined(CONFIG_FUSIV_KERNEL_AP_2_AP) || defined(CONFIG_FUSIV_KERNEL_AP_2_AP_MODULE) + struct apBridgeEntryInfo apBridgeEntryData; +#endif struct hlist_node hlist; struct net_bridge_port *dst; @@ -56,6 +102,18 @@ mac_addr addr; unsigned char is_local; unsigned char is_static; + +#ifdef CONFIG_TI_PACKET_PROCESSOR + /* To maintain and monitor FDB entry to PP session mapping, we store + * the corresponding PP session handle in the FDB entry. */ + int ti_pp_session_handle; + + /* The status indicates whether a corresponding session exists + * in the PP for this FDB entry. The legal values for this flag + * are "TI_PP_FDB_INACTIVE" (default) and "TI_PP_FDB_ACTIVE" + * (set when PP has a mapping for this FDB entry). */ + int ti_pp_fdb_status; +#endif /* CONFIG_TI_PACKET_PROCESSOR */ }; struct net_bridge_port @@ -84,6 +142,21 @@ struct rcu_head rcu; }; +#ifdef CONFIG_TI_L2_SELECTIVE_PACKET_HANDLING +struct l2_sph +{ + /* Function that handles the packet */ + int (*packet_handler)(struct sk_buff *skb); + /* Priority of the function handler. Handlers installed with lower + * priority number are called before a handler installed with + * a higher priority number + */ + int priority; + struct l2_sph *prev; + struct l2_sph *next; +}; +#endif /* CONFIG_TI_L2_SELECTIVE_PACKET_HANDLING */ + struct net_bridge { spinlock_t lock; @@ -93,6 +166,15 @@ struct hlist_head hash[BR_HASH_SIZE]; struct list_head age_list; unsigned long feature_mask; + +#if defined(CONFIG_FUSIV_KERNEL_IGMP_SNOOP) || defined(CONFIG_FUSIV_KERNEL_IGMP_SNOOP_MODULE) + void *mfdb; +#endif + +#if defined(CONFIG_FUSIV_KERNEL_PPPOE_RELAY) || defined(CONFIG_FUSIV_KERNEL_PPPOE_RELAY_MODULE) + char in_dev_name[16]; +#endif + #ifdef CONFIG_BRIDGE_NETFILTER struct rtable fake_rtable; #endif @@ -128,6 +210,20 @@ struct timer_list topology_change_timer; struct timer_list gc_timer; struct kobject *ifobj; + + int automatic_mac_disabled; /* AVM */ + +#ifdef CONFIG_TI_L2_SELECTIVE_PACKET_HANDLING + struct l2_sph *selective_packet_handler; +#endif /* CONFIG_TI_L2_SELECTIVE_PACKET_HANDLING */ +#if defined(CONFIG_FUSIV_KERNEL_AP_2_AP) || defined(CONFIG_FUSIV_KERNEL_AP_2_AP_MODULE) + /* + * 'bridgeVlanAddr' is used to store the vlanId + * of that bridge. When a bridge has interface + * like eth0.10 then, the bridgeVlanAddr is 10 + */ + unsigned short bridgeVlanAddr; +#endif }; extern struct notifier_block br_device_notifier; @@ -166,6 +262,10 @@ struct net_bridge_port *source, const unsigned char *addr); +/* AVM */ +extern void br_fdb_delete_by_mac_if_local_without_port(struct net_bridge *br, unsigned char *addr); + + /* br_forward.c */ extern void br_deliver(const struct net_bridge_port *to, struct sk_buff *skb); @@ -231,6 +331,11 @@ u32 path_cost); extern ssize_t br_show_bridge_id(char *buf, const struct bridge_id *id); +/* AVM */ +extern void br_stp_set_bridge_id(struct net_bridge *br, void *addr); + + + /* br_stp_bpdu.c */ struct stp_proto; extern void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb,