Re: replacement for wl1251-cal

2012-08-07 Thread Eero Tamminen

Hi,

On 08/03/2012 11:03 PM, ext Jonathan Wilson wrote:

6.My tool may leak resources (e.g. not closing handles properly) where
the Nokia tool does not (or in some cases the Nokia tool may leak
resources that my tool does not)


AFAIK there are no known leaks with these Nokia tools.

To measure and graph resource usage changes in the whole system,
you can use sp-endurance:
http://wiki.maemo.org/Documentation/devtools/maemo5/sp-endurance
http://wiki.maemo.org/Documentation/devtools/maemo5/sp-endurance-postproc

The docs for the newer Harmattan version are here:
http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Developing_for_Harmattan_Developer_tools_Performance_testing_tools_Using_sp-endurance.html
http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Developing_for_Harmattan_Developer_tools_Performance_testing_tools_Using_sp-endurance-postproc.html


To analyze the leakage... If it's about memory, Valgrind Memcheck
and Massif tools might help you if pointers are lost or leak is large:
http://wiki.maemo.org/Documentation/devtools/maemo5/valgrind

For smaller and non-memory leaks sp-rtrace  functracer are most
likely best alternatives:
http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Developing_for_Harmattan_Developer_tools_Debugging_tools_Using_functracer.html
http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Developing_for_Harmattan_Developer_tools_Debugging_tools_Using_sp-rtrace.html
http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Developing_for_Harmattan_Developer_tools_Debugging_tools_Using_sp-rtrace-visualize.html

Sources for the sp-* tools are here:
https://maemo.gitorious.org/maemo-tools

(Debian/Maemo packaging is typically in the maemo-packaging branch.)


- Eero
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


replacement for wl1251-cal

2012-08-03 Thread Jonathan Wilson
I have written a clone of the Nokia wl1251-cal package (used for setting 
regulatory domain, NVS and MAC address for N900 wl1251 WiFi chip)


Source is available here:
http://www.cncmods.net/files/wl1251-cal_1.0-1.tar.gz
To compile you need libcal-dev and libnl-dev installed.

No .deb file posted because its not intended for people to install this, 
its intended for this code to go into CSSU and other things.


Like my bt-cal work, its intended that this be used for CSSU and also for 
Meego/Mer/Nemo/etc. Its also been written so that someone can modify this 
in some way so that it only uses standard kernel things, thus allowing the 
removal of the non-standard Nokia netlink interfaces. Note that on 
MeeGo/Mer/Nemo/etc if you use this and my bluetooth-cal stuff, you can 
eliminate the libppu-bin, libwl1251-bin, sysinfod-rx51 and wl1251-cal-bin 
packages. On Maemo, you can eliminate bluetooth-sysinfo, wl1251-cal and 
libppu if you are updating mp-blah-pr appropriately. Removing libwl1251 
will force a removal of testserver, whatever that is (no clue if testserver 
is important or not)


Differences from the Nokia tool:
1.It does not use sysinfo, it reads everything directly from cal via libcal.
2.WiFi regulatory domain (FCC vs not FCC) is read from CAL (same place in 
CAL as sysinfo-tool -g /certs/ccc/pp/wlan-channel would get it from) rather 
than being determined based on the current mobile network country code. (if 
you wanted to make it use current MCC it would be easy enough to support on 
Maemo5 at least, dont know about ofono)
3.It doesn't print the same output to stdout when its run as wl1251-cal 
from Nokia (as of now it only prints what it thinks the regulatory domain is)

4.It probably doesn't have the same error handling as the Nokia tool
5.The order that it does the 3 steps (set MAC address, send NVS, set 
regulatory domain) is different to the Nokia tool (easily fixed if 
necessary and I doubt it matters in any case)
6.My tool may leak resources (e.g. not closing handles properly) where the 
Nokia tool does not (or in some cases the Nokia tool may leak resources 
that my tool does not)


It appears to be working (in that I see the right IOCTL being triggered, 
the right MAC address appearing and the right data being sent over netlink 
for regulatory domain and for NVS) but I cant be sure that there are no 
problems with it resulting from the differences between my tool and Nokias.


This will NOT work for any device other than the N900 nor do I have any 
plans to do anything for any device other than the N900.


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers