--- zzzz-none-000/linux-2.4.17/net/bridge/br_if.c 2001-12-21 17:42:05.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/net/bridge/br_if.c 2004-11-24 13:22:09.000000000 +0000 @@ -5,7 +5,7 @@ * Authors: * Lennert Buytenhek * - * $Id: br_if.c,v 1.6 2001/11/24 17:51:03 davem Exp $ + * $Id: br_if.c,v 1.3 2003/10/03 20:39:41 mhassler Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -46,6 +46,10 @@ if ((p = dev->br_port) == NULL) return -EINVAL; +#ifdef AVM_DELAYQUEUE + br_delayqueue_discard_frames(br , dev); +#endif + br_stp_disable_port(p); dev_set_promiscuity(dev, -1); @@ -68,7 +72,7 @@ return 0; } -static struct net_bridge **__find_br(char *name) +struct net_bridge **__find_br(char *name) { struct net_bridge **b; struct net_bridge *br; @@ -111,17 +115,21 @@ br->lock = RW_LOCK_UNLOCKED; br->hash_lock = RW_LOCK_UNLOCKED; +#ifdef AVM_DELAYQUEUE + skb_queue_head_init(&br->delayqueue); +#endif + br->bridge_id.prio[0] = 0x80; br->bridge_id.prio[1] = 0x00; memset(br->bridge_id.addr, 0, ETH_ALEN); - br->stp_enabled = 1; + br->stp_enabled = 0; br->designated_root = br->bridge_id; br->root_path_cost = 0; br->root_port = 0; - br->bridge_max_age = br->max_age = 20 * HZ; + br->bridge_max_age = br->max_age = 6 * HZ; br->bridge_hello_time = br->hello_time = 2 * HZ; - br->bridge_forward_delay = br->forward_delay = 15 * HZ; + br->bridge_forward_delay = br->forward_delay = 4 * HZ; br->topology_change = 0; br->topology_change_detected = 0; br_timer_clear(&br->hello_timer); @@ -131,6 +139,9 @@ br->ageing_time = 300 * HZ; br->gc_interval = 4 * HZ; + /*Set Bridge Filter to be Off br Default*/ + br->br_filter_active = 0; + return br; } @@ -140,7 +151,7 @@ int i; struct net_bridge_port *p; - p = kmalloc(sizeof(*p), GFP_KERNEL); + p = kmalloc(sizeof(*p), GFP_ATOMIC); if (p == NULL) return p; @@ -205,6 +216,17 @@ if (br->dev.flags & IFF_UP) return -EBUSY; +#ifdef AVM_DELAYQUEUE + /* destroy the delay queue */ + if (br->tokens_per_tick) { + br->tokens_per_tick = 0; + del_timer(&br->token_tick); + } + br_delayqueue_handle_frames(br); +#endif + + br_flush_filter(br); + del_ifs(br); *b = br->next;