0001
0002
0003
0004
0005 #ifndef __RTW_DEBUG_H
0006 #define __RTW_DEBUG_H
0007
0008 enum rtw_debug_mask {
0009 RTW_DBG_PCI = 0x00000001,
0010 RTW_DBG_TX = 0x00000002,
0011 RTW_DBG_RX = 0x00000004,
0012 RTW_DBG_PHY = 0x00000008,
0013 RTW_DBG_FW = 0x00000010,
0014 RTW_DBG_EFUSE = 0x00000020,
0015 RTW_DBG_COEX = 0x00000040,
0016 RTW_DBG_RFK = 0x00000080,
0017 RTW_DBG_REGD = 0x00000100,
0018 RTW_DBG_DEBUGFS = 0x00000200,
0019 RTW_DBG_PS = 0x00000400,
0020 RTW_DBG_BF = 0x00000800,
0021 RTW_DBG_WOW = 0x00001000,
0022 RTW_DBG_CFO = 0x00002000,
0023 RTW_DBG_PATH_DIV = 0x00004000,
0024 RTW_DBG_ADAPTIVITY = 0x00008000,
0025 RTW_DBG_HW_SCAN = 0x00010000,
0026 RTW_DBG_STATE = 0x00020000,
0027
0028 RTW_DBG_ALL = 0xffffffff
0029 };
0030
0031 #ifdef CONFIG_RTW88_DEBUGFS
0032
0033 void rtw_debugfs_init(struct rtw_dev *rtwdev);
0034 void rtw_debugfs_get_simple_phy_info(struct seq_file *m);
0035
0036 #else
0037
0038 static inline void rtw_debugfs_init(struct rtw_dev *rtwdev) {}
0039
0040 #endif
0041
0042 #ifdef CONFIG_RTW88_DEBUG
0043
0044 __printf(3, 4)
0045 void __rtw_dbg(struct rtw_dev *rtwdev, enum rtw_debug_mask mask,
0046 const char *fmt, ...);
0047
0048 #define rtw_dbg(rtwdev, a...) __rtw_dbg(rtwdev, ##a)
0049
0050 #else
0051
0052 static inline void rtw_dbg(struct rtw_dev *rtwdev, enum rtw_debug_mask mask,
0053 const char *fmt, ...) {}
0054
0055 #endif
0056
0057 #define rtw_info(rtwdev, a...) dev_info(rtwdev->dev, ##a)
0058 #define rtw_warn(rtwdev, a...) dev_warn(rtwdev->dev, ##a)
0059 #define rtw_err(rtwdev, a...) dev_err(rtwdev->dev, ##a)
0060
0061 #endif