Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351692
b: refs/heads/master
c: e2d5f2c
h: refs/heads/master
v: v3
  • Loading branch information
Bernd Krumboeck authored and Marc Kleine-Budde committed Jan 26, 2013
1 parent f90b098 commit f3d2076
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a04282f54b52cf5a629a98f09712da1e630a1060
refs/heads/master: e2d5f2c7d66224c1a401ed1f797e467c02c025b8
11 changes: 11 additions & 0 deletions trunk/drivers/net/can/usb/usb_8dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/can/error.h>
#include <linux/can/led.h>

/* driver constants */
#define MAX_RX_URBS 20
Expand Down Expand Up @@ -497,6 +498,8 @@ static void usb_8dev_rx_can_msg(struct usb_8dev_priv *priv,

stats->rx_packets++;
stats->rx_bytes += cf->can_dlc;

can_led_event(priv->netdev, CAN_LED_EVENT_RX);
} else {
netdev_warn(priv->netdev, "frame type %d unknown",
msg->type);
Expand Down Expand Up @@ -597,6 +600,8 @@ static void usb_8dev_write_bulk_callback(struct urb *urb)

can_get_echo_skb(netdev, context->echo_index);

can_led_event(netdev, CAN_LED_EVENT_TX);

/* Release context */
context->echo_index = MAX_TX_URBS;

Expand Down Expand Up @@ -819,6 +824,8 @@ static int usb_8dev_open(struct net_device *netdev)
if (err)
return err;

can_led_event(netdev, CAN_LED_EVENT_OPEN);

/* finally start device */
err = usb_8dev_start(priv);
if (err) {
Expand Down Expand Up @@ -871,6 +878,8 @@ static int usb_8dev_close(struct net_device *netdev)

close_candev(netdev);

can_led_event(netdev, CAN_LED_EVENT_STOP);

return err;
}

Expand Down Expand Up @@ -978,6 +987,8 @@ static int usb_8dev_probe(struct usb_interface *intf,
(version>>8) & 0xff, version & 0xff);
}

devm_can_led_init(netdev);

return 0;

cleanup_cmd_msg_buffer:
Expand Down

0 comments on commit f3d2076

Please sign in to comment.