summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-07-03 13:08:56 +0000
committerphk <phk@FreeBSD.org>2000-07-03 13:08:56 +0000
commit04f50515a9f8e77ac4b3d88c105b5085a1721f58 (patch)
tree9ce77fd3cbd428e160689e3af7c86afd0da90292
parent32127fca4e7017d38be85bfd3630d6fb5abbcf2c (diff)
downloadFreeBSD-src-04f50515a9f8e77ac4b3d88c105b5085a1721f58.zip
FreeBSD-src-04f50515a9f8e77ac4b3d88c105b5085a1721f58.tar.gz
Account for packets we clean out when we disconnect.
-rw-r--r--sys/pci/if_mn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/pci/if_mn.c b/sys/pci/if_mn.c
index 0e0bb4a..be9c468 100644
--- a/sys/pci/if_mn.c
+++ b/sys/pci/if_mn.c
@@ -706,8 +706,10 @@ ngmn_disconnect(hook_p hook)
/* Free all transmit descriptors and mbufs */
for (dp = sc->ch[chan]->x1; dp ; dp = dp2) {
- if (dp->m)
+ if (dp->m) {
+ sc->ch[chan]->tx_pending -= dp->m->m_pkthdr.len;
m_freem(dp->m);
+ }
sc->ch[chan]->x1 = dp2 = dp->vnext;
mn_free_desc(dp);
}
OpenPOWER on IntegriCloud