Hi,
today I had a talk on IRC with Johannes Berg @ #linux-wireless (see attachment).
I was whole the time wondering why Light-WLAN was showing 50/60 as
Link Quality with an iwl3945 kernel-module under 2.6.30-rcX.
When switching to Linux-kernel 2.6.29 Light-WLAN was reporting 80/90 as value.
So, I misinterpreted it as % and did not read correctly:
$ sudo iwlist wlan0 scan | grep Quality
Quality=59/70 Signal level=-51 dBm
Here is a patch for E-MODULES-EXTRA/wlan.
Notice that I am not considering to check for Linux kernel-release.
Kind Regards,
Sedat
[...]
[12:35:26] <dileX__> another question: my signal-quality is since switching to
wl (2.6.30-rcX) on 60% with kernel 2.6.29 it is 80%.
[12:35:36] <dileX__> so I tried different channels
[12:35:55] <dileX__> different encryption wpa wpa2
[12:36:20] <dileX__> any idea?
[12:36:25] <johill> you mean Link Quality?
[12:37:14] <johill> with .29 that would be 80/100, and with .30 60/70, that
seems well within regular fluctuations
[12:37:59] <dileX__> Quality=59/70 Signal level=-51 dBm
[12:38:13] <johill> right, so what are you using to display the signal quality?
[12:38:48] <dileX__> $ sudo iwlist wlan0 scan | grep Quality
[12:38:48] <dileX__> Quality=59/70 Signal level=-51 dBm
[12:39:10] <johill> well then the problem is that you're not reading it
correctly
[12:39:16] <johill> it's not % and never was
[12:40:06] <johill> just in .29 we were using /100 and now we changed to /70
for technical reasons
[12:40:35] <dileX__> hehe
[12:40:56] <-- schmidtm ([email protected]) has quit
(Read error: 113 (No route to host))
[12:41:15] <dileX__> OK, than its my wlan-module (systray) in e17 lying :-)
[12:41:43] -*- johill tries to find the code
[12:41:55] <dileX__> ...or mis-interpreting (and me blind)
[12:43:34] <johill> what's the app called?
[12:45:46] <dileX__> hmm, thats the only the theme "Light Wlan"
<http://www0.get-e.org/Themes/Modules/Wlan/>
[12:46:46] <johill> this code seems correct:
http://trac.enlightenment.org/e/browser/trunk/e/src/modules/illume/wifiget.c
[12:47:30] <dileX__> hmm, dsns-resolution is somehow slow here
[12:48:45] <dileX__> not sure if it is wifiget.c, so I thought wlan-module is
from E-MODULES-EXTRA
[12:48:49] <johill>
http://trac.enlightenment.org/e/browser/trunk/E-MODULES-EXTRA/wlan
[12:49:12] <dileX__> thx for the web-link
[12:49:23] <johill> ah
[12:49:30] <johill> that just uses /proc/net/wireless
[12:49:40] <johill> which doesn't tell it that it's /70 rather than /100
[12:49:42] <johill> and it assumes /100
[12:49:55] <johill> so, but in that
[12:49:57] <johill> bug
[12:51:34] <dileX__> OK
[12:52:18] <dileX__> dont know if I am able to solve it in a "Dreisatz" (dont
know the english term, sry)
[12:52:46] <johill> "rule of proportion"
[12:53:17] <johill> but, umm, you just need to do
(100*current_from_kernel)/max_from_kernel
[...]
-SD // 03-Jun-2009
--- e_mod_main.c.orig 2009-06-03 17:48:31.000000000 +0200
+++ e_mod_main.c 2009-06-03 18:02:16.396062626 +0200
@@ -427,6 +427,8 @@
int wlan_link = 0;
int wlan_level = 0;
int wlan_noise = 0;
+ int current_wlan_link = 0;
+ const int max_wlan_link = 70;
char omsg[100];
char in_str[100];
@@ -466,13 +468,15 @@
snprintf(in_str, sizeof(in_str), "LNK: %d%%", wlan_link);
- double link_send = ((double)wlan_link / (double)100.0);
+ double link_send = ((double)wlan_link / (double)max_wlan_link);
double level_send = ((double)wlan_level / (double)100.0);
_wlan_update_qual(inst, link_send);
_wlan_update_level (inst, level_send);
-
- snprintf(omsg,sizeof(omsg),"Qual: %d%%", wlan_link);
+
+ current_wlan_link = ((100 * wlan_link) / max_wlan_link);
+
+ snprintf(omsg,sizeof(omsg),"Qual: %d%%", current_wlan_link);
edje_object_part_text_set(inst->wlan_obj, "qual_label", omsg);
snprintf(omsg,sizeof(omsg),"Lvl: %d%%", wlan_level);
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel