[TAG] Error Compiling Atmel Wireless Driver
Peter Knaggs
peter.knaggs at gmail.com
Tue Sep 20 07:21:54 MSD 2005
Hi Lih-Chern,
I tried again on Debian Sid (unstable)
with kernel 2.6.13 from
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.13.tar.bz2
and gcc (GCC) 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)
Now I do indeed see the same compile error
as you.
It seems that if you edit the following
two files to remove a couple of what are called
"casts" in the C language, the driver compiles OK:
atmelwlandriver/src/usb/rx.c
atmelwlandriver/src/usb/vnetusba.c
Here's the output of "diff -u" to give you
an idea of where to make the change. If you're
not familiar with "diff -u", first make a backup
copy of the files rx.c and vnetusba.c, into
a sub-directory called "original", then
edit one copy so that the output of
diff -u rx.c original/rx.c
matches what's shown below. There's also a handy
utility called "patch" which can do this for you,
but let's leave explaining that for another day :)
--- rx.c 2005-09-19 20:08:07.000000000 -0700
+++ original/rx.c 2005-09-19 20:07:09.000000000 -0700
@@ -746,7 +746,7 @@
Adapter->RxInBuff.WirelessPacket +
MGMT_FRAME_BODY_OFFSET;
- Adapter->ErrorCode =
+ (UCHAR) Adapter->ErrorCode =
(UCHAR) *
(PUSHORT) &
AssociationRspnsFrame
--- vnetusba.c 2005-09-19 20:08:56.000000000 -0700
+++ original/vnetusba.c 2005-09-19 20:08:32.000000000 -0700
@@ -843,7 +843,7 @@
u64* pTime = (u64*) tCurrentTime;
struct timeval timev;
do_gettimeofday(&timev);
- (*pTime) = timev.tv_sec * 10000000;
+ (u64) (*pTime) = timev.tv_sec * 10000000;
};
int atmel_assoc_info_event (PVNet_ADAPTER Adapter)
Hope that gets you to the point where you
can compile OK. I'll have a look into why
the casts were giving trouble, but gcc4 didn't
give any warning when they were removed.
Still, on 2.6.13 I do get a warning about
wireless_send_event being undefined, hopefully
you won't see that :)
Cheers,
Peter.
More information about the TAG
mailing list