--- zzzz-none-000/linux-2.6.28.10/net/bridge/br_notify.c 2009-05-02 18:54:43.000000000 +0000 +++ fusiv-7390-686/linux-2.6.28.10/net/bridge/br_notify.c 2009-10-23 13:23:35.000000000 +0000 @@ -10,6 +10,24 @@ * 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. Unmanaged Bridge Support. +// +// 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 @@ -23,6 +41,10 @@ .notifier_call = br_device_event }; +#ifdef CONFIG_TI_UNMANAGED_BRIDGE +extern int ti_unmanaged_bridge_handler (struct net_device *dev, unsigned long event); +#endif /* CONFIG_TI_UNMANAGED_BRIDGE */ + /* * Handle changes in state of network devices enslaved to a bridge. * @@ -35,6 +57,15 @@ struct net_bridge_port *p = dev->br_port; struct net_bridge *br; +#ifdef CONFIG_TI_UNMANAGED_BRIDGE + /* Pass control to the unmanaged bridge handler. */ + if (ti_unmanaged_bridge_handler(dev, event) == 0) + { + /* The event has been handled by the unmanaged bridge handler. */ + return NOTIFY_DONE; + } +#endif /* CONFIG_TI_UNMANAGED_BRIDGE */ + /* not a port of a bridge */ if (p == NULL) return NOTIFY_DONE; @@ -49,7 +80,8 @@ case NETDEV_CHANGEADDR: spin_lock_bh(&br->lock); br_fdb_changeaddr(p, dev->dev_addr); - br_stp_recalculate_bridge_id(br); + if (!p->br->automatic_mac_disabled) + br_stp_recalculate_bridge_id(br); spin_unlock_bh(&br->lock); break;