From owner-p4-projects@FreeBSD.ORG Thu Jan 8 03:42:11 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3FDDA1065678; Thu, 8 Jan 2009 03:42:11 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFF5B1065676 for ; Thu, 8 Jan 2009 03:42:10 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DE6BC8FC19 for ; Thu, 8 Jan 2009 03:42:10 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n083gAKn026435 for ; Thu, 8 Jan 2009 03:42:10 GMT (envelope-from weongyo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n083gARw026433 for perforce@freebsd.org; Thu, 8 Jan 2009 03:42:10 GMT (envelope-from weongyo@FreeBSD.org) Date: Thu, 8 Jan 2009 03:42:10 GMT Message-Id: <200901080342.n083gARw026433@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to weongyo@FreeBSD.org using -f From: Weongyo Jeong To: Perforce Change Reviews Cc: Subject: PERFORCE change 155797 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 03:42:12 -0000 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 #include +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) &&