[Bug 233949] [rtwn] if_rtwn packet loss 10-25%

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Feb 4 21:07:03 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233949

--- Comment #10 from mr_beaner_2003 at yahoo.com ---
It seems there are some data type mismatches, which may be resulting in
undefined behavior. This is probably more appropriate, after reviewing the data
structures...
Index: /usr/src/sys/dev/rtwn/rtl8192c/r92c_rx.c
===================================================================
--- /usr/src/sys/dev/rtwn/rtl8192c/r92c_rx.c    (revision 343552)
+++ /usr/src/sys/dev/rtwn/rtl8192c/r92c_rx.c    (working copy)
@@ -83,10 +83,10 @@
 r92c_get_rssi_ofdm(struct rtwn_softc *sc, void *physt)
 {
        struct r92c_rx_phystat *phy = (struct r92c_rx_phystat *)physt;
-       int rssi;
+       uint8_t rssi = phy->pwdb_all;

        /* Get average RSSI. */
-       rssi = ((phy->pwdb_all >> 1) & 0x7f) - 110;
+       rssi = ((rssi >> 1) & 0x7f) - 110;

        return (rssi);
 }

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-wireless mailing list