User Tools

Site Tools


en:users:drivers:ath10k:codingstyle

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
en:users:drivers:ath10k:codingstyle [2018/04/12 13:37]
Kalle Valo Move Linux coding style and checking code sections to the beginning of the page
en:users:drivers:ath10k:codingstyle [2018/04/13 11:11]
Kalle Valo Add section for debug messages
Line 146: Line 146:
  ​*/</​code>​  ​*/</​code>​
  
 +==== Debug messages ====
 +
 +Use ath10k_dbg() or ath10k_dbg_dump().
 +
 +The format string for ath10k_dbg() should start with debug level followed by name of the command or event and then parameters. All uppercase and no commas, colons or periods.
 +
 +Examples:
 +
 +<​code>​ath10k_dbg(ar,​ ATH10K_DBG_BOOT,​ "boot suspend complete\n"​);​
 +
 +ath10k_dbg(ar,​ ATH10K_DBG_WMI,​ "wmi mgmt tx skb %pK len %d ftype %02x stype %02x\n",​
 +    msdu, skb->​len,​ fc & IEEE80211_FCTL_FTYPE,​
 +    fc & IEEE80211_FCTL_STYPE);​
 +
 +ath10k_dbg(ar,​ ATH10K_DBG_MAC,​ "mac update sta %pM peer bw %d\n",
 +    ​sta->​addr,​ bw);
 +</​code>​
 ==== Things NOT to do ==== ==== Things NOT to do ====
  
en/users/drivers/ath10k/codingstyle.txt ยท Last modified: 2024/05/05 04:24 by Kalle Valo