Finally I managed to create the file by debugfs.
With debugfs_create_file("energy", 0777, phyd, &filevalue, &fops_debug);

And now I saw that the method: DEBUGFS_READONLY_FILE(energy, "%d",
local->remain_energy); is not to be run periodically.

So i create a file in /sys/kernel/debug/ieee80211/phy0 but how i can
refresh that value to use in mesh_hwmp.c? Put DEBUGFS_READONLY_FILE in
ALM method calculation? Or exists some debugfs function that runs
periodically?

Thanks,
Carlos Meralto

2015-10-11 2:00 GMT+01:00 Carlos Meralto <[email protected]>:
> Hi again,
>
> 1) In leee80211.s i created a new parameter (int remain_energy)
>
> 2) I created a function in debugfs.c class to read the energy file:
> DEBUGFS_READONLY_FILE(energy, "%d", local->remain_energy);
>
> 3) And finally i get the value in mesh_hwmp.c with local->remain_energy
>
> The module compiles OK. But i can't create a file in
> /sys/kernel/debug/ieee80211/phy0 because i always have the permission
> denied error (enter with sudo, mount /sys/kernel/debug)
> Exist another way to create the file and give the necessary privileges
> to change them after? this process is correct?
>
> Thanks,
> Carlos Meralto
_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

Reply via email to