Bluetooth: monitor: Add support for ISO packets

This adds types for TX/RX ISO packets so the likes of btmon can decode
them properly.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2020-05-12 13:11:10 -07:00 committed by Carles Cufí
commit c29e6ffa73

View file

@ -10,21 +10,23 @@
#if defined(CONFIG_BT_DEBUG_MONITOR)
#define BT_MONITOR_NEW_INDEX 0
#define BT_MONITOR_DEL_INDEX 1
#define BT_MONITOR_COMMAND_PKT 2
#define BT_MONITOR_EVENT_PKT 3
#define BT_MONITOR_ACL_TX_PKT 4
#define BT_MONITOR_ACL_RX_PKT 5
#define BT_MONITOR_SCO_TX_PKT 6
#define BT_MONITOR_SCO_RX_PKT 7
#define BT_MONITOR_OPEN_INDEX 8
#define BT_MONITOR_CLOSE_INDEX 9
#define BT_MONITOR_INDEX_INFO 10
#define BT_MONITOR_VENDOR_DIAG 11
#define BT_MONITOR_SYSTEM_NOTE 12
#define BT_MONITOR_USER_LOGGING 13
#define BT_MONITOR_NOP 255
#define BT_MONITOR_NEW_INDEX 0
#define BT_MONITOR_DEL_INDEX 1
#define BT_MONITOR_COMMAND_PKT 2
#define BT_MONITOR_EVENT_PKT 3
#define BT_MONITOR_ACL_TX_PKT 4
#define BT_MONITOR_ACL_RX_PKT 5
#define BT_MONITOR_SCO_TX_PKT 6
#define BT_MONITOR_SCO_RX_PKT 7
#define BT_MONITOR_OPEN_INDEX 8
#define BT_MONITOR_CLOSE_INDEX 9
#define BT_MONITOR_INDEX_INFO 10
#define BT_MONITOR_VENDOR_DIAG 11
#define BT_MONITOR_SYSTEM_NOTE 12
#define BT_MONITOR_USER_LOGGING 13
#define BT_MONITOR_ISO_TX_PKT 18
#define BT_MONITOR_ISO_RX_PKT 19
#define BT_MONITOR_NOP 255
#define BT_MONITOR_TYPE_PRIMARY 0
#define BT_MONITOR_TYPE_AMP 1
@ -84,6 +86,10 @@ static inline uint8_t bt_monitor_opcode(struct net_buf *buf)
return BT_MONITOR_ACL_TX_PKT;
case BT_BUF_ACL_IN:
return BT_MONITOR_ACL_RX_PKT;
case BT_BUF_ISO_OUT:
return BT_MONITOR_ISO_TX_PKT;
case BT_BUF_ISO_IN:
return BT_MONITOR_ISO_RX_PKT;
default:
return BT_MONITOR_NOP;
}