diff options
author | Joe Perches <joe@perches.com> | 2011-06-26 15:01:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-27 03:09:46 -0400 |
commit | 12a3bfefc8c1e43ddb50950cb74f8a11d680567a (patch) | |
tree | ff974d28811618a51ab8dcbef1588a1022cb9c74 /drivers/net/wan/hdlc_cisco.c | |
parent | 2903dd654d8788425a9523959b02933ea6555229 (diff) |
generic_hdlc: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/hdlc_cisco.c')
-rw-r--r-- | drivers/net/wan/hdlc_cisco.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index b1e5e5b69c2a..3f20808b5ff8 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c | |||
@@ -103,9 +103,7 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type, | |||
103 | skb = dev_alloc_skb(sizeof(struct hdlc_header) + | 103 | skb = dev_alloc_skb(sizeof(struct hdlc_header) + |
104 | sizeof(struct cisco_packet)); | 104 | sizeof(struct cisco_packet)); |
105 | if (!skb) { | 105 | if (!skb) { |
106 | printk(KERN_WARNING | 106 | netdev_warn(dev, "Memory squeeze on cisco_keepalive_send()\n"); |
107 | "%s: Memory squeeze on cisco_keepalive_send()\n", | ||
108 | dev->name); | ||
109 | return; | 107 | return; |
110 | } | 108 | } |
111 | skb_reserve(skb, 4); | 109 | skb_reserve(skb, 4); |
@@ -181,8 +179,8 @@ static int cisco_rx(struct sk_buff *skb) | |||
181 | CISCO_PACKET_LEN) && | 179 | CISCO_PACKET_LEN) && |
182 | (skb->len != sizeof(struct hdlc_header) + | 180 | (skb->len != sizeof(struct hdlc_header) + |
183 | CISCO_BIG_PACKET_LEN)) { | 181 | CISCO_BIG_PACKET_LEN)) { |
184 | printk(KERN_INFO "%s: Invalid length of Cisco control" | 182 | netdev_info(dev, "Invalid length of Cisco control packet (%d bytes)\n", |
185 | " packet (%d bytes)\n", dev->name, skb->len); | 183 | skb->len); |
186 | goto rx_error; | 184 | goto rx_error; |
187 | } | 185 | } |
188 | 186 | ||
@@ -217,8 +215,7 @@ static int cisco_rx(struct sk_buff *skb) | |||
217 | return NET_RX_SUCCESS; | 215 | return NET_RX_SUCCESS; |
218 | 216 | ||
219 | case CISCO_ADDR_REPLY: | 217 | case CISCO_ADDR_REPLY: |
220 | printk(KERN_INFO "%s: Unexpected Cisco IP address " | 218 | netdev_info(dev, "Unexpected Cisco IP address reply\n"); |
221 | "reply\n", dev->name); | ||
222 | goto rx_error; | 219 | goto rx_error; |
223 | 220 | ||
224 | case CISCO_KEEPALIVE_REQ: | 221 | case CISCO_KEEPALIVE_REQ: |
@@ -235,9 +232,8 @@ static int cisco_rx(struct sk_buff *skb) | |||
235 | min = sec / 60; sec -= min * 60; | 232 | min = sec / 60; sec -= min * 60; |
236 | hrs = min / 60; min -= hrs * 60; | 233 | hrs = min / 60; min -= hrs * 60; |
237 | days = hrs / 24; hrs -= days * 24; | 234 | days = hrs / 24; hrs -= days * 24; |
238 | printk(KERN_INFO "%s: Link up (peer " | 235 | netdev_info(dev, "Link up (peer uptime %ud%uh%um%us)\n", |
239 | "uptime %ud%uh%um%us)\n", | 236 | days, hrs, min, sec); |
240 | dev->name, days, hrs, min, sec); | ||
241 | netif_dormant_off(dev); | 237 | netif_dormant_off(dev); |
242 | st->up = 1; | 238 | st->up = 1; |
243 | } | 239 | } |
@@ -249,8 +245,7 @@ static int cisco_rx(struct sk_buff *skb) | |||
249 | } /* switch (keepalive type) */ | 245 | } /* switch (keepalive type) */ |
250 | } /* switch (protocol) */ | 246 | } /* switch (protocol) */ |
251 | 247 | ||
252 | printk(KERN_INFO "%s: Unsupported protocol %x\n", dev->name, | 248 | netdev_info(dev, "Unsupported protocol %x\n", ntohs(data->protocol)); |
253 | ntohs(data->protocol)); | ||
254 | dev_kfree_skb_any(skb); | 249 | dev_kfree_skb_any(skb); |
255 | return NET_RX_DROP; | 250 | return NET_RX_DROP; |
256 | 251 | ||
@@ -272,7 +267,7 @@ static void cisco_timer(unsigned long arg) | |||
272 | if (st->up && | 267 | if (st->up && |
273 | time_after(jiffies, st->last_poll + st->settings.timeout * HZ)) { | 268 | time_after(jiffies, st->last_poll + st->settings.timeout * HZ)) { |
274 | st->up = 0; | 269 | st->up = 0; |
275 | printk(KERN_INFO "%s: Link down\n", dev->name); | 270 | netdev_info(dev, "Link down\n"); |
276 | netif_dormant_on(dev); | 271 | netif_dormant_on(dev); |
277 | } | 272 | } |
278 | 273 | ||