master/ethernet.c
changeset 1581 e51cf2af3ff9
parent 1561 89f6cd5b90ff
parent 1579 326d47aa986c
child 1907 dd276ae226b4
equal deleted inserted replaced
1578:30f065ea5271 1581:e51cf2af3ff9
    32    Ethernet over EtherCAT (EoE).
    32    Ethernet over EtherCAT (EoE).
    33 */
    33 */
    34 
    34 
    35 /*****************************************************************************/
    35 /*****************************************************************************/
    36 
    36 
       
    37 #include <linux/version.h>
    37 #include <linux/netdevice.h>
    38 #include <linux/netdevice.h>
    38 #include <linux/etherdevice.h>
    39 #include <linux/etherdevice.h>
    39 
    40 
    40 #include "globals.h"
    41 #include "globals.h"
    41 #include "master.h"
    42 #include "master.h"
   116     INIT_LIST_HEAD(&eoe->tx_queue);
   117     INIT_LIST_HEAD(&eoe->tx_queue);
   117     eoe->tx_frame = NULL;
   118     eoe->tx_frame = NULL;
   118     eoe->tx_queue_active = 0;
   119     eoe->tx_queue_active = 0;
   119     eoe->tx_queue_size = EC_EOE_TX_QUEUE_SIZE;
   120     eoe->tx_queue_size = EC_EOE_TX_QUEUE_SIZE;
   120     eoe->tx_queued_frames = 0;
   121     eoe->tx_queued_frames = 0;
   121     init_MUTEX(&eoe->tx_queue_sem);
   122 
       
   123     sema_init(&eoe->tx_queue_sem, 1);
   122     eoe->tx_frame_number = 0xFF;
   124     eoe->tx_frame_number = 0xFF;
   123     memset(&eoe->stats, 0, sizeof(struct net_device_stats));
   125     memset(&eoe->stats, 0, sizeof(struct net_device_stats));
   124 
   126 
   125     eoe->rx_counter = 0;
   127     eoe->rx_counter = 0;
   126     eoe->tx_counter = 0;
   128     eoe->tx_counter = 0;