mirror of
https://github.com/breeze303/nss-packages.git
synced 2025-12-16 16:57:29 +00:00
qca-nss-drv: Avoid recreating debugfs entry virt_if
Everytime a virtual interface is created/destroyed, nss driver tries to create a debugfs entry, without checking if it exists. Prevent creation if it already exists. This will also prevent the annoying kernel warning. 'virt_if' in directory 'stats' already present!
This commit is contained in:
parent
1ce879e50f
commit
123f0c1272
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qca-nss-drv
|
||||
PKG_RELEASE:=6
|
||||
PKG_RELEASE:=7
|
||||
|
||||
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-drv.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
--- a/nss_stats.c
|
||||
+++ b/nss_stats.c
|
||||
@@ -380,8 +380,9 @@ size_t nss_stats_print(char *node, char
|
||||
*/
|
||||
void nss_stats_create_dentry(char *name, const struct file_operations *ops)
|
||||
{
|
||||
- if (!debugfs_create_file(name, 0400, nss_top_main.stats_dentry, &nss_top_main, ops)) {
|
||||
- nss_warning("Failed to create debug entry for subsystem %s\n", name);
|
||||
+ if (!debugfs_lookup(name, nss_top_main.stats_dentry))
|
||||
+ if (!debugfs_create_file(name, 0400, nss_top_main.stats_dentry, &nss_top_main, ops)) {
|
||||
+ nss_warning("Failed to create debug entry for subsystem %s\n", name);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user