Re: at76c503 on sun ultra 10
Nick Jones <[email protected]>
| Newsgroups | gmane.linux.drivers.at76c503a.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Charles, It seems SET_NETDEV_DEV was added to the kernel in 2.4.25 so our current version of the driver will complain if compiled against this or anything higher. As for the 'desc' errors. This code is not right for the 2.4 interface, it should not compile at all - but the le16_to_cpu macro gets 'zeroed' out on i386 and other little endian machines, so this syntax error is hidden from us. It is very useful for us to have you trying this driver out on your machine! Attached is a small patch that addresses your(and our) problems. Could you please apply and test for us? This is an untested patch - I have only compiled it against 2.4.25 headers on my system, but nothing more - it is very late here. Please tell me if it at least fixes the problems you are currently having. Thanks Nick Charles Lemmon wrote: > Nick, Thanks for replying. I downloaded the latest from cvs and tried > to compile it but I get an error in the compile (at76c503.c:805: > error: structure has no member named `desc'). I'm guessing that this > may be a problem between the latest code and the kernel sources I am > using, kernel-2.4.26-sparc. > > Also, redefine of SET_NETDEV_DEV is a little disconcerting. > I tried the 0.11 version which compiles fine but I still get wlan0: > no wireless extensions. > > Thanks, > Charles > > sparc64-linux-gcc -MD -O2 -Wall -Wstrict-prototypes -pipe > -fno-strict-aliasing -mcpu=ultrasparc -m64 -fno-common > -Wno-sign-compare -Wno-unused -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB > -DDRIVER_VERSION=\"v0.12beta11\" > -I/lib/modules/2.4.26-sparc/build/include -DMODVERSIONS -include > /lib/modules/2.4.26-sparc/build/include/linux/modversions.h -c at76c503.c > In file included from > /lib/modules/2.4.26-sparc/build/include/asm/processor.h:23, > from > /lib/modules/2.4.26-sparc/build/include/linux/prefetch.h:13, > from > /lib/modules/2.4.26-sparc/build/include/linux/list.h:6, > from > /lib/modules/2.4.26-sparc/build/include/linux/wait.h:14, > from > /lib/modules/2.4.26-sparc/build/include/linux/fs.h:12, > from > /lib/modules/2.4.26-sparc/build/include/linux/capability.h:17, > from > /lib/modules/2.4.26-sparc/build/include/linux/binfmts.h:5, > from /lib/modules/2.4.26-sparc/build/include/linux/sched.h:9, > from at76c503.c:80: > /lib/modules/2.4.26-sparc/build/include/asm/page.h:112: warning: > call-clobbered register used for global register variable > at76c503.c:145:1: warning: "SET_NETDEV_DEV" redefined > In file included from at76c503.c:93: > /lib/modules/2.4.26-sparc/build/include/linux/netdevice.h:458:1: > warning: this is the location of the previous definition > at76c503.c: In function `update_usb_intf_descr': > at76c503.c:805: error: structure has no member named `desc' > at76c503.c:807: error: structure has no member named `desc' > at76c503.c: In function `rx_mgmt_beacon': > at76c503.c:3054: warning: int format, different type arg (arg 3) > at76c503.c: In function `at76c503_do_probe': > at76c503.c:6604: warning: unsigned int format, different type arg (arg 8) > at76c503.c:6604: warning: unsigned int format, different type arg (arg > 10) > make: *** [at76c503.o] Error 1 > ------------------------------------------------------------------------------------------------------- > > >> Hello Charles, > > >> Looking at the dmesg output, I see you are using quite an old version >> of the driver (30th of July 2003 - that really is quite old now) > > >> Please grab the latest cvs version of the driver and see what >> feedback you get. The current cvs version works well with 2.4 >> kernels, so there is no need to upgrade the kernel for this >> particular reason. > > >> Thanks > > >> Nick > > > > Charles Lemmon wrote: > >> Hello, >> >> I have been using the berlios driver (at76c503-i3861) with RH9 and my >> linksys USB wireless card for a couple of years now on a Pentium III >> box. Someone recently gave me an Sun Ultra 10 and I am trying to get >> the linksys card to work. I'm running gentoo linux for *sparc* >> kernel version 2.4.25. I added a USB PCI card (NECchipset uses OHCI >> and EHCI) I've compiled the driver and have enabled wireless in my >> kernel. It appears that the driver marries itself to the card >> properly but when I try to run iwconfig I get "wlan0 no wireless >> extensions". >> >> Is anyone out there using these drivers on a sun box? For some >> reason after all my searching, I am under the impression that maybe I >> should try the 2.6 kernel. Do you agree? Any other advice would be >> appreciated. Below is the output from a few commands. >> >> Thanks, >> >> >> >> >> From my kernel config >> >> >> CONFIG_NET_RADIO=y >> CONFIG_NET_WIRELESS=y >> >> >> -------------------------------------------------- >> # iwconfig --version >> iwconfig Wireless-Tools version 27 >> Compatible with Wireless Extension v11 to v16. >> >> >> Kernel Currently compiled with Wireless Extension v16. >> >> >> -------------------------------------------------- >> # iwconfig >> lo no wireless extensions. >> >> >> eth0 no wireless extensions. >> >> >> wlan0 no wireless extensions. >> >> >> -------------------------------------------------- >> # dmesg >> hub.c: new USB device 02:03.0-3, assigned address 2 >> input: USB HID v10.01 Mouse [Microsoft Microsoft 3-Button Mouse with >> IntelliEye(TM)] on usb2:2.0 >> sunmouse: Successfully adjusted to 1200 baud. >> hub.c: new USB device 02:03.1-2, assigned address 2 >> usb.c: USB device 2 (vend/prod 0x66b/0x2211) is not claimed by any >> active >> driver. >> at76c503.c: Generic Atmel at76c503/at76c505 routines v0.11 >> usbdfu.c: USB Device Firmware Upgrade (DFU) handler v0.11 >> usb.c: registered new driver usbdfu >> at76c503-i3861.c: Atmel at76c503 (Intersil 3861) Wireless LAN Driver >> v0.11 >> usb.c: registered new driver at76c503-i3861 >> at76c503.c: $Id: at76c503.c,v 1.35 2003/07/30 06:31:51 jal2 Exp $ >> compiled Apr >> 18 2004 20:17:28 >> at76c503.c: firmware version 0.90.0 #2 (fcs_len 4) >> at76c503.c: device's MAC 00:04:5a:c8:b1:02, regulatory domain >> <unknown> (id >> 255)at76c503.c: registered wlan0 >> sys32_ioctl(iwconfig:2209): Unknown cmd fd(3) cmd(00008b1a) >> arg(effffce0) >> sys32_ioctl(iwconfig:2215): Unknown cmd fd(3) cmd(00008b04) >> arg(effffd10) >> at76c503.c: using BSSID 02:00:8a:d4:68:00 >> sys32_ioctl(iwconfig:2278): Unknown cmd fd(3) cmd(00008b01) >> arg(effff010) >> sys32_ioctl(iwconfig:2278): Unknown cmd fd(3) cmd(00008b01) >> arg(effff010) >> sys32_ioctl(iwconfig:2278): Unknown cmd fd(3) cmd(00008b01) >> arg(effff010) > > > > > > > _______________________________________________ > at76c503a-user mailing list > [email protected] > http://lists.berlios.de/mailman/listinfo/at76c503a-user >
20040504-big_endian+2_4_25_fixups.txt
(text/plain, 1.5 KB)
Only in at76c503a-work: .at76c503.c.marks
diff -ur at76c503a/Makefile at76c503a-work/Makefile
--- at76c503a/Makefile 2004-04-17 23:27:05.000000000 +0800
+++ at76c503a-work/Makefile 2004-05-04 03:11:33.176349336 +0800
@@ -4,7 +4,7 @@
CC=gcc
-KERNEL_VERSION = $(shell uname -r)
+KERNEL_VERSION = 2.4.25#$(shell uname -r)
KERNEL_SRC = /lib/modules/$(KERNEL_VERSION)/build
KERNEL_HEADERS = $(KERNEL_SRC)/include
diff -ur at76c503a/at76c503.c at76c503a-work/at76c503.c
--- at76c503a/at76c503.c 2004-04-19 10:18:32.000000000 +0800
+++ at76c503a-work/at76c503.c 2004-05-04 03:24:27.665609072 +0800
@@ -142,7 +142,11 @@
#define GET_DEV(udev) usb_inc_dev_use((udev))
#define PUT_DEV(udev) usb_dec_dev_use((udev))
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 25)
+// this macro is defined from 2.4.25 onward
#define SET_NETDEV_DEV(x,y)
+#endif
+
#define SET_NETDEV_OWNER(ndev,owner) ndev->owner = owner
static inline int submit_urb(struct urb *urb, int mem_flags) {
@@ -802,9 +806,9 @@
memset(ifp->endpoint, 0, 2 * sizeof(struct usb_endpoint_descriptor));
memcpy(&ifp->endpoint[0], buffer+ep0, USB_DT_ENDPOINT_SIZE);
- le16_to_cpus(&ifp->endpoint[0].desc.wMaxPacketSize);
+ le16_to_cpus(&ifp->endpoint[0].wMaxPacketSize);
memcpy(&ifp->endpoint[1], buffer+ep1, USB_DT_ENDPOINT_SIZE);
- le16_to_cpus(&ifp->endpoint[1].desc.wMaxPacketSize);
+ le16_to_cpus(&ifp->endpoint[1].wMaxPacketSize);
/* fill the interface data */
memcpy(ifp, buffer+intf0, USB_DT_INTERFACE_SIZE);