Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/dev/pci Use ieee80211_tx_complete() for error case...



details:   https://anonhg.NetBSD.org/src-all/rev/0b61d30fe3ff
branches:  trunk
changeset: 377003:0b61d30fe3ff
user:      Martin Husemann <martin%NetBSD.org@localhost>
date:      Sat Feb 13 18:46:46 2021 +0100

description:
Use ieee80211_tx_complete() for error cases too.

diffstat:

 sys/dev/pci/if_iwn.c |  13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diffs (35 lines):

diff -r 2e545dbf7b6e -r 0b61d30fe3ff sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c      Sat Feb 13 18:40:55 2021 +0100
+++ b/sys/dev/pci/if_iwn.c      Sat Feb 13 18:46:46 2021 +0100
@@ -3388,19 +3388,14 @@ iwn_raw_xmit(struct ieee80211_node *ni ,
         bpf_mtap3(vap->iv_rawbpf, m, BPF_D_OUT);
 
        if (iwn_tx(vap, m, ni, ac) != 0) {
-               ieee80211_free_node(ni);
+               ieee80211_tx_complete(ni, m, 1);
                if_statinc(ifp, if_oerrors);
-                       return ENXIO;
+               return ENXIO;
        }
 
        sc->sc_tx_timer = 5;
        ifp->if_timer = 1;
-#if 0
-
-       m_freem(m);
-       ieee80211_free_node(ni);
-
-#endif
+
        return 0;
 }
 
@@ -3764,7 +3759,7 @@ iwn_start(struct ifnet *ifp)
                //bpf_mtap3(ic->ic_rawbpf, m, BPF_D_OUT);
 
                if (iwn_tx(vap, m, ni, ac) != 0) {
-                       ieee80211_free_node(ni);
+                       ieee80211_tx_complete(ni, m, 1);
                        if_statinc(ifp, if_oerrors);
                        continue;
                }



Home | Main Index | Thread Index | Old Index