Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Mar 2005 05:23:12 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 74082 for review
Message-ID:  <200503300523.j2U5NC8j005046@repoman.freebsd.org>

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

Change 74082 by sam@sam_ebb on 2005/03/30 05:22:12

	IFC timeout fix
	silence compiler complaint

Affected files ...

.. //depot/projects/wifi/sys/dev/wi/if_wi.c#13 edit

Differences ...

==== //depot/projects/wifi/sys/dev/wi/if_wi.c#13 (text+ko) ====

@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/wi/if_wi.c,v 1.175 2005/01/06 01:43:33 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/wi/if_wi.c,v 1.177 2005/03/26 23:43:54 sam Exp $");
 
 #define WI_HERMES_AUTOINC_WAR	/* Work around data write autoinc bug. */
 #define WI_HERMES_STATS_WAR	/* Work around stats counter bug. */
@@ -688,6 +688,9 @@
 			wi_write_val(sc, WI_RID_PORTTYPE, WI_PORTTYPE_ADHOC);
 		wi_cmd(sc, WI_CMD_DEBUG | (WI_TEST_MONITOR << 8), 0, 0, 0);
 		break;
+	default:
+		/* XXX WDS */
+		break;
 	}
 
 	/* Intersil interprets this RID as joining ESS even in IBSS mode */
@@ -962,6 +965,7 @@
 			if (k == NULL) {
 				if (ni != NULL)
 					ieee80211_free_node(ni);
+				m_freem(m0);
 				continue;
 			}
 			frmhdr.wi_tx_ctl |= htole16(WI_TXCNTL_NOCRYPT);
@@ -1291,6 +1295,11 @@
 	case IEEE80211_M_MONITOR:
 		imr->ifm_active |= IFM_IEEE80211_MONITOR;
 		break;
+	case IEEE80211_M_WDS:
+#if 0
+		imr->ifm_active |= IFM_IEEE80211_WDS;
+#endif
+		break;
 	}
 }
 
@@ -2618,12 +2627,12 @@
 	for (i = 0; i < WI_TIMEOUT; i++) {
 		if (CSR_READ_2(sc, WI_EVENT_STAT) & WI_EV_ALLOC)
 			break;
-		if (i == WI_TIMEOUT) {
-			device_printf(sc->sc_dev, "timeout in alloc\n");
-			return ETIMEDOUT;
-		}
 		DELAY(1);
 	}
+	if (i == WI_TIMEOUT) {
+		device_printf(sc->sc_dev, "timeout in alloc\n");
+		return ETIMEDOUT;
+	}
 	*idp = CSR_READ_2(sc, WI_ALLOC_FID);
 	CSR_WRITE_2(sc, WI_EVENT_ACK, WI_EV_ALLOC);
 	return 0;



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