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 Use ieee80211_rx_enqueue() for incoming tr...



details:   https://anonhg.NetBSD.org/src-all/rev/ad88512c27cc
branches:  trunk
changeset: 371180:ad88512c27cc
user:      Martin Husemann <martin%NetBSD.org@localhost>
date:      Tue Sep 20 20:31:04 2022 +0200

description:
Use ieee80211_rx_enqueue() for incoming traffic.

diffstat:

 sys/dev/usb/usbwifi.c |  18 +-----------------
 1 files changed, 1 insertions(+), 17 deletions(-)

diffs (35 lines):

diff -r c134a09e4247 -r ad88512c27cc sys/dev/usb/usbwifi.c
--- a/sys/dev/usb/usbwifi.c     Tue Sep 20 20:30:06 2022 +0200
+++ b/sys/dev/usb/usbwifi.c     Tue Sep 20 20:31:04 2022 +0200
@@ -236,8 +236,6 @@
        struct usbwifi_private * const uwp __unused = uw->uw_pri;
        struct mbuf *m;
        struct ieee80211com *ic = &uw->uw_ic;
-       struct ieee80211_frame *wh;
-       struct ieee80211_node *ni;
 
        USBWIFIHIST_CALLARGSN(5, "%jd: enter: len=%ju csf %#jx mbf %#jx",
            uwp->uwp_number, buflen, csum_flags, mbuf_flags);
@@ -255,21 +253,7 @@
        m->m_pkthdr.csum_data = csum_data;
        m->m_flags |= mbuf_flags;
        memcpy(mtod(m, uint8_t *), buf, buflen);
-
-       /* push the packet up */
-       wh = (struct ieee80211_frame *)buf;
-       ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh);
-       if (ni != NULL) {
-               if (ni->ni_vap == NULL) {
-                       ieee80211_free_node(ni);
-                       return;
-               }
-               ieee80211_input(ni, m, rssi, 0);
-               /* Node is no longer needed. */
-               ieee80211_free_node(ni);
-       } else {
-               ieee80211_input_all(ic, m, rssi, 0);
-       }
+       ieee80211_rx_enqueue(ic, m, rssi);
 }
 
 /*



Home | Main Index | Thread Index | Old Index