master/device.h
changeset 758 8fa6f825eb7d
parent 693 e341f1788608
child 883 4963e22a267a
equal deleted inserted replaced
757:6210c4260899 758:8fa6f825eb7d
    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 /**
       
    51  * Size of the transmit ring.
       
    52  * This memory ring is used to transmit frames. It is necessary to use
       
    53  * different memory regions, because otherwise the network device DMA could
       
    54  * send the same data twice, if it is called twice.
       
    55  */
    50 #define EC_TX_RING_SIZE 2
    56 #define EC_TX_RING_SIZE 2
    51 
    57 
    52 #ifdef EC_DEBUG_IF
    58 #ifdef EC_DEBUG_IF
    53 #include "debug.h"
    59 #include "debug.h"
    54 #endif
    60 #endif
    85     ec_pollfunc_t poll; /**< pointer to the device's poll function */
    91     ec_pollfunc_t poll; /**< pointer to the device's poll function */
    86     struct module *module; /**< pointer to the device's owning module */
    92     struct module *module; /**< pointer to the device's owning module */
    87     uint8_t open; /**< true, if the net_device has been opened */
    93     uint8_t open; /**< true, if the net_device has been opened */
    88     uint8_t link_state; /**< device link state */
    94     uint8_t link_state; /**< device link state */
    89     struct sk_buff *tx_skb[EC_TX_RING_SIZE]; /**< transmit skb ring */
    95     struct sk_buff *tx_skb[EC_TX_RING_SIZE]; /**< transmit skb ring */
    90     unsigned int tx_ring_index;
    96     unsigned int tx_ring_index; /**< last ring entry used to transmit */
    91     cycles_t cycles_poll; /**< cycles of last poll */
    97     cycles_t cycles_poll; /**< cycles of last poll */
    92 #ifdef EC_DEBUG_RING
    98 #ifdef EC_DEBUG_RING
    93     struct timeval timeval_poll;
    99     struct timeval timeval_poll;
    94 #endif
   100 #endif
    95     unsigned long jiffies_poll; /**< jiffies of last poll */
   101     unsigned long jiffies_poll; /**< jiffies of last poll */