76 void (*state)(ec_eoe_t *); /**< state function for the state machine */ |
76 void (*state)(ec_eoe_t *); /**< state function for the state machine */ |
77 struct net_device *dev; /**< net_device for virtual ethernet device */ |
77 struct net_device *dev; /**< net_device for virtual ethernet device */ |
78 struct net_device_stats stats; /**< device statistics */ |
78 struct net_device_stats stats; /**< device statistics */ |
79 unsigned int opened; /**< net_device is opened */ |
79 unsigned int opened; /**< net_device is opened */ |
80 unsigned long rate_jiffies; /**< time of last rate output */ |
80 unsigned long rate_jiffies; /**< time of last rate output */ |
|
81 |
81 struct sk_buff *rx_skb; /**< current rx socket buffer */ |
82 struct sk_buff *rx_skb; /**< current rx socket buffer */ |
82 off_t rx_skb_offset; /**< current write pointer in the socket buffer */ |
83 off_t rx_skb_offset; /**< current write pointer in the socket buffer */ |
83 size_t rx_skb_size; /**< size of the allocated socket buffer memory */ |
84 size_t rx_skb_size; /**< size of the allocated socket buffer memory */ |
84 uint8_t rx_expected_fragment; /**< next expected fragment number */ |
85 uint8_t rx_expected_fragment; /**< next expected fragment number */ |
85 uint32_t rx_counter; /**< octets received during last second */ |
86 uint32_t rx_counter; /**< octets received during last second */ |
86 uint32_t rx_rate; /**< receive rate (bps) */ |
87 uint32_t rx_rate; /**< receive rate (bps) */ |
|
88 unsigned int rx_idle; /**< Idle flag. */ |
|
89 |
87 struct list_head tx_queue; /**< queue for frames to send */ |
90 struct list_head tx_queue; /**< queue for frames to send */ |
88 unsigned int tx_queue_size; /**< Transmit queue size. */ |
91 unsigned int tx_queue_size; /**< Transmit queue size. */ |
89 unsigned int tx_queue_active; /**< kernel netif queue started */ |
92 unsigned int tx_queue_active; /**< kernel netif queue started */ |
90 unsigned int tx_queued_frames; /**< number of frames in the queue */ |
93 unsigned int tx_queued_frames; /**< number of frames in the queue */ |
91 spinlock_t tx_queue_lock; /**< spinlock for the send queue */ |
94 struct semaphore tx_queue_sem; /**< Semaphore for the send queue. */ |
92 ec_eoe_frame_t *tx_frame; /**< current TX frame */ |
95 ec_eoe_frame_t *tx_frame; /**< current TX frame */ |
93 uint8_t tx_frame_number; /**< number of the transmitted frame */ |
96 uint8_t tx_frame_number; /**< number of the transmitted frame */ |
94 uint8_t tx_fragment_number; /**< number of the fragment */ |
97 uint8_t tx_fragment_number; /**< number of the fragment */ |
95 size_t tx_offset; /**< number of octets sent */ |
98 size_t tx_offset; /**< number of octets sent */ |
96 uint32_t tx_counter; /**< octets transmitted during last second */ |
99 uint32_t tx_counter; /**< octets transmitted during last second */ |
97 uint32_t tx_rate; /**< transmit rate (bps) */ |
100 uint32_t tx_rate; /**< transmit rate (bps) */ |
|
101 unsigned int tx_idle; /**< Idle flag. */ |
|
102 |
98 unsigned int tries; /**< Tries. */ |
103 unsigned int tries; /**< Tries. */ |
99 }; |
104 }; |
100 |
105 |
101 /*****************************************************************************/ |
106 /*****************************************************************************/ |
102 |
107 |
103 int ec_eoe_init(ec_eoe_t *, ec_slave_t *); |
108 int ec_eoe_init(ec_eoe_t *, ec_slave_t *); |
104 void ec_eoe_clear(ec_eoe_t *); |
109 void ec_eoe_clear(ec_eoe_t *); |
105 void ec_eoe_run(ec_eoe_t *); |
110 void ec_eoe_run(ec_eoe_t *); |
106 void ec_eoe_queue(ec_eoe_t *); |
111 void ec_eoe_queue(ec_eoe_t *); |
107 int ec_eoe_is_open(const ec_eoe_t *); |
112 int ec_eoe_is_open(const ec_eoe_t *); |
|
113 int ec_eoe_is_idle(const ec_eoe_t *); |
108 |
114 |
109 /*****************************************************************************/ |
115 /*****************************************************************************/ |
110 |
116 |
111 #endif |
117 #endif |
112 |
118 |