Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jan 2009 02:51:16 GMT
From:      Weongyo Jeong <weongyo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 155794 for review
Message-ID:  <200901080251.n082pG6n021672@repoman.freebsd.org>

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

Change 155794 by weongyo@weongyo_ws on 2009/01/08 02:51:09

	some comments and remove magic values to handle preamble modes.

Affected files ...

.. //depot/projects/vap/sys/dev/usb/if_urtw.c#11 edit
.. //depot/projects/vap/sys/dev/usb/if_urtwvar.h#3 edit

Differences ...

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

@@ -508,8 +508,11 @@
 	sc->sc_rts_retry = URTW_DEFAULT_RTS_RETRY;
 	sc->sc_tx_retry = URTW_DEFAULT_TX_RETRY;
 	sc->sc_currate = 3;
-	/* XXX for what?  */
-	sc->sc_preamble_mode = 2;
+	/*
+	 * XXX there's no points to set this variable to
+	 * URTW_PREAMBLE_MODE_SHORT so we need to set it properly.
+	 */
+	sc->sc_preamble_mode = URTW_PREAMBLE_MODE_LONG;
 
 	ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211);
 	if (ifp == NULL) {
@@ -2381,10 +2384,11 @@
 	data->buf[1] = (m0->m_pkthdr.len & 0x0f00) >> 8;
 	data->buf[1] |= (1 << 7);
 
-	/* XXX sc_preamble_mode is always 2.  */
+	/* 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 == 1) && (sc->sc_currate != 0))
+	    (sc->sc_preamble_mode == URTW_PREAMBLE_MODE_SHORT) &&
+	    (sc->sc_currate != 0))
 		data->buf[2] |= 1;
 	if ((m0->m_pkthdr.len > vap->iv_rtsthreshold) &&
 	    prior == URTW_PRIORITY_LOW)

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

@@ -129,6 +129,8 @@
 	uint8_t				sc_rts_retry;
 	uint8_t				sc_tx_retry;
 	uint8_t				sc_preamble_mode;
+#define	URTW_PREAMBLE_MODE_SHORT	1
+#define	URTW_PREAMBLE_MODE_LONG		2
 	struct callout			sc_watchdog_ch;
 	int				sc_txtimer;
 	int				sc_currate;



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