Make errors with new the implementation of iw_handler.h

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=4906

emanresu

22-07-2008 14:23:25

Today I downloaded new CVS and tried to compile module. But I've got the following
[code1xiv9oit]CC [M] /home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.o
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c: En la función ‘rt_ioctl_giwscan’:
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:682: aviso: se pasa el argumento 1 de ‘iwe_stream_add_event’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:682: aviso: se pasa el argumento 3 de ‘iwe_stream_add_event’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:682: aviso: el paso del argumento 4 de ‘iwe_stream_add_event’ crea un punterodesde un entero sin una conversión
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:682: error: faltan argumentos para la función ‘iwe_stream_add_event’
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:694: aviso: se pasa el argumento 1 de ‘iwe_stream_add_point’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:694: aviso: se pasa el argumento 3 de ‘iwe_stream_add_point’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:694: aviso: se pasa el argumento 4 de ‘iwe_stream_add_point’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:694: error: faltan argumentos para la función ‘iwe_stream_add_point’
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:717: aviso: se pasa el argumento 1 de ‘iwe_stream_add_event’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:717: aviso: se pasa el argumento 3 de ‘iwe_stream_add_event’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:717: aviso: el paso del argumento 4 de ‘iwe_stream_add_event’ crea un punterodesde un entero sin una conversión
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:717: error: faltan argumentos para la función ‘iwe_stream_add_event’
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:733: aviso: se pasa el argumento 1 de ‘iwe_stream_add_event’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:733: aviso: se pasa el argumento 3 de ‘iwe_stream_add_event’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:733: aviso: el paso del argumento 4 de ‘iwe_stream_add_event’ crea un punterodesde un entero sin una conversión
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:733: error: faltan argumentos para la función ‘iwe_stream_add_event’
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:747: aviso: se pasa el argumento 1 de ‘iwe_stream_add_point’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:747: aviso: se pasa el argumento 3 de ‘iwe_stream_add_point’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:747: aviso: se pasa el argumento 4 de ‘iwe_stream_add_point’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:747: error: faltan argumentos para la función ‘iwe_stream_add_point’
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:764: aviso: se pasa el argumento 1 de ‘iwe_stream_add_value’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:764: aviso: se pasa el argumento 4 de ‘iwe_stream_add_value’ desde un tipo depuntero incompatible
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:764: aviso: el paso del argumento 5 de ‘iwe_stream_add_value’ crea un punterodesde un entero sin una conversión
/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.c:764: error: faltan argumentos para la función ‘iwe_stream_add_value’
make[2]: *** [/home/inaki/Download/rt73/rt73-cvs-2008072208/Module/rtmp_info.o] Error 1
make[1]: *** [_module_/home/inaki/Download/rt73/rt73-cvs-2008072208/Module] Error 2
make[1]: se sale del directorio `/usr/src/kernels/2.6.25.10-86.fc9.i686'
rt73.ko failed to build!
make: *** [module] Error 1[/code1xiv9oit]
The 'iwe_stream_add_point' and the 'iwe_stream_add_event' functions have new arguments. For example, the new 'iwe_stream_add_event' looks like this
[code1xiv9oit]iwe_stream_add_event(struct iw_request_info *info, char *stream, char *ends,
struct iw_event *iwe, int event_len)[/code1xiv9oit]
You can see these changes here[/url1xiv9oit].

Vern

23-07-2008 17:01:20

Hi emanresu,

Well, I see once again the kernel folks have broken their interface. That's break; b-r-e-a-k.

Ya wanna try generating a patch? First criterion is that legacy drivers work on 2.4 kernels, too. As far as I can tell 2.4 kernels are still on about 1/3 of the installed base out there, while the installed base for 2.6.26 is effectively zero.

The basic approach is to use compatbility macro(s). In this case, a patch would have two parts.

First, change the problem calls in rtmp_info.c to conform to the new requirements.

Next, look at rt_config.h. There you'll see a series of conditional compilations of the form - e.g.[code1o613v2c]#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))[/code1o613v2c]
The approach generally is to do something along the lines of[code1o613v2c]#define foo(x,y,z) foo(x,y)[/code1o613v2c] So you could insert in ascending revision order something like this[code1o613v2c]#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
#define foo(x,y,z) foo(x,y)
#define bar(x,y,z) bar(x,y)
...
#endif[/code1o613v2c]
If it compiles without error or warning for you, I'll regress it to 2.6.25 and 2.4.36. Once those are OK, I'll propagate the changes to the other legacy drivers.

Think about it. You will have the glory of a one liner in the CHANGELOG and another - absolutely free - in the THANKS file!

Thanks,

IvD

23-07-2008 17:45:50


[codeojga58e4]#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))[/codeojga58e4][/quoteojga58e4]

Please note that checks like above will behave _badly_ on Fedora kernels since their 2.6.25 kernel looks a lot like 2.6.26 (including the API changes)

Vern

02-08-2008 16:26:13

Hi emanresu,

The attached patch, adapted from the original developed by deds, should fix the compile problem under 2.6.26.

Could you apply it to a vanilla copy of the latest CVS and post your results here? If it works OK for you, I'll put it into CVS.

Thanks,

Vern

07-08-2008 16:11:39

Well, some kind of feedback would have been nice. However, this thing's been up five days and downloaded nine times with no complaints.

Must be good. So I've put it into CVS.

Cappa72

12-08-2008 06:16:21

Dear Members,

I downloaded the yesterday's cvs and have the following observation

With Fedora7 (using 2.6.23-xxxx kernel) the driver could be used without any problem works fine.
On OpenSUSE11.0 (kernel 2.6.25-xxxx) and Mandriva2008.1 (with kernel 2.6.26-2mnb) the driver cannot be complied.
The similar error arose that was mentioned above
[code1lb9jh9s]
[root@localhost Module]# make
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c: In function �rt_ioctl_giwscan’:
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:684: warning: passing argument 1 of �iwe_stream_add_event’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:684: warning: passing argument 3 of �iwe_stream_add_event’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:684: warning: passing argument 4 of �iwe_stream_add_event’ makes integer from pointer without a cast
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:684: error: too many arguments to function �iwe_stream_add_event’
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:696: warning: passing argument 1 of �iwe_stream_add_point’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:696: warning: passing argument 3 of �iwe_stream_add_point’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:696: warning: passing argument 4 of �iwe_stream_add_point’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:696: error: too many arguments to function �iwe_stream_add_point’
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:719: warning: passing argument 1 of �iwe_stream_add_event’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:719: warning: passing argument 3 of �iwe_stream_add_event’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:719: warning: passing argument 4 of �iwe_stream_add_event’ makes integer from pointer without a cast
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:719: error: too many arguments to function �iwe_stream_add_event’
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:735: warning: passing argument 1 of �iwe_stream_add_event’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:735: warning: passing argument 3 of �iwe_stream_add_event’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:735: warning: passing argument 4 of �iwe_stream_add_event’ makes integer from pointer without a cast
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:735: error: too many arguments to function �iwe_stream_add_event’
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:749: warning: passing argument 1 of �iwe_stream_add_point’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:749: warning: passing argument 3 of �iwe_stream_add_point’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:749: warning: passing argument 4 of �iwe_stream_add_point’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:749: error: too many arguments to function �iwe_stream_add_point’
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:766: warning: passing argument 1 of �iwe_stream_add_value’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:766: warning: passing argument 4 of �iwe_stream_add_value’ from incompatible pointer type
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:766: warning: passing argument 5 of �iwe_stream_add_value’ makes integer from pointer without a cast
/usr/share/rt73-cvs-2008081109/Module/rtmp_info.c:766: error: too many arguments to function �iwe_stream_add_value’
make[2]: *** [/usr/share/rt73-cvs-2008081109/Module/rtmp_info.o] Error 1
make[1]: *** [_module_/usr/share/rt73-cvs-2008081109/Module] Error 2
make: *** [module] Error 1
[/code1lb9jh9s]
Kernel-headers, kernel-source are installed (SUSE).
Kernel-headers, kernel-devel are installed (Mandriva).

In each case I mentioned the rt2500-cvs driver could be complied and worked fine.

What did I do on wrong way?

Thank you and BR,
Cappa.

Vern

12-08-2008 16:34:07

Hi Cappa72,

I've moved your posting. The one you originally tacked it on to was discussing a different problem.

If the rt73 doesn't compile in the same environment that the rt2500 does compile in, then do you have the latest CVS for the rt73?

(Just as a heads-up, I've had to fix one of the adaptation macros yet again. Should be in CVS by now.)

Thanks,

Cappa72

12-08-2008 18:46:13

Hi Cappa72,

I've moved your posting. The one you originally tacked it on to was discussing a different problem.

If the rt73 doesn't compile in the same environment that the rt2500 does compile in, then do you have the latest CVS for the rt73?

(Just as a heads-up, I've had to fix one of the adaptation macros yet again. Should be in CVS by now.)

Thanks,[/quote3i3cfm9x]
First of all, thank you for correction (moving the post to the right place).
Surely I had the latest CVS yesterday.
And now I will try the today's one.

On the othe hand, I tried to comply the yesterday's CVS in Debian Lenny environment and surprisingly complied (kernel 2.6.25-2-686), and the Edimax EW-7318Ug works now. (Inspite of this fact I will try the latest CVS on Mandriva).

Thank you and will be back with the result.
BR,
Cappa

Cappa72

19-08-2008 12:48:00

On the othe hand, I tried to comply the yesterday's CVS in Debian Lenny environment and surprisingly complied (kernel 2.6.25-2-686), and the Edimax EW-7318Ug works now. (Inspite of this fact I will try the latest CVS on Mandriva).

Thank you and will be back with the result.
BR,
Cappa[/quote1eyz2tp2]
So, I tried it on day before yesterday and I got the same error message under Mandriva, after a kernel update.
The rt2500 could be complied without problem.

Starcrasher

19-08-2008 16:13:31

Same thing with today CVS on Mandriva Cooker ank kernel 2.6.26.2
It seems the same problem as for the rt2570 driver (see the thread rt2570 CVS compilation error[/url2d65ljd9]).
Since it's solved there, I imagine that a solution should appear quickly for rt73.

Cappa72

25-08-2008 09:28:02

Is there any possibility to download "old" rt73 drivers?
For instance from around 2008 May?

BR,
Cappa

Spy84464

25-08-2008 18:26:52

Sure, just check it out directly from the sourceforge CVS repository, I can't give you the exact command to use though, as I'm more of a SVN guy ;).