2015-05-26 14:25:23

by Yegor Yefremov

[permalink] [raw]
Subject: wl18xx: wlconf kernel compatibility

How do I know, which wlconf version is compatible with which kernel
version? I have following problem:

I have *.INI file for my particular WLAN chip. This file will be used
to produce wl18xx-conf.bin. The size of this file will be check during
device initialization. Depending on which kernel version is used the
size of the required file differs. For example kernel 3.18 requires
wl18xx-conf.bin to have 1221 bytes, 4.1 expects 1226 bytes. Recent
wlconf (git://git.ti.com/wilink8-wlan/18xx-ti-utils.git) produces 1229
bytes files.

How should I determine correct wlconf version?

Regards,
Yegor


2015-06-08 08:15:50

by Yegor Yefremov

[permalink] [raw]
Subject: Re: wl18xx: wlconf kernel compatibility

Hi Yaniv,

On Sun, Jun 7, 2015 at 9:30 AM, Machani, Yaniv <[email protected]> wrote:
> Hi,
> As the configuration file is HW depended it should be created per platform,
> we have set this wiki page and script to help with initial setup :
> http://processors.wiki.ti.com/index.php/Open_Source_Wireless_Connectivity_wlconf
>
> We have also pushed a patch that makes sure the driver will not crash if there is a file size mismatch,
> and will fall back to default.

What about following proposal. I'm learning libxmlrpc now. It has
following struct *xmlrpc_server_abyss_parms*
(http://xmlrpc-c.sourceforge.net/doc/libxmlrpc_server_abyss.html#server_abyss_parameters).
If new parameter will be added, it is done via appending this to the
bottom of the structure. This way old structure is still preserved.

The user of this library must specify till what parameter this
structure should be used (parmSize parameter):

oid
xmlrpc_server_abyss(xmlrpc_env * const envP,
xmlrpc_server_abyss_parms * const parmP,
unsigned int const parmSize);

This will be achieved via XMLRPC_APSIZE(log_file_name), i.e. macro
with structure field name. This way old programs still can work with
newer library.

This approach could be taken for wl18xx-conf.bin. Driver calculates
the size of known parameters and conf file size and as long as the
size of wl18xx-conf.bin is not smaller than known size, the driver can
use it.

What do you think about it?

Yegor

>> -----Original Message-----
>> From: Yegor Yefremov [mailto:[email protected]]
>> Sent: Saturday, June 06, 2015 6:19 PM
>> To: Kalle Valo
>> Cc: [email protected]; Machani, Yaniv; Eliad Peller; Marc Kleine-
>> Budde
>> Subject: Re: wl18xx: wlconf kernel compatibility
>>
>> Hi Kalle,
>>
>> On Sat, Jun 6, 2015 at 3:27 PM, Kalle Valo <[email protected]> wrote:
>> > Yegor Yefremov <[email protected]> writes:
>> >
>> >> How do I know, which wlconf version is compatible with which kernel
>> >> version? I have following problem:
>> >>
>> >> I have *.INI file for my particular WLAN chip. This file will be used
>> >> to produce wl18xx-conf.bin. The size of this file will be check
>> >> during device initialization. Depending on which kernel version is
>> >> used the size of the required file differs. For example kernel 3.18
>> >> requires wl18xx-conf.bin to have 1221 bytes, 4.1 expects 1226 bytes.
>> >> Recent wlconf (git://git.ti.com/wilink8-wlan/18xx-ti-utils.git)
>> >> produces 1229 bytes files.
>> >>
>> >> How should I determine correct wlconf version?
>> >
>> > I also complained about something along these lines earlier, this is
>> > not how upstream drivers are supposed to work. Users should not be
>> > forced to find correct files from somewhere, instead everything should
>> > just work out of box.
>> >
>> > Can anyone help Yegor to solve his problem? But in the long run wl18xx
>> > really should manage this better.
>>
>> I could solve the problem, though for the future it should be clear, what wlconf
>> version to use.
>>
>> See my post here:
>> http://e2e.ti.com/support/wireless_connectivity/f/307/p/426229/1523235#152
>> 3235
>>
>> Yegor

2015-06-06 13:27:51

by Kalle Valo

[permalink] [raw]
Subject: Re: wl18xx: wlconf kernel compatibility

Yegor Yefremov <[email protected]> writes:

> How do I know, which wlconf version is compatible with which kernel
> version? I have following problem:
>
> I have *.INI file for my particular WLAN chip. This file will be used
> to produce wl18xx-conf.bin. The size of this file will be check during
> device initialization. Depending on which kernel version is used the
> size of the required file differs. For example kernel 3.18 requires
> wl18xx-conf.bin to have 1221 bytes, 4.1 expects 1226 bytes. Recent
> wlconf (git://git.ti.com/wilink8-wlan/18xx-ti-utils.git) produces 1229
> bytes files.
>
> How should I determine correct wlconf version?

I also complained about something along these lines earlier, this is not
how upstream drivers are supposed to work. Users should not be forced to
find correct files from somewhere, instead everything should just work
out of box.

Can anyone help Yegor to solve his problem? But in the long run wl18xx
really should manage this better.

--
Kalle Valo

2015-06-06 15:19:42

by Yegor Yefremov

[permalink] [raw]
Subject: Re: wl18xx: wlconf kernel compatibility

Hi Kalle,

On Sat, Jun 6, 2015 at 3:27 PM, Kalle Valo <[email protected]> wrote:
> Yegor Yefremov <[email protected]> writes:
>
>> How do I know, which wlconf version is compatible with which kernel
>> version? I have following problem:
>>
>> I have *.INI file for my particular WLAN chip. This file will be used
>> to produce wl18xx-conf.bin. The size of this file will be check during
>> device initialization. Depending on which kernel version is used the
>> size of the required file differs. For example kernel 3.18 requires
>> wl18xx-conf.bin to have 1221 bytes, 4.1 expects 1226 bytes. Recent
>> wlconf (git://git.ti.com/wilink8-wlan/18xx-ti-utils.git) produces 1229
>> bytes files.
>>
>> How should I determine correct wlconf version?
>
> I also complained about something along these lines earlier, this is not
> how upstream drivers are supposed to work. Users should not be forced to
> find correct files from somewhere, instead everything should just work
> out of box.
>
> Can anyone help Yegor to solve his problem? But in the long run wl18xx
> really should manage this better.

I could solve the problem, though for the future it should be clear,
what wlconf version to use.

See my post here:
http://e2e.ti.com/support/wireless_connectivity/f/307/p/426229/1523235#1523235

Yegor

2015-06-07 07:30:32

by Yaniv Machani

[permalink] [raw]
Subject: RE: wl18xx: wlconf kernel compatibility

SGksDQpBcyB0aGUgY29uZmlndXJhdGlvbiBmaWxlIGlzIEhXIGRlcGVuZGVkIGl0IHNob3VsZCBi
ZSBjcmVhdGVkIHBlciBwbGF0Zm9ybSwNCndlIGhhdmUgc2V0IHRoaXMgd2lraSBwYWdlIGFuZCBz
Y3JpcHQgdG8gaGVscCB3aXRoIGluaXRpYWwgc2V0dXAgOg0KaHR0cDovL3Byb2Nlc3NvcnMud2lr
aS50aS5jb20vaW5kZXgucGhwL09wZW5fU291cmNlX1dpcmVsZXNzX0Nvbm5lY3Rpdml0eV93bGNv
bmYNCg0KV2UgaGF2ZSBhbHNvIHB1c2hlZCBhIHBhdGNoIHRoYXQgbWFrZXMgc3VyZSB0aGUgZHJp
dmVyIHdpbGwgbm90IG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