--- zzzz-none-000/linux-2.4.17/net/bridge/br_device.c 2001-08-15 08:54:30.000000000 +0000 +++ sangam-fb-401/linux-2.4.17/net/bridge/br_device.c 2005-10-04 11:51:35.000000000 +0000 @@ -5,7 +5,7 @@ * Authors: * Lennert Buytenhek * - * $Id: br_device.c,v 1.5 2001/08/14 22:05:57 davem Exp $ + * $Id: br_device.c,v 1.2 2003/10/30 20:09:27 sneha Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -116,6 +116,30 @@ return 0; } +/* UDO */ +static int br_set_mac_address(struct net_device *dev, void *addr_struct_p) +{ + struct net_bridge *br; + struct sockaddr *addr = (struct sockaddr *)(addr_struct_p); + unsigned char br_mac_zero[6] = {0,0,0,0,0,0}; + + br = dev->priv; + read_lock(&br->lock); + + if (!memcmp(addr->sa_data, br_mac_zero, ETH_ALEN)) { + if (br->automatic_mac_disabled) { + br->automatic_mac_disabled = 0; + br_stp_recalculate_bridge_id(br); + } + } else { + br->automatic_mac_disabled = 1; + br_stp_set_bridge_id(br, addr->sa_data); + } + read_unlock(&br->lock); + + return 0; +} + static int br_dev_accept_fastpath(struct net_device *dev, struct dst_entry *dst) { return -1; @@ -132,6 +156,6 @@ dev->set_multicast_list = br_dev_set_multicast_list; dev->stop = br_dev_stop; dev->accept_fastpath = br_dev_accept_fastpath; - dev->tx_queue_len = 0; - dev->set_mac_address = NULL; + dev->tx_queue_len = 100; /* Changed from 0 to 100, for the PRIOWRR scheduler */ + dev->set_mac_address = br_set_mac_address; /* UDO */ }