static void bt_submit_sco(struct HCIInfo *info,

                const uint8_t *data, int length)

{

    struct bt_hci_s *hci = hci_from_info(info);

    uint16_t handle;

    int datalen;



    if (length < 3)

        return;



    handle = acl_handle((data[1] << 8) | data[0]);

    datalen = data[2];

    length -= 3;



    if (bt_hci_handle_bad(hci, handle)) {

        fprintf(stderr, "%s: invalid SCO handle %03x\n",

                        __FUNCTION__, handle);

        return;

    }



    if (datalen > length) {

        fprintf(stderr, "%s: SCO packet too short (%iB < %iB)\n",

                        __FUNCTION__, length, datalen);

        return;

    }



    /* TODO */



    /* TODO: increase counter and send EVT_NUM_COMP_PKTS if synchronous

     * Flow Control is enabled.

     * (See Read/Write_Synchronous_Flow_Control_Enable on page 513 and

     * page 514.)  */

}

static void bt_submit_sco(struct HCIInfo *info,

                const uint8_t *data, int length)

{

    struct bt_hci_s *hci = hci_from_info(info);

    uint16_t handle;

    int datalen;



    if (length < 3)

        return;



    handle = acl_handle((data[1] << 8) | data[0]);

    datalen = data[2];

    length -= 3;



    if (bt_hci_handle_bad(hci, handle)) {

        fprintf(stderr, "%s: invalid SCO handle %03x\n",

                        __FUNCTION__, handle);

        return;

    }



    if (datalen > length) {

        fprintf(stderr, "%s: SCO packet too short (%iB < %iB)\n",

                        __FUNCTION__, length, datalen);

        return;

    }



    



    







}

static void FUNC_0(struct HCIInfo *VAR_0,

                const uint8_t *VAR_1, int VAR_2)

{

    struct bt_hci_s *VAR_3 = hci_from_info(VAR_0);

    uint16_t handle;

    int VAR_4;



    if (VAR_2 < 3)

        return;



    handle = acl_handle((VAR_1[1] << 8) | VAR_1[0]);

    VAR_4 = VAR_1[2];

    VAR_2 -= 3;



    if (bt_hci_handle_bad(VAR_3, handle)) {

        fprintf(stderr, "%s: invalid SCO handle %03x\n",

                        __FUNCTION__, handle);

        return;

    }



    if (VAR_4 > VAR_2) {

        fprintf(stderr, "%s: SCO packet too short (%iB < %iB)\n",

                        __FUNCTION__, VAR_2, VAR_4);

        return;

    }



    



    







}

static void FUNC_0(struct HCIInfo *VAR_0,
const uint8_t *VAR_1, int VAR_2)
{ struct bt_hci_s *VAR_3 = hci_from_info(VAR_0); uint16_t handle; int VAR_4; if (VAR_2 < 3)
return; handle = acl_handle((VAR_1[1] << 8) | VAR_1[0]); VAR_4 = VAR_1[2]; VAR_2 -= 3; if (bt_hci_handle_bad(VAR_3, handle)) { fprintf(stderr, "%s: invalid SCO handle %03x\n",
__FUNCTION__, handle); return; } if (VAR_4 > VAR_2) { fprintf(stderr, "%s: SCO packet too short (%iB < %iB)\n",
__FUNCTION__, VAR_2, VAR_4); return; } }