diff --git a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp index 3c0aecf883..54094c91dd 100644 --- a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp +++ b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp @@ -664,7 +664,7 @@ device_control(void* cookie, uint32 msg, void* params, size_t size) // EVENTS err = submit_rx_event(bdev); if (err != B_OK) { - CLEAR_BIT(bdev->state, ANCILLYANT); + bdev->state = CLEAR_BIT(bdev->state, ANCILLYANT); flowf("Queuing failed device stops running\n"); break; } @@ -673,14 +673,15 @@ device_control(void* cookie, uint32 msg, void* params, size_t size) for (i = 0; i < MAX_ACL_IN_WINDOW; i++) { err = submit_rx_acl(bdev); if (err != B_OK && i == 0) { - CLEAR_BIT(bdev->state, ANCILLYANT); // Set the flaq in the HCI world + bdev->state = CLEAR_BIT(bdev->state, ANCILLYANT); + // Set the flaq in the HCI world flowf("Queuing failed device stops running\n"); break; } } #endif - SET_BIT(bdev->state, RUNNING); + bdev->state = SET_BIT(bdev->state, RUNNING); #if BT_DRIVER_SUPPORTS_SCO // TODO: SCO / eSCO diff --git a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2upper.cpp b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2upper.cpp index fac20e09cd..8f3850973d 100644 --- a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2upper.cpp +++ b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2upper.cpp @@ -16,11 +16,11 @@ #include "snet_buffer.h" #define BT_DEBUG_THIS_MODULE -#include +#include // TODO: split for commands and comunication (ACL & SCO) -void +void sched_tx_processing(bt_usb_dev* bdev) { net_buffer* nbuf; @@ -36,7 +36,7 @@ sched_tx_processing(bt_usb_dev* bdev) /* Do while this bit is on... so someone should set it before we * stop the iterations */ - CLEAR_BIT(bdev->state, SENDING); + bdev->state = CLEAR_BIT(bdev->state, SENDING); // check Commands #ifdef EMPTY_COMMAND_QUEUE while (!list_is_empty(&bdev->nbuffersTx[BT_COMMAND])) { @@ -66,7 +66,7 @@ sched_tx_processing(bt_usb_dev* bdev) err = submit_tx_acl(bdev, nbuf); if (err != B_OK) { // re-head it - list_insert_item_before(&bdev->nbuffersTx[BT_ACL], + list_insert_item_before(&bdev->nbuffersTx[BT_ACL], list_get_first_item(&bdev->nbuffersTx[BT_ACL]), nbuf); } @@ -77,19 +77,19 @@ sched_tx_processing(bt_usb_dev* bdev) } } while (GET_BIT(bdev->state, SENDING)); - - CLEAR_BIT(bdev->state, PROCESSING); + + bdev->state = CLEAR_BIT(bdev->state, PROCESSING); } else { // We are processing so MARK that we need to still go on with that - SET_BIT(bdev->state, SENDING); + bdev->state = SET_BIT(bdev->state, SENDING); } } #if 0 // DEPRECATED -status_t +status_t post_packet_up(bt_usb_dev* bdev, bt_packet_t type, void* buf) { status_t err = B_ERROR;