Hi,

I couldn't build the ural-linux driver (
http://etudiants.insia.org/~jbobbio/ural-linux/ ) for kernel 2.6.14-*
(I got some warnings and errors).

I know nothing about programming. So I did some google.
Reading the file madwifi-cvs/net80211/ieee80211_var.h and
http://groups.google.com/group/fa.linux.kernel/browse_thread/thread/9fca7ce12c00cf68/15b0dcb877c6b38f?lnk=st&q=URB_ASYNC_UNLINK&rnum=2#15b0dcb877c6b38f
I did a little patch (three lines modified):
---------------------------------------------------------------------------------------
diff -Nur ural-linux-0.8.2/net80211/ieee80211_var.h
ural-linux-0.8.2.1/net80211/ieee80211_var.h
--- ural-linux-0.8.2/net80211/ieee80211_var.h   2005-05-20
20:06:57.000000000 +0200
+++ ural-linux-0.8.2.1/net80211/ieee80211_var.h 2005-10-25
19:04:28.000000000 +0200
@@ -42,7 +42,7 @@
 /* NB: portability glue must go first */
  #ifdef __NetBSD__
 #include <net80211/ieee80211_netbsd.h>
-#elif __FreeBSD__
+#elif defined(__FreeBSD__)
 #include <net80211/ieee80211_freebsd.h>
  #elif __linux__
 #include <net80211/ieee80211_linux.h>
@@ -238,7 +238,7 @@
        u_int32_t               *ic_aid_bitmap;
        u_int16_t               ic_max_aid;
        struct ifmedia          ic_media;       /* interface media config */
-#if NBPFILTER > 0
+#if defined(NBPFILTER) && (NBPFILTER > 0)
        struct bpf_if           *ic_rawbpf;     /* packet filter structure */
  #endif
        struct ieee80211_node   *ic_bss;        /* information for this node */
diff -Nur ural-linux-0.8.2/ural/if_ral.c ural-linux-0.8.2.1/ural/if_ral.c
--- ural-linux-0.8.2/ural/if_ral.c      2005-06-08 14:19:09.000000000 +0200
+++ ural-linux-0.8.2.1/ural/if_ral.c    2005-10-25 19:16:26.000000000 +0200
@@ -1542,7 +1542,7 @@
        struct ural_softc *sc = netdev_priv(netdev);

        warn("%s: tx timeout\n", netdev->name);
-       sc->sc_tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
+       /* sc->sc_tx_urb->transfer_flags |= URB_ASYNC_UNLINK; */
        usb_unlink_urb(sc->sc_tx_urb);
        sc->sc_devstats.tx_errors++;
        /* XXX: should we prefer _locked here? */
-----------------------------------------------------------------------------------------------------------

Now I can build ural-linux without warnings and errors for
debian_kernel_source 2.6.14-rc5.
The wifi works, but I don't know if this patch is correct.

Best regards,
Bin

Reply via email to