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 No need to call encap and freinds as the a...



details:   https://anonhg.NetBSD.org/src-all/rev/320779d0ee56
branches:  trunk
changeset: 948973:320779d0ee56
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Sat Jun 20 08:35:14 2020 +1000

description:
No need to call encap and freinds as the are called in the proceeding
input/output functions of the new 80211 stack.

diffstat:

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

diffs (79 lines):

diff -r fcd97898ae7c -r 320779d0ee56 sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c      Sat Jun 20 08:33:17 2020 +1000
+++ b/sys/dev/pci/if_iwn.c      Sat Jun 20 08:35:14 2020 +1000
@@ -3269,6 +3269,14 @@
                        return EIO;
        }
        eh = mtod(m, struct ether_header *);
+
+#if 0
+       if ((m = ieee80211_encap(vap, ni, m)) == NULL) {
+               ieee80211_free_node(ni);
+               if_statinc(ifp, if_oerrors);
+               return ENOMEM;
+       }
+
        /* classify mbuf so we can find which tx ring to use */
        if (ieee80211_classify(ni, m) != 0) {
                m_freem(m);
@@ -3276,6 +3284,7 @@
                if_statinc(ifp, if_oerrors);
                        return ENOBUFS;
        }
+#endif
 
        /* No QoS encapsulation for EAPOL frames. */
        ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
@@ -3283,16 +3292,9 @@
 
         bpf_mtap3(vap->iv_rawbpf, m, BPF_D_OUT);
 
-       if ((m = ieee80211_encap(vap, ni, m)) == NULL) {
        if (iwn_tx(vap, m, ni, ac) != 0) {
                ieee80211_free_node(ni);
                if_statinc(ifp, if_oerrors);
-               return ENOMEM;
-       }
-
-
-               ieee80211_free_node(ni);
-               if_statinc(ifp, if_oerrors);
                        return ENXIO;
        }
 
@@ -3647,6 +3649,14 @@
                        if_statinc(ifp, if_oerrors);
                        continue;
                }
+
+#if 0
+               if ((m = ieee80211_encap(vap, ni, m)) == NULL) {
+                       ieee80211_free_node(ni);
+                       if_statinc(ifp, if_oerrors);
+                       continue;
+               }
+
                /* classify mbuf so we can find which tx ring to use */
                if (ieee80211_classify(ni, m) != 0) {
                        m_freem(m);
@@ -3654,6 +3664,7 @@
                        if_statinc(ifp, if_oerrors);
                        continue;
                }
+#endif
 
                /* No QoS encapsulation for EAPOL frames. */
                ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
@@ -3661,12 +3672,6 @@
 
                if (sc->sc_beacon_wait == 0)
                        bpf_mtap(ifp, m, BPF_D_OUT);
-
-               if ((m = ieee80211_encap(vap, ni, m)) == NULL) {
-                       ieee80211_free_node(ni);
-                       if_statinc(ifp, if_oerrors);
-                       continue;
-               }
 sendit:
                if (sc->sc_beacon_wait)
                        continue;



Home | Main Index | Thread Index | Old Index