staging: rtl8192u: move debug files to debugfs
authorTong Zhang <ztong0001@gmail.com>
Sat, 30 Jul 2022 03:33:23 +0000 (20:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Aug 2022 13:13:27 +0000 (15:13 +0200)
commitc5682c05b26215592faa97deeec896454179169b
tree3eb3fe2adb2c510c5fc44ba913c082e95b55251e
parent626d28e9becadb8e9b7cc66ec93184b671edf175
staging: rtl8192u: move debug files to debugfs

There are 4 debug files created under /proc/net/[Devname].
Due to this is purely for debuging as files are created read only,
move this to debugfs like other NIC drivers do instead of using procfs.
The directory structure will be like the following

  /sys/kernel/debug/r8192u_usb/wlan0/stats-rx
  /sys/kernel/debug/r8192u_usb/wlan0/stats-rx
  /sys/kernel/debug/r8192u_usb/wlan0/stats-ap
  /sys/kernel/debug/r8192u_usb/wlan0/registers

This is also to prepare for address rmmod warn issue.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Link: https://lore.kernel.org/r/20220730033335.74153-4-ztong0001@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/Makefile
drivers/staging/rtl8192u/r8192U.h
drivers/staging/rtl8192u/r8192U_core.c
drivers/staging/rtl8192u/r8192U_debugfs.c [moved from drivers/staging/rtl8192u/r8192U_procfs.c with 70% similarity]