--- zzzz-none-000/linux-2.6.39.4/net/bridge/br_stp_if.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/net/bridge/br_stp_if.c 2021-11-10 13:23:11.000000000 +0000 @@ -10,10 +10,15 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +/* + * Includes Intel Corporation's changes/modifications dated: [11/07/2011]. +* Changed/modified portions - Copyright © [2011], Intel Corporation. +*/ #include #include #include +#include #include "br_private.h" #include "br_private_stp.h" @@ -112,7 +117,10 @@ br_configuration_update(br); br_port_state_selection(br); - +#ifdef CONFIG_TI_PACKET_PROCESSOR + /* Generate the event indicating that the port has been disabled. */ + ti_hil_pp_event(TI_BRIDGE_PORT_DISABLED, (void *)p->dev); +#endif if (br_is_root_bridge(br) && !wasroot) br_become_root_bridge(br); } @@ -200,6 +208,25 @@ br_become_root_bridge(br); } +/* AVM */ +void br_stp_set_bridge_id(struct net_bridge *br, void *addr) +{ + if (memcmp(br->bridge_id.addr, addr, ETH_ALEN)) { + /* + * alte mac aus der fdb loeschen, wenn sie nicht zu einem port + * der br. gehoert + */ + br_fdb_delete_by_mac_if_local_without_port(br, br->bridge_id.addr); + /* + * hier wird im fdb entry der port nicht ueberschrieben, + * wenn die mac zu einem port der bridge gehoert + */ + br_fdb_insert(br, 0/*no attached port*/, addr); + br_stp_change_bridge_id(br, addr); + } +} + + /* should be aligned on 2 bytes for compare_ether_addr() */ static const unsigned short br_mac_zero_aligned[ETH_ALEN >> 1]; @@ -225,6 +252,8 @@ if (compare_ether_addr(br->bridge_id.addr, addr) == 0) return false; /* no change */ + /* remove old mac from fdb, if no port is a assign */ + br_fdb_delete_by_mac_if_local_without_port(br, br->bridge_id.addr); br_stp_change_bridge_id(br, addr); return true; }