Questions on libertas driver

Cyril HAENEL chaenel at free.fr
Wed Jan 23 10:33:37 EST 2008


Holger, I  answer below :

Holger Schurig a écrit :

>>I sent some message some month ago about implementing libertas
>>driver in a blackfin processor based board.
>>    
>>
>
>Nice.
>
>  
>
>>After that my idea was to use the last libertas sources, I got
>>it in the 2.6.24RC1, but there was error during compilation
>>because the libertas source included in the 2.6.24RC1 uses
>>kernel functions that are not present in my 2.6.19 kernel.
>>    
>>
>
>And you cannot use 2.6.24rc on your Blackfin?  Aren't all needed
>patches for Blackfin upstream?
>
>Which function exactly isn't in 2.6.19 ?
>  
>
In fact the ucLinux distribution I use implement a kernel, which is the 
2.6.19. Maybe I can replace it by a 2.6.24 and it will works, but I 
asked ucLinux for blackin mainteners and they are unsure, and they 
advised me to stay on the 2.6.19 until they implement themselves the 
last official kernel version in the ucLinux distribution.


>
>  
>
>>Today I come back on this project, and I want to restart from
>>the latest libertas sources. But since some month, I see a
>>very very big quantity of patch on the mailing list. Can I
>>find somewhere the last libertas tree which include all the
>>patch ?
>>    
>>
>
>Yes, it's in the wireless-2.6 git tree, branch everything.
>
>$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
>$ cd wireless-2.6
>$ git checkout -b everything origin/everything
>
>IF you already have a recent git tree checkout, you can speed up
>this tremendously by using "--reference DIRECTORY--GIT-TREE"
>on the "git clone" command.
>  
>
Great, thank you for that ! I will be able to use the last libertas 
sources when the last official kernel will be used in the ucLinux 
distribution.
For now I work with older libertas sources which compile OK with the 
2.6.19 kernel version of the ucLinux distribution.

>>Other question, when the libertas_cs.ko module is loaded, and
>>firmware downloaded, eth0 appear when I do "ifconfig eth0 up",
>>but how can I set the wireless parameters ?
>>    
>>
>
>With "iwconfig" from wireless-tools.
>  
>
I found the problem, see below

>$ ifconfig eth0 up
>$ iwconfig eth0 essid BLAH
>$ iwconfig eth0 key s:12345
>
>This assumes that you have an access-point with ESSID "BLAH"
>and the Web-Key "12345" around (very insecure). If you want
>WPA/WPA2, you'd need wpasupplicant.
>
>After a second or so, another call to
>
>$ iwconfig
>
>shows you to which AP you're associated.
>
>  
>
>>Habitually I use iwconfig, but it's not working with this
>>card, iwconfig tell me that eth0 doesn't have wireless
>>extension.
>>    
>>
>
>Maybe it's not named eth0 because of some dump udev rename
>rules?  Be assured that "iwconfig" works quite nicely with
>libertas. I, for example, have this entry in my
>/etc/udev/rules.d/z25_persistent-net.rules file:
>
>SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:16:41:72:f6:a8", NAME="eth1"
>
>Be sure that you don't have clashes with other devices.
>Maybe "ifconfig -a" before inserting the card can help you
>here. Or try "iwconfig" without any parameters. This will
>show you which 'ethernet' devices support wireless extensions.
>
>  
>
In fact with the libertas driver version I use, when I type iwconfig, it 
say me that eth0 (the only card) have no wireless extension.
Thus I looked in the source code and I found the problem :
In fact the pointers to wireless extension functions was commented :

#ifdef  WIRELESS_EXT
///     dev->wireless_handlers = (struct iw_handler_def 
*)&libertas_handler_def;
#endif

#ifdef  WIRELESS_EXT
///     mesh_dev->wireless_handlers = (struct iw_handler_def 
*)&mesh_handler_def;
#endif

Thus I changed this to :

//#ifdef  WIRELESS_EXT
     dev->wireless_handlers = (struct iw_handler_def 
*)&libertas_handler_def;
//#endif

//#ifdef  WIRELESS_EXT
     mesh_dev->wireless_handlers = (struct iw_handler_def 
*)&mesh_handler_def;
//#endif

And now iwconfig eth0 works.
Now I try to connect on the AP but I have a kernel panic with non 
aligned data, but I already know the problem, I think I know how to 
solve the problem.


>>Must I use specifics tools to configure the wireless
>>parameters of the card (essid, etc...) ?
>>    
>>
>
>No.
>
>
>
>PS: As a hint, write new messages, don't use the "reply" button of your e-mail program to start a new thread.
>
>  
>
Oops, I am sorry.

Regards,
Cyril




More information about the libertas-dev mailing list