skb_put_data(skb, &cf, sizeof(struct can_frame));
sl->dev->stats.rx_packets++;
- sl->dev->stats.rx_bytes += cf.len;
+ if (!(cf.can_id & CAN_RTR_FLAG))
+ sl->dev->stats.rx_bytes += cf.len;
+
netif_rx_ni(skb);
}
if (!(cf->can_id & CAN_RTR_FLAG)) {
for (i = 0; i < cf->len; i++)
pos = hex_byte_pack_upper(pos, cf->data[i]);
+
+ sl->dev->stats.tx_bytes += cf->len;
}
*pos++ = '\r';
actual = sl->tty->ops->write(sl->tty, sl->xbuff, pos - sl->xbuff);
sl->xleft = (pos - sl->xbuff) - actual;
sl->xhead = sl->xbuff + actual;
- sl->dev->stats.tx_bytes += cf->len;
}
/* Write out any remaining transmit buffer. Scheduled when tty is writable */
}
/* Perform I/O control on an active SLCAN channel. */
- static int slcan_ioctl(struct tty_struct *tty, struct file *file,
- unsigned int cmd, unsigned long arg)
+ static int slcan_ioctl(struct tty_struct *tty, unsigned int cmd,
+ unsigned long arg)
{
struct slcan *sl = (struct slcan *) tty->disc_data;
unsigned int tmp;
*/
netif_stop_queue(ax->dev);
- ax->tty = NULL;
-
unregister_netdev(ax->dev);
/* Free all AX25 frame buffers after unreg. */
kfree(ax->rbuff);
kfree(ax->xbuff);
+ ax->tty = NULL;
+
free_netdev(ax->dev);
}
/* Perform I/O control on an active ax25 channel. */
- static int mkiss_ioctl(struct tty_struct *tty, struct file *file,
- unsigned int cmd, unsigned long arg)
+ static int mkiss_ioctl(struct tty_struct *tty, unsigned int cmd,
+ unsigned long arg)
{
struct mkiss *ax = mkiss_get(tty);
struct net_device *dev;
#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b
#define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443
#define PCI_DEVICE_ID_AMD_19H_DF_F3 0x1653
+#define PCI_DEVICE_ID_AMD_19H_M10H_DF_F3 0x14b0
#define PCI_DEVICE_ID_AMD_19H_M40H_DF_F3 0x167c
#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d
#define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703
#define PCI_DEVICE_ID_APPLICOM_PCI2000PFB 0x0003
#define PCI_VENDOR_ID_MOXA 0x1393
- #define PCI_DEVICE_ID_MOXA_RC7000 0x0001
- #define PCI_DEVICE_ID_MOXA_CP102 0x1020
- #define PCI_DEVICE_ID_MOXA_CP102UL 0x1021
- #define PCI_DEVICE_ID_MOXA_CP102U 0x1022
- #define PCI_DEVICE_ID_MOXA_C104 0x1040
- #define PCI_DEVICE_ID_MOXA_CP104U 0x1041
- #define PCI_DEVICE_ID_MOXA_CP104JU 0x1042
- #define PCI_DEVICE_ID_MOXA_CP104EL 0x1043
- #define PCI_DEVICE_ID_MOXA_CT114 0x1140
- #define PCI_DEVICE_ID_MOXA_CP114 0x1141
- #define PCI_DEVICE_ID_MOXA_CP118U 0x1180
- #define PCI_DEVICE_ID_MOXA_CP118EL 0x1181
- #define PCI_DEVICE_ID_MOXA_CP132 0x1320
- #define PCI_DEVICE_ID_MOXA_CP132U 0x1321
- #define PCI_DEVICE_ID_MOXA_CP134U 0x1340
- #define PCI_DEVICE_ID_MOXA_C168 0x1680
- #define PCI_DEVICE_ID_MOXA_CP168U 0x1681
- #define PCI_DEVICE_ID_MOXA_CP168EL 0x1682
#define PCI_DEVICE_ID_MOXA_CP204J 0x2040
#define PCI_DEVICE_ID_MOXA_C218 0x2180
#define PCI_DEVICE_ID_MOXA_C320 0x3200