--- zzzz-none-000/linux-2.6.28.10/net/bridge/br_forward.c 2009-05-02 18:54:43.000000000 +0000 +++ puma5-6360-529/linux-2.6.28.10/net/bridge/br_forward.c 2011-12-12 17:01:33.000000000 +0000 @@ -10,18 +10,49 @@ * 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. HIL Event generation to support 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 +//-----------------------------------------------------------------------------*/ #include #include #include #include #include +#include #include "br_private.h" /* Don't forward packets to originating port or forwarding diasabled */ static inline int should_deliver(const struct net_bridge_port *p, const struct sk_buff *skb) { +#ifdef CONFIG_MACH_FUSIV + if (skb->dev == p->dev || p->state != BR_STATE_FORWARDING) + return 0; + if (skb->dev && p->dev) { + if ((strncmp(skb->dev->name, "nas", 3) == 0) && + (strncmp(p->dev->name, "nas", 3) == 0)) { + return 0; + } + } + return 1; +#endif + return (skb->dev != p->dev && p->state == BR_STATE_FORWARDING); } @@ -78,7 +109,12 @@ /* called with rcu_read_lock */ void br_deliver(const struct net_bridge_port *to, struct sk_buff *skb) { - if (should_deliver(to, skb)) { + /* + * 'to' may be null, when called from br_dev_xmit with dest mac is local. + * this can happen if there is a physical loop between two ports + * of the bridge + */ + if (to && should_deliver(to, skb)) { __br_deliver(to, skb); return; } @@ -137,11 +173,28 @@ /* called with rcu_read_lock */ void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb) { +#ifdef CONFIG_AVM_PA + avm_pa_do_not_accelerate(skb); +#endif + ti_hil_pp_event (TI_BRIDGE_PACKET_FLOODED, (void*)skb); br_flood(br, skb, __br_deliver); } /* called under bridge lock */ void br_flood_forward(struct net_bridge *br, struct sk_buff *skb) { +#ifdef CONFIG_AVM_PA + avm_pa_do_not_accelerate(skb); +#endif + ti_hil_pp_event (TI_BRIDGE_PACKET_FLOODED, (void*)skb); br_flood(br, skb, __br_forward); } + +#if defined(CONFIG_FUSIV_KERNEL_IGMP_SNOOP) || defined(CONFIG_FUSIV_KERNEL_IGMP_SNOOP_MODULE) +EXPORT_SYMBOL(br_flood_forward); +EXPORT_SYMBOL(br_forward_finish); +#endif +#if defined(CONFIG_MCAST_AP_SUPPORT) && CONFIG_MCAST_AP_SUPPORT +EXPORT_SYMBOL(br_forward); +#endif +