master/ethernet.h
changeset 217 dcfd406e7786
parent 214 8beb86af5ed0
child 218 80fb87518f3d
equal deleted inserted replaced
216:e7f3e485c5b8 217:dcfd406e7786
    46 {
    46 {
    47     EC_EOE_RX_START, /**< start receiving and check for data. */
    47     EC_EOE_RX_START, /**< start receiving and check for data. */
    48     EC_EOE_RX_CHECK, /**< checking frame was sent. */
    48     EC_EOE_RX_CHECK, /**< checking frame was sent. */
    49     EC_EOE_RX_FETCH, /**< there is new data; fetching frame was sent. */
    49     EC_EOE_RX_FETCH, /**< there is new data; fetching frame was sent. */
    50     EC_EOE_TX_START, /**< start sending a queued frame. */
    50     EC_EOE_TX_START, /**< start sending a queued frame. */
    51     EC_EOE_TX_SENT,  /**< queued frame was sent; start checking. */
    51     EC_EOE_TX_SENT   /**< queued frame was sent. */
    52     EC_EOE_TX_CHECK, /**< check mailbox for acknowledgement. */
       
    53     EC_EOE_TX_FETCH, /**< receive mailbox response */
       
    54 }
    52 }
    55 ec_eoe_state_t;
    53 ec_eoe_state_t;
       
    54 
       
    55 /*****************************************************************************/
       
    56 
       
    57 /**
       
    58    Queued frame structure.
       
    59 */
       
    60 
       
    61 typedef struct
       
    62 {
       
    63     struct list_head queue; /**< list item */
       
    64     struct sk_buff *skb; /**< socket buffer */
       
    65 }
       
    66 ec_eoe_frame_t;
    56 
    67 
    57 /*****************************************************************************/
    68 /*****************************************************************************/
    58 
    69 
    59 /**
    70 /**
    60    Ethernet-over-EtherCAT (EoE) Object.
    71    Ethernet-over-EtherCAT (EoE) Object.
    76     struct net_device_stats stats; /**< device statistics */
    87     struct net_device_stats stats; /**< device statistics */
    77     struct list_head tx_queue; /**< queue for frames to send */
    88     struct list_head tx_queue; /**< queue for frames to send */
    78     unsigned int tx_queue_active; /**< kernel netif queue started */
    89     unsigned int tx_queue_active; /**< kernel netif queue started */
    79     unsigned int queued_frames; /**< number of frames in the queue */
    90     unsigned int queued_frames; /**< number of frames in the queue */
    80     spinlock_t tx_queue_lock; /**< spinlock for the send queue */
    91     spinlock_t tx_queue_lock; /**< spinlock for the send queue */
    81     uint8_t tx_frame_number; /**< Number of the transmitted frame */
    92     ec_eoe_frame_t *tx_frame; /**< current TX frame */
    82     size_t last_tx_bytes; /**< number of bytes currently transmitted */
    93     uint8_t tx_frame_number; /**< number of the transmitted frame */
       
    94     uint8_t tx_fragment_number; /**< number of the fragment */
       
    95     size_t tx_offset; /**< numbero of octets sent */
    83 }
    96 }
    84 ec_eoe_t;
    97 ec_eoe_t;
    85 
    98 
    86 /*****************************************************************************/
    99 /*****************************************************************************/
    87 
   100