diff --git a/subsys/bluetooth/host/conn.c b/subsys/bluetooth/host/conn.c index 9aa766096cb..71889493abe 100644 --- a/subsys/bluetooth/host/conn.c +++ b/subsys/bluetooth/host/conn.c @@ -412,14 +412,14 @@ struct bt_conn *bt_conn_add_sco(const bt_addr_t *peer, int link_type) if (link_type == BT_HCI_SCO) { if (BT_FEAT_LMP_ESCO_CAPABLE(bt_dev.features)) { - sco_conn->sco.pkt_type = (bt_dev.esco.pkt_type & + sco_conn->sco.pkt_type = (bt_dev.br.esco_pkt_type & ESCO_PKT_MASK); } else { - sco_conn->sco.pkt_type = (bt_dev.esco.pkt_type & + sco_conn->sco.pkt_type = (bt_dev.br.esco_pkt_type & SCO_PKT_MASK); } } else if (link_type == BT_HCI_ESCO) { - sco_conn->sco.pkt_type = (bt_dev.esco.pkt_type & + sco_conn->sco.pkt_type = (bt_dev.br.esco_pkt_type & ~EDR_ESCO_PKT_MASK); } diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index 3a414bdaeeb..0a3d81e47e5 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -3145,36 +3145,36 @@ void device_supported_pkt_type(void) { /* Device supported features and sco packet types */ if (BT_FEAT_HV2_PKT(bt_dev.features)) { - bt_dev.esco.pkt_type |= (HCI_PKT_TYPE_ESCO_HV2); + bt_dev.br.esco_pkt_type |= (HCI_PKT_TYPE_ESCO_HV2); } if (BT_FEAT_HV3_PKT(bt_dev.features)) { - bt_dev.esco.pkt_type |= (HCI_PKT_TYPE_ESCO_HV3); + bt_dev.br.esco_pkt_type |= (HCI_PKT_TYPE_ESCO_HV3); } if (BT_FEAT_LMP_ESCO_CAPABLE(bt_dev.features)) { - bt_dev.esco.pkt_type |= (HCI_PKT_TYPE_ESCO_EV3); + bt_dev.br.esco_pkt_type |= (HCI_PKT_TYPE_ESCO_EV3); } if (BT_FEAT_EV4_PKT(bt_dev.features)) { - bt_dev.esco.pkt_type |= (HCI_PKT_TYPE_ESCO_EV4); + bt_dev.br.esco_pkt_type |= (HCI_PKT_TYPE_ESCO_EV4); } if (BT_FEAT_EV5_PKT(bt_dev.features)) { - bt_dev.esco.pkt_type |= (HCI_PKT_TYPE_ESCO_EV5); + bt_dev.br.esco_pkt_type |= (HCI_PKT_TYPE_ESCO_EV5); } if (BT_FEAT_2EV3_PKT(bt_dev.features)) { - bt_dev.esco.pkt_type |= (HCI_PKT_TYPE_ESCO_2EV3); + bt_dev.br.esco_pkt_type |= (HCI_PKT_TYPE_ESCO_2EV3); } if (BT_FEAT_3EV3_PKT(bt_dev.features)) { - bt_dev.esco.pkt_type |= (HCI_PKT_TYPE_ESCO_3EV3); + bt_dev.br.esco_pkt_type |= (HCI_PKT_TYPE_ESCO_3EV3); } if (BT_FEAT_3SLOT_PKT(bt_dev.features)) { - bt_dev.esco.pkt_type |= (HCI_PKT_TYPE_ESCO_2EV5 | - HCI_PKT_TYPE_ESCO_3EV5); + bt_dev.br.esco_pkt_type |= (HCI_PKT_TYPE_ESCO_2EV5 | + HCI_PKT_TYPE_ESCO_3EV5); } } diff --git a/subsys/bluetooth/host/hci_core.h b/subsys/bluetooth/host/hci_core.h index e0fe135ed2b..b987423ca8f 100644 --- a/subsys/bluetooth/host/hci_core.h +++ b/subsys/bluetooth/host/hci_core.h @@ -66,14 +66,11 @@ struct bt_dev_le { }; #if defined(CONFIG_BLUETOOTH_BREDR) -struct bt_dev_esco { - u16_t pkt_type; -}; - struct bt_dev_br { /* Max controller's acceptable ACL packet length */ - u16_t mtu; - struct k_sem pkts; + u16_t mtu; + struct k_sem pkts; + u16_t esco_pkt_type; }; #endif @@ -108,7 +105,6 @@ struct bt_dev { #if defined(CONFIG_BLUETOOTH_BREDR) /* BR/EDR controller specific features */ struct bt_dev_br br; - struct bt_dev_esco esco; #endif /* Number of commands controller can accept */