Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Mar 2008 23:26:54 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 137810 for review
Message-ID:  <200803152326.m2FNQsWf088383@repoman.freebsd.org>

index | next in thread | raw e-mail

http://perforce.freebsd.org/chv.cgi?CH=137810

Change 137810 by sam@sam_ebb on 2008/03/15 23:26:31

	increase tx buffer list

Affected files ...

.. //depot/projects/vap/sys/dev/usb/if_ural.c#13 edit
.. //depot/projects/vap/sys/dev/usb/if_uralvar.h#9 edit

Differences ...

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

@@ -621,7 +621,7 @@
 	struct ural_tx_data *data;
 	int i, error;
 
-	sc->tx_queued = 0;
+	sc->tx_queued = sc->tx_cur = 0;
 
 	for (i = 0; i < RAL_TX_LIST_COUNT; i++) {
 		data = &sc->tx_data[i];
@@ -1236,7 +1236,7 @@
 	usbd_status error;
 	int xferlen;
 
-	data = &sc->tx_data[0];
+	data = &sc->tx_data[sc->tx_cur];
 	desc = (struct ural_tx_desc *)data->buf;
 
 	tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)];
@@ -1310,6 +1310,7 @@
 	}
 
 	sc->tx_queued++;
+	sc->tx_cur = (sc->tx_cur + 1) % RAL_TX_LIST_COUNT;
 
 	return 0;
 }
@@ -1328,7 +1329,7 @@
 
 	KASSERT(params != NULL, ("no raw xmit params"));
 
-	data = &sc->tx_data[0];
+	data = &sc->tx_data[sc->tx_cur];
 	desc = (struct ural_tx_desc *)data->buf;
 
 	rate = params->ibp_rate0 & IEEE80211_RATE_VAL;
@@ -1387,6 +1388,7 @@
 	}
 
 	sc->tx_queued++;
+	sc->tx_cur = (sc->tx_cur + 1) % RAL_TX_LIST_COUNT;
 
 	return 0;
 }
@@ -1427,7 +1429,7 @@
 		wh = mtod(m0, struct ieee80211_frame *);
 	}
 
-	data = &sc->tx_data[0];
+	data = &sc->tx_data[sc->tx_cur];
 	desc = (struct ural_tx_desc *)data->buf;
 
 	data->m = m0;
@@ -1483,6 +1485,7 @@
 	}
 
 	sc->tx_queued++;
+	sc->tx_cur = (sc->tx_cur + 1) % RAL_TX_LIST_COUNT;
 
 	return 0;
 }
@@ -1498,7 +1501,7 @@
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m);
 		if (m == NULL)
 			break;
-		if (sc->tx_queued >= RAL_TX_LIST_COUNT) {
+		if (sc->tx_queued >= RAL_TX_LIST_COUNT-1) {
 			IFQ_DRV_PREPEND(&ifp->if_snd, m);
 			ifp->if_drv_flags |= IFF_DRV_OACTIVE;
 			break;

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

@@ -18,7 +18,7 @@
  */
 
 #define RAL_RX_LIST_COUNT	1
-#define RAL_TX_LIST_COUNT	1
+#define RAL_TX_LIST_COUNT	8
 
 #define URAL_SCAN_START         1
 #define URAL_SCAN_END           2
@@ -118,6 +118,7 @@
 	struct ural_rx_data		rx_data[RAL_RX_LIST_COUNT];
 	struct ural_tx_data		tx_data[RAL_TX_LIST_COUNT];
 	int				tx_queued;
+	int				tx_cur;
 
 	struct mtx			sc_mtx;
 


help

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