Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/dev/usb Use ieee80211_tx_complete() for error case...
details: https://anonhg.NetBSD.org/src-all/rev/690f6cf9665e
branches: trunk
changeset: 989839:690f6cf9665e
user: Martin Husemann <martin%NetBSD.org@localhost>
date: Sat Feb 13 18:39:41 2021 +0100
description:
Use ieee80211_tx_complete() for error cases too.
diffstat:
sys/dev/usb/if_urtwn.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diffs (52 lines):
diff -r 38fff2419618 -r 690f6cf9665e sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Fri Feb 12 20:13:04 2021 +0100
+++ b/sys/dev/usb/if_urtwn.c Sat Feb 13 18:39:41 2021 +0100
@@ -2999,7 +2999,8 @@
device_xname(sc->sc_dev), __func__, status));
if (data->m) {
- ieee80211_tx_complete(data->ni, data->m, 0);
+ ieee80211_tx_complete(data->ni, data->m,
+ status != USBD_NORMAL_COMPLETION);
data->m = NULL;
data->ni = NULL;
}
@@ -3318,7 +3319,6 @@
device_printf(sc->sc_dev, "m_pullup failed\n");
if_statinc(vap->iv_ifp, if_oerrors);
urtwn_put_tx_data(sc, data);
- m_freem(m);
continue;
}
eh = mtod(m, struct ether_header *);
@@ -3339,17 +3339,16 @@
ieee80211_free_node(ni);
device_printf(sc->sc_dev,
"unable to encapsulate packet\n");
+ ieee80211_tx_complete(ni, m, 1);
if_statinc(vap->iv_ifp, if_oerrors);
urtwn_put_tx_data(sc, data);
- m_freem(m);
continue;
}
if (urtwn_tx(sc, m, ni, data) != 0) {
- m_freem(m);
- ieee80211_free_node(ni);
device_printf(sc->sc_dev,
"unable to transmit packet\n");
+ ieee80211_tx_complete(ni, m, 1);
if (vap != NULL)
if_statinc(vap->iv_ifp, if_oerrors);
urtwn_put_tx_data(sc, data);
@@ -3658,9 +3657,8 @@
error = urtwn_tx(sc, m, ni, data);
if (error != 0) {
if_statinc(vap->iv_ifp, if_oerrors);
+ ieee80211_tx_complete(ni, m, 1);
urtwn_put_tx_data(sc, data);
- m_freem(m);
- ieee80211_free_node(ni);
} else {
sc->tx_timer = 5;
vap->iv_ifp->if_timer = 1;
Home |
Main Index |
Thread Index |
Old Index