master/ethernet.c
branchstable-1.1
changeset 1732 1cc865ba17c2
parent 1731 60b2aad9d40b
child 1739 5fcbd29151d2
--- a/master/ethernet.c	Fri Oct 13 10:07:10 2006 +0000
+++ b/master/ethernet.c	Tue Nov 07 12:13:30 2006 +0000
@@ -627,10 +627,9 @@
     eoe->tx_queue_active = 1;
     EC_INFO("%s opened.\n", dev->name);
     if (!eoe->slave)
-        EC_WARN("device %s is not coupled to any EoE slave!\n", dev->name);
+        EC_WARN("Device %s is not coupled to any EoE slave!\n", dev->name);
     else {
-        eoe->slave->requested_state = EC_SLAVE_STATE_OP;
-        eoe->slave->error_flag = 0;
+        ec_slave_request_state(eoe->slave, EC_SLAVE_STATE_OP);
     }
     return 0;
 }
@@ -650,10 +649,9 @@
     ec_eoe_flush(eoe);
     EC_INFO("%s stopped.\n", dev->name);
     if (!eoe->slave)
-        EC_WARN("device %s is not coupled to any EoE slave!\n", dev->name);
+        EC_WARN("Device %s is not coupled to any EoE slave!\n", dev->name);
     else {
-        eoe->slave->requested_state = EC_SLAVE_STATE_INIT;
-        eoe->slave->error_flag = 0;
+        ec_slave_request_state(eoe->slave, EC_SLAVE_STATE_PREOP);
     }
     return 0;
 }