master/device.h
changeset 693 e341f1788608
parent 692 fe7cf37c33f1
child 758 8fa6f825eb7d
equal deleted inserted replaced
692:fe7cf37c33f1 693:e341f1788608
    45 
    45 
    46 #include "../include/ecrt.h"
    46 #include "../include/ecrt.h"
    47 #include "../devices/ecdev.h"
    47 #include "../devices/ecdev.h"
    48 #include "globals.h"
    48 #include "globals.h"
    49 
    49 
       
    50 #define EC_TX_RING_SIZE 2
       
    51 
    50 #ifdef EC_DEBUG_IF
    52 #ifdef EC_DEBUG_IF
    51 #include "debug.h"
    53 #include "debug.h"
    52 #endif
    54 #endif
    53 
    55 
    54 #ifdef EC_DEBUG_RING
    56 #ifdef EC_DEBUG_RING
    82     struct net_device *dev; /**< pointer to the assigned net_device */
    84     struct net_device *dev; /**< pointer to the assigned net_device */
    83     ec_pollfunc_t poll; /**< pointer to the device's poll function */
    85     ec_pollfunc_t poll; /**< pointer to the device's poll function */
    84     struct module *module; /**< pointer to the device's owning module */
    86     struct module *module; /**< pointer to the device's owning module */
    85     uint8_t open; /**< true, if the net_device has been opened */
    87     uint8_t open; /**< true, if the net_device has been opened */
    86     uint8_t link_state; /**< device link state */
    88     uint8_t link_state; /**< device link state */
    87     struct sk_buff *tx_skb; /**< transmit socket buffer */
    89     struct sk_buff *tx_skb[EC_TX_RING_SIZE]; /**< transmit skb ring */
    88     struct ethhdr *eth; /**< pointer to ethernet header in socket buffer */
    90     unsigned int tx_ring_index;
    89     cycles_t cycles_poll; /**< cycles of last poll */
    91     cycles_t cycles_poll; /**< cycles of last poll */
    90 #ifdef EC_DEBUG_RING
    92 #ifdef EC_DEBUG_RING
    91     struct timeval timeval_poll;
    93     struct timeval timeval_poll;
    92 #endif
    94 #endif
    93     unsigned long jiffies_poll; /**< jiffies of last poll */
    95     unsigned long jiffies_poll; /**< jiffies of last poll */