#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/can/error.h>
-#include <linux/can/led.h>
#include <linux/can/rx-offload.h>
/* Line discipline ID number.
#define ELM327_NAPI_WEIGHT 4
-#define ELM327_SIZE_RXBUF 992
#define ELM327_SIZE_TXBUF 32
+#define ELM327_SIZE_RXBUF 1024
#define ELM327_CAN_CONFIG_SEND_SFF 0x8000
#define ELM327_CAN_CONFIG_VARIABLE_DLC 0x4000
struct can_rx_offload offload;
/* TTY buffers */
- u8 rxbuf[ELM327_SIZE_RXBUF];
u8 txbuf[ELM327_SIZE_TXBUF];
+ u8 rxbuf[ELM327_SIZE_RXBUF];
/* Per-channel lock */
spinlock_t lock;
elm->drop_next_line = 0;
/* We can only set the bitrate as a fraction of 500000.
- * The bit timing constants in can327_bittiming_const will
+ * The bitrates listed in can327_bitrate_const will
* limit the user to the right values.
*/
elm->can_bitrate_divisor = 500000 / elm->can.bittiming.bitrate;
can_rx_offload_enable(&elm->offload);
- can_led_event(dev, CAN_LED_EVENT_OPEN);
elm->can.state = CAN_STATE_ERROR_ACTIVE;
netif_start_queue(dev);
elm->can.state = CAN_STATE_STOPPED;
can_rx_offload_del(&elm->offload);
close_candev(dev);
- can_led_event(dev, CAN_LED_EVENT_STOP);
return 0;
}
dev->stats.tx_packets++;
dev->stats.tx_bytes += frame->len;
- can_led_event(dev, CAN_LED_EVENT_TX);
-
out:
kfree_skb(skb);
return NETDEV_TX_OK;
elm->tty = tty;
tty->disc_data = elm;
- devm_can_led_init(elm->dev);
-
/* Let 'er rip */
err = register_candev(elm->dev);
if (err) {