29#ifndef __EC_ETHERNET_H__
30#define __EC_ETHERNET_H__
32#include <linux/list.h>
33#include <linux/netdevice.h>
44 EC_EOE_FRAMETYPE_INIT_REQ = 0x00,
81 struct net_device *
dev;
EtherCAT datagram structure.
void ec_eoe_queue(ec_eoe_t *)
Queues the datagram, if necessary.
int ec_eoe_is_idle(const ec_eoe_t *)
Returns the idle state.
void ec_eoe_clear(ec_eoe_t *)
EoE destructor.
@ EC_EOE_FRAMETYPE_FILT_RES
Set Address Filter Request.
@ EC_EOE_FRAMETYPE_FILT_REQ
Set IP Parameter Response.
@ EC_EOE_FRAMETYPE_SET_IP_RES
Set IP Parameter Request.
@ EC_EOE_FRAMETYPE_SET_IP_REQ
Initiate EoE Request.
int ec_eoe_init(ec_eoe_t *, ec_slave_t *)
EoE constructor.
int ec_eoe_is_open(const ec_eoe_t *)
Returns the state of the device.
void ec_eoe_run(ec_eoe_t *)
Runs the EoE state machine.
Global definitions and macros.
struct ec_slave ec_slave_t
EtherCAT slave structure.
struct list_head queue
list item
struct sk_buff * skb
socket buffer
Ethernet over EtherCAT (EoE) handler.
uint32_t rx_rate
receive rate (bps)
unsigned int tx_queue_active
kernel netif queue started
unsigned int opened
net_device is opened
void(* state)(ec_eoe_t *)
state function for the state machine
unsigned int queue_datagram
the datagram is ready for queuing
unsigned int tx_queued_frames
number of frames in the queue
uint8_t tx_fragment_number
number of the fragment
ec_slave_t * slave
pointer to the corresponding slave
size_t rx_skb_size
size of the allocated socket buffer memory
unsigned int tx_idle
Idle flag.
ec_datagram_t datagram
datagram
ec_eoe_frame_t * tx_frame
current TX frame
off_t rx_skb_offset
current write pointer in the socket buffer
size_t tx_offset
number of octets sent
struct net_device_stats stats
device statistics
uint8_t rx_expected_fragment
next expected fragment number
uint32_t rx_counter
octets received during last second
struct net_device * dev
net_device for virtual ethernet device
uint8_t tx_frame_number
number of the transmitted frame
uint32_t tx_counter
octets transmitted during last second
struct sk_buff * rx_skb
current rx socket buffer
unsigned long rate_jiffies
time of last rate output
uint32_t tx_rate
transmit rate (bps)
unsigned int tx_queue_size
Transmit queue size.
unsigned int rx_idle
Idle flag.
struct list_head list
list item
struct list_head tx_queue
queue for frames to send