Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 2008 00:19:39 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 138691 for review
Message-ID:  <200803270019.m2R0Jdis013000@repoman.freebsd.org>

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

Change 138691 by sam@sam_ebb on 2008/03/27 00:19:17

	o things work much better when interrupts are enabled
	o clear out yet more cruft

Affected files ...

.. //depot/projects/vap/sys/dev/wi/if_wi.c#15 edit
.. //depot/projects/vap/sys/dev/wi/if_wivar.h#12 edit

Differences ...

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

@@ -367,7 +367,6 @@
 	switch (sc->sc_firmware_type) {
 	case WI_LUCENT:
 		sc->sc_ntxbuf = 1;
-		sc->sc_flags |= WI_FLAGS_HAS_MOR;
 		ic->ic_caps |= IEEE80211_C_IBSS;
 
 		sc->sc_ibss_port = WI_PORTTYPE_BSS;
@@ -613,6 +612,9 @@
 	/* enable port */
 	wi_cmd(sc, WI_CMD_ENABLE | sc->sc_portnum, 0, 0, 0);
 	sc->sc_enabled = 1;
+
+	/* Enable interrupts */
+	CSR_WRITE_2(sc, WI_INT_EN, WI_INTRS);
 }
 
 static int
@@ -629,8 +631,6 @@
 	wi_write_val(sc, WI_RID_ALT_RETRY_CNT, 0);
 	if (sc->sc_flags & WI_FLAGS_HAS_ROAMING)
 		wi_write_val(sc, WI_RID_ROAMING_MODE, 3); /* NB: disabled */
-	if (sc->sc_flags & WI_FLAGS_HAS_MOR)
-		wi_write_val(sc, WI_RID_MICROWAVE_OVEN, sc->sc_microwave_oven);
 
 	wi_write_rid(sc, WI_RID_MAC_NODE, mac, IEEE80211_ADDR_LEN);
 
@@ -676,13 +676,11 @@
 		WI_UNLOCK(sc);
 		return;
 	}
-	wi_enable(sc);			/* Enable desired port */
 
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 
-	/* Enable interrupts */
-	CSR_WRITE_2(sc, WI_INT_EN, WI_INTRS);
+	wi_enable(sc);			/* Enable desired port */
 	WI_UNLOCK(sc);
 
 	ieee80211_start_all(ic);
@@ -875,8 +873,6 @@
 			wi_write_ssid(sc, WI_RID_OWN_SSID,
 			    vap->iv_des_ssid[0].ssid, vap->iv_des_ssid[0].len);
 			wi_write_val(sc, WI_RID_OWN_BEACON_INT, ic->ic_bintval);
-			wi_write_val(sc, WI_RID_BASIC_RATE, 0x03);   /* 1, 2 */
-			wi_write_val(sc, WI_RID_SUPPORT_RATE, 0x0f); /* 1, 2, 5.5, 11 */
 			wi_write_val(sc, WI_RID_DTIM_PERIOD, vap->iv_dtim_period);
 
 			/* XXX: some cards need to be re-enabled for hostap */

==== //depot/projects/vap/sys/dev/wi/if_wivar.h#12 (text+ko) ====

@@ -115,7 +115,6 @@
 
 	int			sc_porttype;
 	u_int16_t		sc_portnum;
-	u_int16_t		sc_microwave_oven;
 	u_int16_t		sc_encryption;
 	u_int16_t		sc_monitor_port;
 
@@ -152,10 +151,7 @@
 /* maximum consecutive false change-of-BSSID indications */
 #define	WI_MAX_FALSE_SYNS		10	
 
-#define	WI_FLAGS_HAS_MOR		0x0010
 #define	WI_FLAGS_HAS_ROAMING		0x0020
-#define	WI_FLAGS_HAS_DIVERSITY		0x0040
-#define	WI_FLAGS_BUG_AUTOINC		0x0100
 #define	WI_FLAGS_HAS_FRAGTHR		0x0200
 #define	WI_FLAGS_HAS_DBMADJUST		0x0400
 



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