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 Minor cosmetics, fix received packet lengt...



details:   https://anonhg.NetBSD.org/src-all/rev/e6dccfa6bb58
branches:  trunk
changeset: 1027534:e6dccfa6bb58
user:      Martin Husemann <martin%NetBSD.org@localhost>
date:      Sun Nov 14 13:59:58 2021 +0100

description:
Minor cosmetics, fix received packet length and rssi.

diffstat:

 sys/dev/usb/if_run.c |  34 +---------------------------------
 1 files changed, 1 insertions(+), 33 deletions(-)

diffs (70 lines):

diff -r 64c7df26af94 -r e6dccfa6bb58 sys/dev/usb/if_run.c
--- a/sys/dev/usb/if_run.c      Sat Nov 13 20:21:23 2021 +0100
+++ b/sys/dev/usb/if_run.c      Sun Nov 14 13:59:58 2021 +0100
@@ -802,21 +802,6 @@
        return 0;
 }
 
-/* XXX replace with usbwifi activate? */
-// static int
-// run_activate(device_t self, enum devact act)
-// {
-//     struct run_softc *sc = device_private(self);
-
-//     switch (act) {
-//     case DVACT_DEACTIVATE:
-//             if_deactivate(sc->sc_uw.uw_ic.ic_ifp);
-//             return 0;
-//     default:
-//             return EOPNOTSUPP;
-//     }
-// }
-
 static int __noinline
 run_load_microcode(struct run_softc *sc)
 {
@@ -2253,9 +2238,6 @@
        uint32_t flags;
        uint16_t len, rxwisize, phy;
        uint8_t ant, rssi;
-#ifdef RUN_HWCRYPTO
-       int decrypted = 0;
-#endif
 
        DPRINTFN(5, ("%s: %s: buf %p dmalen %d\n",
            device_xname(sc->sc_uw.uw_dev), __func__, buf, dmalen));
@@ -2296,14 +2278,11 @@
                wh = (struct ieee80211_frame *)((uint8_t *)wh + 2);
        }
 
-/*
 #ifdef RUN_HWCRYPTO
        if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
                wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
-               decrypted = 1;
        }
 #endif
-*/
 
        ant = run_maxrssi_chain(sc, rxwi);
        rssi = rxwi->rssi[ant];
@@ -2345,18 +2324,7 @@
                }
        }
 
-    /* XXX remove this? */
-       // /*
-       //  * In HostAP mode, ieee80211_input() will enqueue packets in if_snd
-       //  * without calling if_start().
-       //  */
-       // if (!IFQ_IS_EMPTY(&if p->if_snd) && !(if p->if_flags & IFF_OACTIVE))
-       //      run_start(if p);
-    
-       /* XXX Should this add 90 to rssi? */
-       usbwifi_enqueue(&sc->sc_uw, (uint8_t *) wh,
-           dmalen, rssi+90, 0, 0, 0);
-
+       usbwifi_enqueue(&sc->sc_uw, (uint8_t *)wh, len, rssi, 0, 0, 0);
 }
 
 static void



Home | Main Index | Thread Index | Old Index