Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jan 2009 03:42:10 GMT
From:      Weongyo Jeong <weongyo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 155797 for review
Message-ID:  <200901080342.n083gARw026433@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=155797

Change 155797 by weongyo@weongyo_ws on 2009/01/08 03:41:18

	add a knob to control the preamble mode.

Affected files ...

.. //depot/projects/vap/sys/dev/usb/if_urtw.c#13 edit

Differences ...

==== //depot/projects/vap/sys/dev/usb/if_urtw.c#13 (text+ko) ====

@@ -63,8 +63,8 @@
 #include <dev/usb/if_urtwreg.h>
 #include <dev/usb/if_urtwvar.h>
 
+SYSCTL_NODE(_hw_usb, OID_AUTO, urtw, CTLFLAG_RW, 0, "USB Realtek 8187L");
 #ifdef URTW_DEBUG
-SYSCTL_NODE(_hw_usb, OID_AUTO, urtw, CTLFLAG_RW, 0, "USB Realtek 8187L");
 int urtw_debug = 0;
 SYSCTL_INT(_hw_usb_urtw, OID_AUTO, debug, CTLFLAG_RW, &urtw_debug, 0,
     "control debugging printfs");
@@ -88,6 +88,10 @@
 	(void) sc;						\
 } while (0)
 #endif
+int urtw_preamble_mode = URTW_PREAMBLE_MODE_LONG;
+SYSCTL_INT(_hw_usb_urtw, OID_AUTO, preamble_mode, CTLFLAG_RW,
+    &urtw_preamble_mode, 0, "set the preable mode (long or short)");
+TUNABLE_INT("hw.usb.urtw.preamble_mode", &urtw_preamble_mode);
 
 /* recognized device vendors/products */
 static const struct usb_devno urtw_devs[] = {
@@ -508,12 +512,7 @@
 	sc->sc_rts_retry = URTW_DEFAULT_RTS_RETRY;
 	sc->sc_tx_retry = URTW_DEFAULT_TX_RETRY;
 	sc->sc_currate = 3;
-	/*
-	 * XXX there's no points to set this variable to
-	 * URTW_PREAMBLE_MODE_SHORT so we need to set it properly to increase
-	 * the throughput perfomance at high data rates.
-	 */
-	sc->sc_preamble_mode = URTW_PREAMBLE_MODE_LONG;
+	sc->sc_preamble_mode = urtw_preamble_mode;
 
 	ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211);
 	if (ifp == NULL) {
@@ -2385,7 +2384,6 @@
 	data->buf[1] = (m0->m_pkthdr.len & 0x0f00) >> 8;
 	data->buf[1] |= (1 << 7);
 
-	/* XXX sc_preamble_mode is always URTW_PREAMBLE_MODE_LONG.  */
 	if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) &&
 	    (ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_PREAMBLE) &&
 	    (sc->sc_preamble_mode == URTW_PREAMBLE_MODE_SHORT) &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901080342.n083gARw026433>