Don't blindly set IFF_DRV_OACTIVE when sge_encap() fails. If there

is no queued frame, IFF_DRV_OACTIVE would never be cleared.

Submitted by:	Nikolay Denev < ndenev <> gmail at com >
MFC after:	4 days
This commit is contained in:
Pyun YongHyeon 2010-06-04 17:11:33 +00:00
parent 3beefaed5e
commit 9def357406

View File

@ -1588,8 +1588,9 @@ sge_start_locked(struct ifnet *ifp)
if (m_head == NULL)
break;
if (sge_encap(sc, &m_head)) {
if (m_head != NULL)
IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
if (m_head == NULL)
break;
IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
break;
}