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 Fix merge errors



details:   https://anonhg.NetBSD.org/src-all/rev/4c3d4c50d509
branches:  trunk
changeset: 367145:4c3d4c50d509
user:      Martin Husemann <martin%NetBSD.org@localhost>
date:      Wed Feb 03 15:20:50 2021 +0100

description:
Fix merge errors

diffstat:

 sys/dev/usb/if_urtwn.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (53 lines):

diff -r 7cebac4f1620 -r 4c3d4c50d509 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Mon Jan 18 20:08:02 2021 +0100
+++ b/sys/dev/usb/if_urtwn.c    Wed Feb 03 15:20:50 2021 +0100
@@ -3225,7 +3225,7 @@
                m_print(m,"", printf);
                return -1;
        }
-        
+
        s = splnet();
        usbd_setup_xfer(data->xfer, data, data->buf, xferlen,
            USBD_FORCE_SHORT_XFER, URTWN_TX_TIMEOUT,
@@ -3319,14 +3319,14 @@
                        device_printf(sc->sc_dev,
                            "unable to find transmit node\n");
                        m_freem(m);
-                       if_statinc(vap->iv_ifp, if_oerrors);
+                       if (vap != NULL)
+                               if_statinc(vap->iv_ifp, if_oerrors);
                        urtwn_put_tx_data(sc, data);
                        m_freem(m);
                        continue;
                }
 
                bpf_mtap(vap->iv_ifp, m, BPF_D_OUT);
-
                if ((m = ieee80211_encap(vap, ni, m)) == NULL) {
                        ieee80211_free_node(ni);
                        device_printf(sc->sc_dev,
@@ -3344,6 +3344,7 @@
                            "unable to transmit packet\n");
                        if (vap != NULL)
                                if_statinc(vap->iv_ifp, if_oerrors);
+                       urtwn_put_tx_data(sc, data);
                        continue;
                }
                m_freem(m);
@@ -3651,12 +3652,13 @@
        error = urtwn_tx(sc, m, ni, data);
        if (error != 0) {
                if_statinc(vap->iv_ifp, if_oerrors);
+               urtwn_put_tx_data(sc, data);
+               m_freem(m);
+               ieee80211_free_node(ni);
        } else {
                sc->tx_timer = 5;
                vap->iv_ifp->if_timer = 1;
        }
-       m_freem(m);
-       ieee80211_free_node(ni);
        return error;
 }
 



Home | Main Index | Thread Index | Old Index