@@ -885,6 +885,8 @@ struct mgmt_ev_new_long_term_key {
struct mgmt_ltk_info key;
} __packed;
+#define MGMT_DEV_CONN_DIRECTION_OUT 0x01
+
#define MGMT_EV_DEVICE_CONNECTED 0x000B
struct mgmt_ev_device_connected {
struct mgmt_addr_info addr;
@@ -8772,6 +8772,11 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
bacpy(&ev->addr.bdaddr, &conn->dst);
ev->addr.type = link_to_bdaddr(conn->type, conn->dst_type);
+ if (conn->out)
+ flags |= MGMT_DEV_CONN_DIRECTION_OUT;
+ else
+ flags &= ~MGMT_DEV_CONN_DIRECTION_OUT;
+
ev->flags = __cpu_to_le32(flags);
/* We must ensure that the EIR Data fields are ordered and