PERFORCE change 143092 for review

Hans Petter Selasky hselasky at FreeBSD.org
Sat Jun 7 22:42:26 UTC 2008


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

Change 143092 by hselasky at hselasky_laptop001 on 2008/06/07 22:42:15

	
	Some small improvements related to the previous IFC.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/if_ural.c#55 edit

Differences ...

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

@@ -2416,7 +2416,12 @@
 	struct ieee80211_node *ni;
 	struct mbuf *m;
 
-	while (sc->sc_tx_queue.ifq_len < IFQ_MAXLEN) {
+	/*
+	 * We only fill up half of the queue with data frames. The rest is
+	 * reserved for other kinds of frames.
+	 */
+
+	while (sc->sc_tx_queue.ifq_len < (IFQ_MAXLEN / 2)) {
 
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m);
 		if (m == NULL)
@@ -2719,7 +2724,6 @@
 	struct ural_softc *sc = ifp->if_softc;
 
 	mtx_lock(&(sc->sc_mtx));
-
 	if (params == NULL) {
 		/*
 		 * Legacy path; interpret frame contents to decide
@@ -2733,13 +2737,6 @@
 		 */
 		ural_tx_raw(sc, m, ni, params);
 	}
-	m = NULL;
 	mtx_unlock(&(sc->sc_mtx));
-
-	if (m) {
-		m_freem(m);
-		ieee80211_free_node(ni);
-		return (ENETDOWN);
-	}
 	return (0);
 }


More information about the p4-projects mailing list