4.11 Controlling Debug Log Levels for the WILCS02 Driver

The WILCS02 driver inherits the debug logs levels from Linux. To manage these debug levels, the user can follow any of the following procedures:
  • Changing the system debug level
  • Using debugfs to control specific debug regions

Changing the System Debug Level

  • The user can change the debug level by executing the following command”
    #echo "7" > /proc/sys/kernel/printk
    Note: Where, “7” is the highest desired log level.
  • The following command sets the debug level:
    # dmesg -n 7
  • To change the default log level while building the kernel, the user can modify the following line in kernel_src/include/linux/printk.h.
    #define CONSOLE_LOGLEVEL_DEFAULT 7

Using debugfs to Control Debug Regions

The WILCS02 driver also uses debugfs to allow the user to control which code regions have enabled or disabled logs. The following are the steps to manage debug regions.
  1. The user must mount the debugfs using the following command:
    # mount -t debugfs nodev /sys/kernel/debug
  2. Echo a number that represents a bit field of the regions to enable logs from. The bit field is defined as follows:
    BIT 0: GENERIC					
    BIT 1: HOSTAPD
    BIT 2: HOSTINF
    BIT 3: CORECONFIG
    BIT 4: CFG80211
    BIT 5: INT
    BIT 6: TX
    BIT 7: RX
    BIT 8: TCP
    BIT 9: INIT
    BIT 10: PWRDEV