Bluetooth: Split buffers into separate pools
In order to do proper flow control of ACL data to/from the controller we need to have precise management of the available buffers. Mixing with the events/commands buffers would make this impossible. This patch splits the buffer pools into three separate ones: 1. HCI commands/events 2. Incoming ACL data 3. Outgoing ACL data The total number of available buffers is also increased to match what's the smallest number supported by current controllers (to avoid the stack from becoming a bottle neck). Change-Id: I7e131d61c83a4dda554068d7917c5ee09f2f837d Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
d829fe9755
commit
b6804df02e
3 changed files with 76 additions and 13 deletions
|
@ -91,7 +91,10 @@ size_t bt_buf_headroom(struct bt_buf *buf);
|
|||
/* Return pointer to the end of the data in the buffer */
|
||||
#define bt_buf_tail(buf) ((buf)->data + (buf)->len)
|
||||
|
||||
/* Initialize the buffers */
|
||||
void bt_buf_init(void);
|
||||
/* Initialize the buffers with specified amount of incoming and outgoing
|
||||
* ACL buffers. The HCI command and event buffers will be allocated from
|
||||
* whatever is left over.
|
||||
*/
|
||||
int bt_buf_init(int acl_in, int acl_out);
|
||||
|
||||
#endif /* __BT_BUF_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue