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/d316f4dd60e1
branches:  trunk
changeset: 374964:d316f4dd60e1
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 e474b4d67bc5 -r d316f4dd60e1 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
@@ -3342,6 +3342,14 @@ iwn_raw_xmit(struct ieee80211_node *ni ,
                        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);
@@ -3349,6 +3357,7 @@ iwn_raw_xmit(struct ieee80211_node *ni ,
                if_statinc(ifp, if_oerrors);
                        return ENOBUFS;
        }
+#endif
 
        /* No QoS encapsulation for EAPOL frames. */
        ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
@@ -3356,16 +3365,9 @@ iwn_raw_xmit(struct ieee80211_node *ni ,
 
         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;
        }
 
@@ -3720,6 +3722,14 @@ iwn_start(struct ifnet *ifp)
                        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);
@@ -3727,6 +3737,7 @@ iwn_start(struct ifnet *ifp)
                        if_statinc(ifp, if_oerrors);
                        continue;
                }
+#endif
 
                /* No QoS encapsulation for EAPOL frames. */
                ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
@@ -3734,12 +3745,6 @@ iwn_start(struct ifnet *ifp)
 
                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