Bluetooth: Fix hci_raw's RX buffer alloc
The APIs for allocating RX buffers were modified recently and hci_raw had not reflected those changes properly. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
6183d2bde7
commit
6821df1ef0
1 changed files with 9 additions and 25 deletions
|
@ -47,7 +47,15 @@ int bt_hci_driver_register(const struct bt_hci_driver *drv)
|
|||
|
||||
struct net_buf *bt_buf_get_rx(enum bt_buf_type type, s32_t timeout)
|
||||
{
|
||||
return net_buf_alloc(&hci_rx_pool, timeout);
|
||||
struct net_buf *buf;
|
||||
|
||||
buf = net_buf_alloc(&hci_rx_pool, timeout);
|
||||
|
||||
if (buf) {
|
||||
bt_buf_set_type(buf, type);
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
struct net_buf *bt_buf_get_cmd_complete(s32_t timeout)
|
||||
|
@ -62,30 +70,6 @@ struct net_buf *bt_buf_get_cmd_complete(s32_t timeout)
|
|||
return buf;
|
||||
}
|
||||
|
||||
struct net_buf *bt_buf_get_evt(u8_t opcode, int timeout)
|
||||
{
|
||||
struct net_buf *buf;
|
||||
|
||||
buf = net_buf_alloc(&hci_rx_pool, timeout);
|
||||
if (buf) {
|
||||
bt_buf_set_type(buf, BT_BUF_EVT);
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
struct net_buf *bt_buf_get_acl(s32_t timeout)
|
||||
{
|
||||
struct net_buf *buf;
|
||||
|
||||
buf = net_buf_alloc(&hci_rx_pool, timeout);
|
||||
if (buf) {
|
||||
bt_buf_set_type(buf, BT_BUF_ACL_IN);
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
int bt_recv(struct net_buf *buf)
|
||||
{
|
||||
BT_DBG("buf %p len %u", buf, buf->len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue