qcacmn: Add debugfs support for DBR ring debug

For each DBR ring, add debugfs entry to dump at real-time the ring
parameters like head, tail index, the timestamps at which a buffer is
received and replenished. Issues that are specific to tail index
movement from the target can be identified with this debugfs entry.

CRs-Fixed: 2466514
Change-Id: Iafbc61726264464212cb783a1cce46e16b8a48ff
Этот коммит содержится в:
Shwetha G K
2019-10-25 14:18:27 +05:30
коммит произвёл nshrivas
родитель 215bac70f5
Коммит 29121213c8
6 изменённых файлов: 627 добавлений и 49 удалений

Просмотреть файл

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -240,6 +240,43 @@ void qdf_debugfs_remove_dir(qdf_dentry_t d);
*/
void qdf_debugfs_remove_file(qdf_dentry_t d);
/**
* qdf_debugfs_create_file_simplified() - Create a simple debugfs file
* where a single function call produces all the desired output
* @name: name of the file
* @mode: qdf file mode
* @parent: parent node. If NULL, defaults to base 'qdf_debugfs_root'
* @fops: file operations { .show, .write , .priv... }
*
* Users just have to define the show() function and pass it via @fops.show()
* argument. When the output time comes, the show() will be called once.
* The show() function must do everything that is needed to write the data,
* all in one function call.
* This is useful either for writing small amounts of data to debugfs or
* for cases in which the output is not iterative.
* The private data can be passed via @fops.priv, which will be available
* inside the show() function as the 'private' filed of the qdf_debugfs_file_t.
*
* Return: dentry structure pointer in case of success, otherwise NULL.
*
*/
qdf_dentry_t qdf_debugfs_create_file_simplified(const char *name, uint16_t mode,
qdf_dentry_t parent,
struct qdf_debugfs_fops *fops);
/**
* qdf_debugfs_printer() - Print formated string into debugfs file
* @priv: The private data
* @fmt: Format string
* @...: arguments for the format string
*
* This function prints a new line character after printing the formatted
* string into the debugfs file.
* This function can be passed when the argument is of type qdf_abstract_print
*/
int qdf_debugfs_printer(void *priv, const char *fmt, ...);
#else /* WLAN_DEBUGFS */
static inline QDF_STATUS qdf_debugfs_init(void)
@@ -333,5 +370,18 @@ static inline void qdf_debugfs_remove_dir_recursive(qdf_dentry_t d) {}
static inline void qdf_debugfs_remove_dir(qdf_dentry_t d) {}
static inline void qdf_debugfs_remove_file(qdf_dentry_t d) {}
static inline
qdf_dentry_t qdf_debugfs_create_file_simplified(const char *name, uint16_t mode,
qdf_dentry_t parent,
struct qdf_debugfs_fops *fops)
{
return NULL;
}
static inline
int qdf_debugfs_printer(void *priv, const char *fmt, ...)
{
return 0;
}
#endif /* WLAN_DEBUGFS */
#endif /* _QDF_DEBUGFS_H */