Bluetooth: Add semaphore for counting controller-side ACL buffers

We shouldn't be sending more ACL packets to the controller than it
is capable of accepting. This patch adds a semaphore to track the
number of available controller-side ACL buffers.

Change-Id: Ib280afa06aade68eee03e44e33624eebb700dad5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2015-04-18 11:56:00 +03:00 committed by Anas Nashif
commit f64e3c08b2
2 changed files with 41 additions and 0 deletions

View file

@ -176,4 +176,13 @@ struct bt_hci_evt_cmd_status {
uint16_t opcode;
} PACK_STRUCT;
#define BT_HCI_EVT_NUM_COMPLETED_PACKETS 0x13
struct bt_hci_evt_num_completed_packets {
uint8_t num_handles;
struct {
uint16_t handle;
uint16_t count;
} h[0] PACK_STRUCT;
} PACK_STRUCT;
#endif /* __BT_HCI_H */