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/7ae3e441a2cc
branches:  trunk
changeset: 986632:7ae3e441a2cc
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 0be481c644ec -r 7ae3e441a2cc 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
@@ -3224,7 +3224,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,
@@ -3318,14 +3318,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,
@@ -3343,6 +3343,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);
@@ -3650,12 +3651,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