summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2006-10-11 10:06:35 +0000
committerglebius <glebius@FreeBSD.org>2006-10-11 10:06:35 +0000
commit38c5b1044f907414b4936528fdc246e5ceffc12e (patch)
tree62323b7d71b98b4e801f612ccf333df431eb5c5f
parentcb84ecb15c7ac8cfa5aa1c658aa270128025b413 (diff)
downloadFreeBSD-src-38c5b1044f907414b4936528fdc246e5ceffc12e.zip
FreeBSD-src-38c5b1044f907414b4936528fdc246e5ceffc12e.tar.gz
- Update the baudrate every time the parent changes its link state.
- Rearrange the curly braces so that this piece of code is more readable.
-rw-r--r--sys/net/if_vlan.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 0fef217..64912ca 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1265,12 +1265,13 @@ vlan_link_state(struct ifnet *ifp, int link)
if (trunk->vlans[i] != NULL) {
ifv = trunk->vlans[i];
#else
- for (i = 0; i < (1 << trunk->hwidth); i++) {
- LIST_FOREACH(ifv, &trunk->hash[i], ifv_list)
+ for (i = 0; i < (1 << trunk->hwidth); i++)
+ LIST_FOREACH(ifv, &trunk->hash[i], ifv_list) {
#endif
+ ifv->ifv_ifp->if_baudrate = trunk->parent->if_baudrate;
if_link_state_change(ifv->ifv_ifp,
trunk->parent->if_link_state);
- }
+ }
TRUNK_UNLOCK(trunk);
}
OpenPOWER on IntegriCloud