#define ESD_USB_MAX_RX_URBS 4
#define ESD_USB_MAX_TX_URBS 16 /* must be power of 2 */
-struct header_msg {
+struct esd_usb_header_msg {
u8 len; /* len is always the total message length in 32bit words */
u8 cmd;
u8 rsvd[2];
};
-struct version_msg {
+struct esd_usb_version_msg {
u8 len;
u8 cmd;
u8 rsvd;
__le32 drv_version;
};
-struct version_reply_msg {
+struct esd_usb_version_reply_msg {
u8 len;
u8 cmd;
u8 nets;
__le32 ts;
};
-struct rx_msg {
+struct esd_usb_rx_msg {
u8 len;
u8 cmd;
u8 net;
};
};
-struct tx_msg {
+struct esd_usb_tx_msg {
u8 len;
u8 cmd;
u8 net;
u8 data[CAN_MAX_DLEN];
};
-struct tx_done_msg {
+struct esd_usb_tx_done_msg {
u8 len;
u8 cmd;
u8 net;
__le32 ts;
};
-struct id_filter_msg {
+struct esd_usb_id_filter_msg {
u8 len;
u8 cmd;
u8 net;
__le32 mask[ESD_USB_MAX_ID_SEGMENT + 1];
};
-struct set_baudrate_msg {
+struct esd_usb_set_baudrate_msg {
u8 len;
u8 cmd;
u8 net;
/* Main message type used between library and application */
union __packed esd_usb_msg {
- struct header_msg hdr;
- struct version_msg version;
- struct version_reply_msg version_reply;
- struct rx_msg rx;
- struct tx_msg tx;
- struct tx_done_msg txdone;
- struct set_baudrate_msg setbaud;
- struct id_filter_msg filter;
+ struct esd_usb_header_msg hdr;
+ struct esd_usb_version_msg version;
+ struct esd_usb_version_reply_msg version_reply;
+ struct esd_usb_rx_msg rx;
+ struct esd_usb_tx_msg tx;
+ struct esd_usb_tx_done_msg txdone;
+ struct esd_usb_set_baudrate_msg setbaud;
+ struct esd_usb_id_filter_msg filter;
};
static struct usb_device_id esd_usb_table[] = {
.get_ts_info = ethtool_op_get_ts_info,
};
-static const struct can_bittiming_const esd_usb2_bittiming_const = {
- .name = "esd_usb2",
+static const struct can_bittiming_const esd_usb_2_bittiming_const = {
+ .name = "esd_usb_2",
.tseg1_min = 1,
.tseg1_max = 16,
.tseg2_min = 1,
.brp_inc = 1,
};
-static int esd_usb2_set_bittiming(struct net_device *netdev)
+static int esd_usb_2_set_bittiming(struct net_device *netdev)
{
- const struct can_bittiming_const *btc = &esd_usb2_bittiming_const;
+ const struct can_bittiming_const *btc = &esd_usb_2_bittiming_const;
struct esd_usb_net_priv *priv = netdev_priv(netdev);
struct can_bittiming *bt = &priv->can.bittiming;
union esd_usb_msg *msg;
priv->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES;
}
- priv->can.bittiming_const = &esd_usb2_bittiming_const;
- priv->can.do_set_bittiming = esd_usb2_set_bittiming;
+ priv->can.bittiming_const = &esd_usb_2_bittiming_const;
+ priv->can.do_set_bittiming = esd_usb_2_set_bittiming;
priv->can.do_set_mode = esd_usb_set_mode;
priv->can.do_get_berr_counter = esd_usb_get_berr_counter;