[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: kwireless
From:       Nik <wireless () babel ! homelinux ! net>
Date:       2006-12-20 1:22:34
Message-ID: 4588905A.406 () babel ! homelinux ! net
[Download RAW message or body]

Hi Stefan,

Thank you for your quick response, and giving me the benefit of your 
experience.

Stefan Winter wrote:
> Hello,
>
>  
>> [...] Our
>> driver puts the correct information into the /proc/net/wireless file,
>> but KWireless does not display the information. Looking at the source, I
>> see that KWireless ignores anything in this file which is not an 802.11
>> interface, presumably on the assumption that anything else is not 
>> wireless.
>>     
>
> Your approach is... let's say unusual. At least under Linux, the 
> information is usually retrieved from the kernel with ioctl()s.
Ok, in trying to be concise, I seem to have managed to be misleading; my 
apologies.

Our driver gets the correct information into /proc/net/wireless by 
providing a get_wireless_stats() function to the kernel in an 
iw_handler_def struct. As I understand it, this is a form of ioctl?

Given that I had seen KWireless reading the /proc/net/wireless file, the 
important fact I was trying to convey was that the data from our device 
was there, but for other reasons, was not being recognised.

The problem is that even though we provide the get_wireless_stats() 
function, KWireless does not recognise our interface as being a 
*wireless* interface because it first iterates the registered 'wireless' 
network interfaces. As far as I can see, our driver is not in the list 
of 'wireless' network interfaces.
(iwconfig says the interface has no wireless extensions)

We were basically following documentation we had already found on the 
wireless extensions which described /proc/net/wireless as the 
'read-only' interface, and the ioctls as the 'read/write' interface. 
Given that we only wanted information to be read, and that most of the 
ioctls don't apply to our device, we opted for the /proc/net/wireless 
approach.

My suggested patch to KWireless was to remove the iteration of the 
registered 'wireless' devices, and to simply improve the parsing of the 
/proc/net/wireless file. In this way, it would pick up the information 
regarding our driver.

> The kernel's generic interface for wireless devices is called the 
> wireless extensions [1] (a must-read for people writing wireless 
> drivers). They claim to support more than just 802.11. A lot of 
> applications interface with the wireless extensions, for example my 
> own project KWiFiManager[2], shipped within kdenetwork. Your device 
> would very probably be picked up by any application that queries the 
> wireless extensions, and you can easily try it out on the command-line 
> by invoking iwconfig [3]. If they don't you can consider it a bug IMO 
> (and for KWiFiManager, you could just file a bug report [4] and I'd 
> try to fix it).
>
>   
Ok, I had previously tried something along these lines, and had modified 
our driver such that it registered a 'wireless' device instead of an 
eth_device. The mods compiled, loaded, and then hung the kernel :o(

However, following your specific suggestion to just register ioctls; 
reading the very useful links you provided; and following to documents 
they link to, I've got a modified driver to publish enough ioctls to get 
iwconfig and KWireless to recognise it, although KWifiManager is not 
particularly happy about the result (it acknowledges the interface, but 
says it is not present).

Basically, because it is a wireless WAN adaptor, as opposed to a 
wireless LAN adaptor, almost *all* of the wireless ioctl functions do 
not apply to our device and so will have to be set to NULL or to return 
-EOPNOTSUPP.

Looking at KWifiManager for instance, almost every field in the 
configurations setup dialog in not applicable to our device.

I'll get all the information/ioclts that makes sense working before 
posting any remaining problems to the appropriate developers (KWireless, 
KWifiManager, etc).

> Is this the KWireless in the kdenetwork packages? Last time I talked 
> to Mirko Boehm[5], he was the maintainer of it.
>   
Yes it is, and the 'Help | About' lists Mirko as the maintainer. 
However, it does not list an email address, and the date is shown as 
2003, so I felt it better to ask for more recent information. Thanks for 
your link!
> Have fun coding :-)
>
> Stefan
>
> [1]http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Linux.Wireless.Extensions.html 
>
> [2]http://kwifimanager.sourceforge.net
> [3]man:iwconfig
> [4]http://bugs.kde.org/wizard.cgi?package=kwifimanager
> [5]mailto:mirko@kde.org
>
>   

Thank you again for the links - invaluable!

Have a great holiday time, and a Merry Christmas, if that is appropriate.

And yes, the coding is proving to be most enjoyable. :o)

Cheers!
Nik

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic