37 #ifndef __EC_ETHERNET_H__ 38 #define __EC_ETHERNET_H__ 40 #include <linux/list.h> 41 #include <linux/netdevice.h> 53 EC_EOE_TYPE_FRAME_FRAG = 0x00,
79 struct net_device *
dev;
113 int ec_eoe_parse(
const char *,
int *, uint16_t *, uint16_t *);
unsigned int tx_ring_size
Transmit ring size.
int ec_eoe_init(ec_master_t *, ec_eoe_t *, uint16_t, uint16_t)
EoE explicit init constructor.
uint32_t tx_counter
octets transmitted during last second
void ec_eoe_clear(ec_eoe_t *)
EoE destructor.
uint8_t tx_fragment_number
number of the fragment
ec_slave_t * slave
pointer to the corresponding slave
unsigned int tx_ring_count
Transmit ring count.
size_t rx_skb_size
size of the allocated socket buffer memory
size_t tx_offset
number of octets sent
EtherCAT slave structure.
char * ec_eoe_name(const ec_eoe_t *)
Returns the eoe device name.
unsigned int tx_queue_active
kernel netif queue started
void ec_eoe_link_slave(ec_eoe_t *, ec_slave_t *)
EoE link slave.
uint32_t tx_rate
transmit rate (bps)
Global definitions and macros.
uint8_t rx_expected_fragment
next expected fragment number
void ec_eoe_run(ec_eoe_t *)
Runs the EoE state machine.
unsigned int tx_next_to_use
index of frames added to the ring
unsigned int auto_created
auto created flag.
int ec_eoe_is_open(const ec_eoe_t *)
Returns the state of the device.
unsigned int tx_next_to_clean
index of frames being used from the ring
unsigned long rate_jiffies
time of last rate output
int ec_eoe_parse(const char *, int *, uint16_t *, uint16_t *)
Parse an eoe interface from a string.
struct sk_buff ** tx_ring
ring for frames to send
unsigned int have_mbox_lock
flag to track if we have the mbox lock
ec_master_t * master
pointer to the corresponding master
EoE Init, Set IP Parameter Request.
void ec_eoe_queue(ec_eoe_t *)
Queues the datagram, if necessary.
EtherCAT datagram structure.
int ec_eoe_auto_init(ec_eoe_t *, ec_slave_t *)
EoE auto constructor for slave.
unsigned int opened
net_device is opened
struct list_head list
list item
int ec_eoe_is_idle(const ec_eoe_t *)
Returns the idle state.
off_t rx_skb_offset
current write pointer in the socket buffer
ec_datagram_t datagram
datagram
unsigned int ec_eoe_tx_queued_frames(const ec_eoe_t *eoe)
struct net_device_stats stats
device statistics
unsigned int tx_idle
Idle flag.
uint32_t rx_rate
receive rate (bps)
void ec_eoe_clear_slave(ec_eoe_t *)
EoE clear slave.
struct sk_buff * rx_skb
current rx socket buffer
EoE Frame Fragment Tx & Rx.
void(* state)(ec_eoe_t *)
state function for the state machine
struct sk_buff * tx_skb
current TX frame
uint8_t tx_frame_number
number of the transmitted frame
uint32_t rx_counter
octets received during last second
EoE Init, Set IP Parameter Response.
Ethernet over EtherCAT (EoE) handler.
EoE Set MAC Address Filter Request.
unsigned int rx_idle
Idle flag.
struct net_device * dev
net_device for virtual ethernet device
unsigned int queue_datagram
the datagram is ready for queuing