kaloz / mwlwifi

mac80211 driver for the Marvell 88W8864 802.11ac chip
396 stars 119 forks source link

Use dynamic debug (wiphy_dbg) for debug messages #398

Closed iitalics closed 1 year ago

iitalics commented 3 years ago

The wiphy_debug macro expands to dev_printk, which doesn't give any way to control debugging output. This patch changes all uses of wiphy_debug to wiphy_dbg, which will use dynamic debug if it is enabled. This allows users to dynamically control the behavior of debugging output through debugfs or through module parameters.

For example:

echo 'module mwlwifi +p' > /sys/kernel/debug/dynamic_debug/control  # enable debug logging from mwlwifi
modprobe mwlwifi dyndbg=+p # alternative to above
echo 'module mwlwifi =_' > /sys/kernel/debug/dynamic_debug/control  # disable debug logging