Send frames only when there is a valid link and driver is running

as well as controller has enough free TX descriptors.
Remove check for number of queued frames before attempting to
transmit. I guess it was added to allow draining queued frames
even if there is no link. I'm under the impression this type of
check should be done in upper layer. No other drivers in tree do
that.
This commit is contained in:
Pyun YongHyeon 2011-02-19 00:00:32 +00:00
parent a5db292f7b
commit 76d40c8593
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218830

View file

@ -3375,10 +3375,8 @@ dc_start_locked(struct ifnet *ifp)
DC_LOCK_ASSERT(sc);
if (!sc->dc_link && ifp->if_snd.ifq_len < 10)
return;
if (ifp->if_drv_flags & IFF_DRV_OACTIVE)
if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
IFF_DRV_RUNNING || sc->dc_link == 0)
return;
idx = sc->dc_cdata.dc_tx_first = sc->dc_cdata.dc_tx_prod;