atuwi on 6.0-BETA1

Miguel Mendez <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
Hi there,

I have a Gericom X5 laptop with an integrated USB wifi adapter, and I'm
trying to make it work with FreeBSD 6.0-BETA1. I've downloaded your
driver and modified some bits to make it work with 6.0. The module
builds fine, but the firmware is never uploaded. I turn the adapter on
and the kernel finds it, but nothing happens. When I turn it off I see
this:

Turn on...

Jul 16 14:38:35 laptop kernel: atuwi0: vendor 0x09aa product 0x3642, rev 1.10/1.32, addr 2 
Jul 16 14:38:35 laptop kernel: atuwi0: req=33 val=01 ind=00 len=01 

Turn off...

Jul 16 14:42:42 laptop kernel: atuwi0: transfered 0x0 bytes in 
Jul 16 14:42:42 laptop kernel: atuwi0: dump [c0 d2 f2 12 00 00 00 00 00 09] 
Jul 16 14:42:42 laptop kernel: atuwi0: starting internal firmware download 
Jul 16 14:42:42 laptop kernel: atuwi0: loading Intersil firmware... 
Jul 16 14:42:42 laptop kernel: atuwi0: req=05 val=00 ind=00 len=01 
Jul 16 14:42:42 laptop kernel: atuwi0: transfered 0x0 bytes in 
Jul 16 14:42:42 laptop kernel: atuwi0: dump [c1 58 73 84 cb d2 c6 af c1 00] 
Jul 16 14:42:42 laptop kernel: atuwi0: state != manifestsync... eek! 
Jul 16 14:42:42 laptop kernel: atuwi0: req=03 val=00 ind=00 len=06 
Jul 16 14:42:42 laptop kernel: atuwi0: transfered 0x0 bytes in 
Jul 16 14:42:42 laptop kernel: atuwi0: dump [25 87 b0 c1 b0 4d 58 c0 44 73] 
Jul 16 14:42:42 laptop kernel: atuwi0: dfu_getstatus failed! 
Jul 16 14:42:42 laptop kernel: device_attach: atuwi0 attach returned 6 
Jul 16 14:42:42 laptop kernel: atuwi0: at uhub2 port 1 (addr 2) disconnected

This is the output of usbdevs...

laptop# usbdevs -v
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA
(0x0000), rev 1.00 port 1 addr 2: low speed, power 100 mA, config 1,
product 0x1111(0x1111), vendor 0x1241(0x1241), rev 4.30 port 2 powered
Controller /dev/usb1:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA
(0x0000), rev 1.00 port 1 powered
 port 2 powered
Controller /dev/usb2:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA
(0x0000), rev 1.00 port 1 addr 2: full speed, power 500 mA, config 1,
(0x3642), vendor 0x09aa(0x09aa), rev 1.32 port 2 powered
Controller /dev/usb3:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA
(0x0000), rev 1.00 port 1 powered
 port 2 powered

According to usbdevs, product 0x3642 from vendor 0x09aa is an Intersil
Prism 2x. Do you have an idea of why the kernel fails to upload the
firmware?

I'm attaching the modified if_atuwi.c with my modifications for it to
build on 6.0-BETA1 and the added support for my Intersil device.

Thanks in advance,
-- 
Miguel Mendez <[email protected]>
http://www.energyhq.es.eu.org
PGP Key: 0xDC8514F1
if_atuwi.c.diff (text/plain, 2.1 KB)
--- if_atuwi.c.old	Mon Oct 25 13:31:26 2004
+++ if_atuwi.c	Sat Jul 16 14:50:31 2005
@@ -62,6 +62,7 @@
 #include <net/if_arp.h>
 #include <net/ethernet.h>
 #include <net/if_media.h>
+#include <net/if_types.h>
 
 #include <net/bpf.h>
 
@@ -272,6 +273,9 @@
 	/* 0x04a5		0x9000 */
 	{ USB_VENDOR_ACERP,	USB_PRODUCT_ACERP_AWL300,
 	  RadioIntersil,	ATUWI_NO_QUIRK },
+	/* 0x09aa		0x3642 */
+	{ USB_VENDOR_INTERSIL,	USB_PRODUCT_INTERSIL_PRISM_2X,
+	  RadioIntersil,	ATUWI_NO_QUIRK },
 #endif
 	{ 0, 0, 0, 0 }
 };
@@ -2032,7 +2036,7 @@
 		sc->atuwi_mac_addr, ":"));
 
 	bcopy(sc->atuwi_mac_addr,
-		(char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
+		IFP2ENADDR(sc->ifp), ETHER_ADDR_LEN);
 
 
 	for (i=0; i<ATUWI_AVG_TIME; i++)
@@ -2043,7 +2047,7 @@
 	sc->atuwi_cdata.atuwi_tx_inuse = 0;
 
 
-	ifp = &sc->arpcom.ac_if;
+	ifp = sc->ifp;
 	ifp->if_softc = sc;
 #if __FreeBSD_version >= 501113
 	if_initname(ifp, "atuwi", sc->atuwi_unit);
@@ -2162,7 +2166,7 @@
 	
 	sc = device_get_softc(dev);
 	ATUWI_LOCK(sc);
-	ifp = &sc->arpcom.ac_if;
+	ifp = sc->ifp;
 
 	printf("atuwi%d: detach\n", sc->atuwi_unit);
 
@@ -2695,7 +2699,7 @@
 	c = priv;
 	sc = c->atuwi_sc;
 	ATUWI_LOCK(sc);
-	ifp = &sc->arpcom.ac_if;
+	ifp = sc->ifp;
 
 #ifdef ATUWI_PROFILING
 	atuwi_profiling_rxeof++;
@@ -2923,7 +2927,7 @@
 	atuwi_profiling_txeof++;
 #endif /* ATUWI_PROFILING */
 
-	ifp = &sc->arpcom.ac_if;
+	ifp = sc->ifp;
 	ifp->if_timer = 0;
 
 	c->atuwi_in_xfer = 0;
@@ -3249,7 +3253,7 @@
 atuwi_init(void *xsc)
 {
 	struct atuwi_softc	*sc = xsc;
-	struct ifnet		*ifp = &sc->arpcom.ac_if;
+	struct ifnet		*ifp = sc->ifp;
 	struct atuwi_chain	*c;
 	struct atuwi_cdata	*cd = &sc->atuwi_cdata;
 	usbd_status		err;
@@ -3318,7 +3322,7 @@
 		usbd_transfer(c->atuwi_xfer);
 	}
 
-	bcopy((char *)&sc->arpcom.ac_enaddr, sc->atuwi_mac_addr,
+	bcopy(IFP2ENADDR(sc->ifp), sc->atuwi_mac_addr,
 	    ETHER_ADDR_LEN);
 	DEBUG(FLAG_INIT, ("atuwi%d: starting up using MAC=%6D\n",
 	    sc->atuwi_unit, sc->atuwi_mac_addr, ":"));
@@ -3883,7 +3887,7 @@
 		atuwi_profiling_stop++;
 #endif /* ATUWI_PROFILING */
 
-	ifp = &sc->arpcom.ac_if;
+	ifp = sc->ifp;
 	ifp->if_timer = 0;
 
 	DEBUG(FLAG_INIT, ("atuwi%d: atuwi_stop\n", sc->atuwi_unit));
signature.asc (application/pgp-signature, 187 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQFC2QMqnLctrNyFFPERAvolAKDJRVgFNArEkANJkLHWRjZlUDRK1ACfUCrQ
jyOCWxkG4Mjiva+7rdgmJEM=
=kGym
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.