[email protected]
[Top] [All Lists]

PERFORCE change 115111 for review

Subject: PERFORCE change 115111 for review
From: Sepherosa Ziehau
Date: Tue, 27 Feb 2007 10:42:34 GMT
http://perforce.freebsd.org/chv.cgi?CH=115111

Change 115111 by [email protected]_zealot:sam_wifi on 2007/02/27 10:42:17

        Convert RSSI to receive signal strength for ural(4)
        
        Reviewed by:    [email protected]
        Approved by:    [email protected]

Affected files ...

.. //depot/projects/wifi/sys/dev/usb/if_ural.c#15 edit
.. //depot/projects/wifi/sys/dev/usb/if_uralreg.h#3 edit

Differences ...

==== //depot/projects/wifi/sys/dev/usb/if_ural.c#15 (text+ko) ====

@@ -78,6 +78,10 @@
 #define DPRINTFN(n, x)
 #endif
 
+#define URAL_RSSI(rssi)                                        \
+       ((rssi) > (RAL_NOISE_FLOOR + RAL_RSSI_CORR) ?   \
+        ((rssi) - RAL_NOISE_FLOOR + RAL_RSSI_CORR) : 0)
+
 /* various supported device vendors/products */
 static const struct usb_devno ural_devs[] = {
        { USB_VENDOR_ASUS,              USB_PRODUCT_ASUS_WL167G },
@@ -986,7 +990,7 @@
                tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq);
                tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags);
                tap->wr_antenna = sc->rx_ant;
-               tap->wr_antsignal = desc->rssi;
+               tap->wr_antsignal = URAL_RSSI(desc->rssi);
 
                bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_rxtap_len, m);
        }
@@ -995,7 +999,7 @@
        ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh);
 
        /* send the frame to the 802.11 layer */
-       ieee80211_input(ic, m, ni, desc->rssi, -95/*XXX*/, 0);
+       ieee80211_input(ic, m, ni, URAL_RSSI(desc->rssi), RAL_NOISE_FLOOR, 0);
 
        /* node is no longer needed */
        ieee80211_free_node(ni);

==== //depot/projects/wifi/sys/dev/usb/if_uralreg.h#3 (text+ko) ====

@@ -17,6 +17,9 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define RAL_NOISE_FLOOR                -95
+#define RAL_RSSI_CORR          120
+
 #define RAL_RX_DESC_SIZE       (sizeof (struct ural_rx_desc))
 #define RAL_TX_DESC_SIZE       (sizeof (struct ural_tx_desc))
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/p4-projects
To unsubscribe, send any mail to "[email protected]"

<Prev in Thread] Current Thread [Next in Thread>
  • PERFORCE change 115111 for review, Sepherosa Ziehau <=