drivers/net/encx24j600.c: Correct setting of ifstate

The ifstate is already set in
  enc_ifup -> enc_reset -> enc_linkstatus

The ifstate after this call is either ENCSTATE_RUNNING or ENCSTATE_UP

If ifstate is ENCSTATE_RUNNING, it would be wrong to set it to ENCSTATE_UP;
this would lead to enc_txavail never invoking the driver callback, causing
very long latencies in sending.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
Jukka Laitinen
2021-01-29 13:28:12 +02:00
committed by Xiang Xiao
parent 5bcdeb0851
commit b8dc64ffed
+1 -4
View File
@@ -2272,11 +2272,8 @@ static int enc_ifup(struct net_driver_s *dev)
wd_start(&priv->txpoll, ENC_WDDELAY,
enc_polltimer, (wdparm_t)priv);
/* Mark the interface up and enable the Ethernet interrupt at the
* controller
*/
/* Enable the Ethernet interrupt at the controller */
priv->ifstate = ENCSTATE_UP;
priv->lower->enable(priv->lower);
}