Commit Graph

3 Commits

Author SHA1 Message Date
Mahesh Kumar Kalikot Veetil
68bb47153d qcacmn: Add debugfs APIs
Add qdf abstraction for debugfs APIs such as create file, create
directory, create types and remove files/directory. If a particular
operating system is not supporting debugfs or similar feature, these
API's will be a no-operation.

Change-Id: I09fe366b85d4914ebdab52d3fb23acab72aa2116
CRs-Fixed: 2097140
2017-10-17 00:07:45 -07:00
Mahesh Kumar Kalikot Veetil
164ecb724a qcacmn: Add QDF file permissions
Add file permissions and a function to map that to Linux OS. Also
define a type for __qdf_dentry_t and __qdf_debugfs_file_t.

Change-Id: I91b293b262d955324e65157909ca9d3b831e2cf6
CRs-Fixed: 2097140
2017-10-17 00:07:43 -07:00
Mahesh Kumar Kalikot Veetil
e79aee03e8 qcacmn: Add debugfs support
Create a root directory for debugfs at
/sys/kernel/debug/KBUILD_MODNAME_qdf/. The module name,
KBUILD_MODNAME, is used in the path to avoid conflict in case of
multiple instances of the same driver.

Any sub module in QDF can use this as the root directory to add
further files of directories. While unloading the driver the exit
routine does a recursive cleanup of any remaining files or
sub directories.

Even though debugfs is a Linux specific feature, a logic which is
related to file system for debugging can be added here.

This feature is protected with a compilation flag WLAN_DEBUGFS.

Change-Id: I21cae38b69f45c22121dfe70fe84f02423a26020
CRs-Fixed: 1083771
2017-01-25 18:32:59 -08:00