This patch adds support for reporting statistics on the operation of the rate control modules via /proc. Currently on the sample rate module actually provides any statistics.
This patch uses the new VAP proc entry support provided by ticket #728 to manage the proc entries. It must not be applied until after the patch from ticket #728 has been committed.
The statistics reported for the sample module were present in the madwifi-old module but did not seem to make it into madwifi-ng. I have made some minor changes to how these statistics are reported:
- Statistics are now reported via /proc entries instead of using sysctls. Sysctls are intended as a method for the user to configure parameters of the module and should not be misued for reporting statistics.
- A new symbol ath_rate_dynamic_proc_register is exported from each rate control module. This function is called by the driver just after a new VAP has been created to allow the rate control module to register the appropriate proc entries. As described in ticket #728, all further management of these entries will be handled by the VAP, which will call the functions supplied by the rate control module to retrieve data when necessary.
The information that this patch adds back into the driver is very useful and is referred to in the documentation at wiki:UserDocs/RateControl which currently causes some confusion when the statistics is not found. The aforementioned page should be updated to reflect that the statistics will now live at /proc/net/madwifi/<ifname>/ratestats_{250,1600,3000} after this patch is applied.
Please apply this patch after you have committed the patch in ticket #728.
Signed-off-by: Matt Brown <matt@mattb.net.nz>