master/ethernet.c
changeset 1980 a89e2bedf004
parent 1909 ea3eb4c74c1b
child 1921 d9cf40facbc4
equal deleted inserted replaced
1979:2c22f3bea8ba 1980:a89e2bedf004
    81 struct net_device_stats *ec_eoedev_stats(struct net_device *);
    81 struct net_device_stats *ec_eoedev_stats(struct net_device *);
    82 
    82 
    83 /*****************************************************************************/
    83 /*****************************************************************************/
    84 
    84 
    85 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
    85 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
       
    86 /** Device operations for EoE interfaces.
       
    87  */
    86 static const struct net_device_ops ec_eoedev_ops = {
    88 static const struct net_device_ops ec_eoedev_ops = {
    87     .ndo_open = ec_eoedev_open,
    89     .ndo_open = ec_eoedev_open,
    88     .ndo_stop = ec_eoedev_stop,
    90     .ndo_stop = ec_eoedev_stop,
    89     .ndo_start_xmit = ec_eoedev_tx,
    91     .ndo_start_xmit = ec_eoedev_tx,
    90     .ndo_get_stats = ec_eoedev_stats,
    92     .ndo_get_stats = ec_eoedev_stats,
   132     eoe->rx_idle = 1;
   134     eoe->rx_idle = 1;
   133     eoe->tx_idle = 1;
   135     eoe->tx_idle = 1;
   134 
   136 
   135     /* device name eoe<MASTER>[as]<SLAVE>, because networking scripts don't
   137     /* device name eoe<MASTER>[as]<SLAVE>, because networking scripts don't
   136      * like hyphens etc. in interface names. */
   138      * like hyphens etc. in interface names. */
   137     if (slave->sii.alias) {
   139     if (slave->effective_alias) {
   138         snprintf(name, EC_DATAGRAM_NAME_SIZE,
   140         snprintf(name, EC_DATAGRAM_NAME_SIZE,
   139                 "eoe%ua%u", slave->master->index, slave->sii.alias);
   141                 "eoe%ua%u", slave->master->index, slave->effective_alias);
   140     } else {
   142     } else {
   141         snprintf(name, EC_DATAGRAM_NAME_SIZE,
   143         snprintf(name, EC_DATAGRAM_NAME_SIZE,
   142                 "eoe%us%u", slave->master->index, slave->ring_position);
   144                 "eoe%us%u", slave->master->index, slave->ring_position);
   143     }
   145     }
   144 
   146