diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-05-10 05:31:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-16 02:10:02 -0400 |
commit | 28a16c97963d3bc36a2c192859f6d8025ef2967a (patch) | |
tree | 01d21938502412959c88757df973cc5a770d1cce /net/bridge/br_stp_timer.c | |
parent | cfb478da70f2213520866c84cb0aea0d7c0e1148 (diff) |
bridge: change console message interface
Use one set of macro's for all bridge messages.
Note: can't use netdev_XXX macro's because bridge is purely
virtual and has no device parent.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_stp_timer.c')
-rw-r--r-- | net/bridge/br_stp_timer.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/net/bridge/br_stp_timer.c b/net/bridge/br_stp_timer.c index 772a140bfdf0..7b22456023c5 100644 --- a/net/bridge/br_stp_timer.c +++ b/net/bridge/br_stp_timer.c | |||
@@ -35,7 +35,7 @@ static void br_hello_timer_expired(unsigned long arg) | |||
35 | { | 35 | { |
36 | struct net_bridge *br = (struct net_bridge *)arg; | 36 | struct net_bridge *br = (struct net_bridge *)arg; |
37 | 37 | ||
38 | pr_debug("%s: hello timer expired\n", br->dev->name); | 38 | br_debug(br, "hello timer expired\n"); |
39 | spin_lock(&br->lock); | 39 | spin_lock(&br->lock); |
40 | if (br->dev->flags & IFF_UP) { | 40 | if (br->dev->flags & IFF_UP) { |
41 | br_config_bpdu_generation(br); | 41 | br_config_bpdu_generation(br); |
@@ -55,13 +55,9 @@ static void br_message_age_timer_expired(unsigned long arg) | |||
55 | if (p->state == BR_STATE_DISABLED) | 55 | if (p->state == BR_STATE_DISABLED) |
56 | return; | 56 | return; |
57 | 57 | ||
58 | 58 | br_info(br, "port %u(%s) neighbor %.2x%.2x.%pM lost\n", | |
59 | pr_info("%s: neighbor %.2x%.2x.%.2x:%.2x:%.2x:%.2x:%.2x:%.2x lost on port %d(%s)\n", | 59 | (unsigned) p->port_no, p->dev->name, |
60 | br->dev->name, | 60 | id->prio[0], id->prio[1], &id->addr); |
61 | id->prio[0], id->prio[1], | ||
62 | id->addr[0], id->addr[1], id->addr[2], | ||
63 | id->addr[3], id->addr[4], id->addr[5], | ||
64 | p->port_no, p->dev->name); | ||
65 | 61 | ||
66 | /* | 62 | /* |
67 | * According to the spec, the message age timer cannot be | 63 | * According to the spec, the message age timer cannot be |
@@ -87,8 +83,8 @@ static void br_forward_delay_timer_expired(unsigned long arg) | |||
87 | struct net_bridge_port *p = (struct net_bridge_port *) arg; | 83 | struct net_bridge_port *p = (struct net_bridge_port *) arg; |
88 | struct net_bridge *br = p->br; | 84 | struct net_bridge *br = p->br; |
89 | 85 | ||
90 | pr_debug("%s: %d(%s) forward delay timer\n", | 86 | br_debug(br, "port %u(%s) forward delay timer\n", |
91 | br->dev->name, p->port_no, p->dev->name); | 87 | (unsigned) p->port_no, p->dev->name); |
92 | spin_lock(&br->lock); | 88 | spin_lock(&br->lock); |
93 | if (p->state == BR_STATE_LISTENING) { | 89 | if (p->state == BR_STATE_LISTENING) { |
94 | p->state = BR_STATE_LEARNING; | 90 | p->state = BR_STATE_LEARNING; |
@@ -107,7 +103,7 @@ static void br_tcn_timer_expired(unsigned long arg) | |||
107 | { | 103 | { |
108 | struct net_bridge *br = (struct net_bridge *) arg; | 104 | struct net_bridge *br = (struct net_bridge *) arg; |
109 | 105 | ||
110 | pr_debug("%s: tcn timer expired\n", br->dev->name); | 106 | br_debug(br, "tcn timer expired\n"); |
111 | spin_lock(&br->lock); | 107 | spin_lock(&br->lock); |
112 | if (br->dev->flags & IFF_UP) { | 108 | if (br->dev->flags & IFF_UP) { |
113 | br_transmit_tcn(br); | 109 | br_transmit_tcn(br); |
@@ -121,7 +117,7 @@ static void br_topology_change_timer_expired(unsigned long arg) | |||
121 | { | 117 | { |
122 | struct net_bridge *br = (struct net_bridge *) arg; | 118 | struct net_bridge *br = (struct net_bridge *) arg; |
123 | 119 | ||
124 | pr_debug("%s: topo change timer expired\n", br->dev->name); | 120 | br_debug(br, "topo change timer expired\n"); |
125 | spin_lock(&br->lock); | 121 | spin_lock(&br->lock); |
126 | br->topology_change_detected = 0; | 122 | br->topology_change_detected = 0; |
127 | br->topology_change = 0; | 123 | br->topology_change = 0; |
@@ -132,8 +128,8 @@ static void br_hold_timer_expired(unsigned long arg) | |||
132 | { | 128 | { |
133 | struct net_bridge_port *p = (struct net_bridge_port *) arg; | 129 | struct net_bridge_port *p = (struct net_bridge_port *) arg; |
134 | 130 | ||
135 | pr_debug("%s: %d(%s) hold timer expired\n", | 131 | br_debug(p->br, "port %u(%s) hold timer expired\n", |
136 | p->br->dev->name, p->port_no, p->dev->name); | 132 | (unsigned) p->port_no, p->dev->name); |
137 | 133 | ||
138 | spin_lock(&p->br->lock); | 134 | spin_lock(&p->br->lock); |
139 | if (p->config_pending) | 135 | if (p->config_pending) |