int8_t rssi;
} __attribute__ ((packed));
+#define BT_HCI_EVT_LE_CHAN_SELECT_ALG 0x14
+struct bt_hci_evt_le_chan_select_alg {
+ uint16_t handle;
+ uint8_t algorithm;
+} __attribute__ ((packed));
+
#define BT_HCI_ERR_SUCCESS 0x00
#define BT_HCI_ERR_UNKNOWN_COMMAND 0x01
#define BT_HCI_ERR_UNKNOWN_CONN_ID 0x02
period, period_frac);
}
+static void print_le_channel_select_alg(uint8_t alg)
+{
+ const char *str;
+
+ switch (alg) {
+ case 0x00:
+ str = "LE Channel Selection Algorithm #1";
+ break;
+ case 0x01:
+ str = "LE Channel Selection Algorithm #2";
+ break;
+ default:
+ str = "Reserved";
+ break;
+ }
+
+ print_field("%s (0x%2.2x)", str, alg);
+}
+
void packet_hexdump(const unsigned char *buf, uint16_t len)
{
static const char hexdigits[] = "0123456789abcdef";
packet_hexdump(data + sizeof(*evt), size - sizeof(*evt));
}
+static void le_chan_select_alg_evt(const void *data, uint8_t size)
+{
+ const struct bt_hci_evt_le_chan_select_alg *evt = data;
+
+ print_handle(evt->handle);
+ print_le_channel_select_alg(evt->algorithm);
+}
+
struct subevent_data {
uint8_t subevent;
const char *str;
{ 0x11, "LE Scan Timeout" },
{ 0x12, "LE Advertising Set Terminated" },
{ 0x13, "LE Scan Request Received" },
- { 0x14, "LE Channel Selection Algorithm" },
+ { 0x14, "LE Channel Selection Algorithm",
+ le_chan_select_alg_evt, 3, true},
{ }
};