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/9eeeef820efb
branches:  trunk
changeset: 951468:9eeeef820efb
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 |  30 ++++++++----------------------
 1 files changed, 8 insertions(+), 22 deletions(-)

diffs (76 lines):

diff -r 2e9594e1d6c1 -r 9eeeef820efb 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
@@ -3043,7 +3043,7 @@
 
        if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
                k = ieee80211_crypto_encap(ni, m);
-               if (k == NULL)
+               if (k == NULL) {
                        urtwn_put_tx_data(sc, data);
                        return ENOBUFS;
                }
@@ -3222,7 +3222,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,
@@ -3304,35 +3304,20 @@
 
                if (m->m_len < (int)sizeof(*eh) &&
                    (m = m_pullup(m, sizeof(*eh))) == NULL) {
-                       if_statinc(vap->iv_ifp, if_oerrors);
-                       urtwn_put_tx_data(sc, data);
-                       continue;
-               }
-               eh = mtod(m, struct ether_header *);
-               ni = ieee80211_find_txnode(vap, eh->ether_dhost);
-               if (ni == NULL) {
-                       m_freem(m);
-                       printf("ERROR5\n");
-                       if_statinc(vap->iv_ifp, if_oerrors);
+                       if (vap != NULL)
+                               if_statinc(vap->iv_ifp, if_oerrors);
                        urtwn_put_tx_data(sc, data);
                        continue;
                }
 
                bpf_mtap(vap->iv_ifp, m, BPF_D_OUT);
 
-               if ((m = ieee80211_encap(ic, m, ni)) == NULL) {
-                       ieee80211_free_node(ni);
-                       printf("ERROR4\n");
-                       if_statinc(ifp, if_oerrors);
-                       urtwn_put_tx_data(sc, data);
-                       continue;
-               }
-
                if (urtwn_tx(sc, m, ni, data) != 0) {
                        m_freem(m);
                        ieee80211_free_node(ni);
                        if (vap != NULL)
                                if_statinc(vap->iv_ifp, if_oerrors);
+                       urtwn_put_tx_data(sc, data);
                        continue;
                }
                m_freem(m);
@@ -3640,12 +3625,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