Bluetooth: Remove unused prio pool and buffer helpers
These are no longer used by anything. Change-Id: Ic01467b4fbaae0af29ff5dc537f2e19744170a41 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
d79bdd74e9
commit
533d544d95
2 changed files with 0 additions and 97 deletions
|
@ -63,29 +63,6 @@ enum bt_buf_type {
|
|||
*/
|
||||
struct net_buf *bt_buf_get_rx(int32_t timeout);
|
||||
|
||||
/** Allocate a buffer for an HCI event
|
||||
*
|
||||
* This will set the BT_BUF_EVT buffer type so bt_buf_set_type()
|
||||
* doesn't need to be explicitly called.
|
||||
*
|
||||
* @param opcode HCI event opcode or 0 if not known
|
||||
* @param timeout Timeout in milliseconds, or one of the special values
|
||||
* K_NO_WAIT and K_FOREVER.
|
||||
* @return A new buffer with the BT_BUF_EVT type.
|
||||
*/
|
||||
struct net_buf *bt_buf_get_evt(uint8_t opcode, int32_t timeout);
|
||||
|
||||
/** Allocate a buffer for incoming ACL data
|
||||
*
|
||||
* This will set the BT_BUF_ACL_IN buffer type so bt_buf_set_type()
|
||||
* doesn't need to be explicitly called.
|
||||
*
|
||||
* @param timeout Timeout in milliseconds, or one of the special values
|
||||
* K_NO_WAIT and K_FOREVER.
|
||||
* @return A new buffer with the BT_BUF_ACL_IN type.
|
||||
*/
|
||||
struct net_buf *bt_buf_get_acl(int32_t timeout);
|
||||
|
||||
/** Set the buffer type
|
||||
*
|
||||
* @param buf Bluetooth buffer
|
||||
|
|
|
@ -134,28 +134,6 @@ NET_BUF_POOL_DEFINE(hci_cmd_pool, CONFIG_BLUETOOTH_HCI_CMD_COUNT,
|
|||
NET_BUF_POOL_DEFINE(hci_rx_pool, CONFIG_BLUETOOTH_RX_BUF_COUNT,
|
||||
BT_BUF_RX_SIZE, BT_BUF_USER_DATA_MIN, NULL);
|
||||
|
||||
/*
|
||||
* This priority pool is to handle HCI events that must not be dropped
|
||||
* (currently this is Command Status, Command Complete and Number of
|
||||
* Complete Packets) if running low on buffers. Buffers from this pool are not
|
||||
* allowed to be passed to RX thread and must be returned from bt_recv(). Since
|
||||
* the HCI ECC emulation is able to also allocate command status events
|
||||
* we need to reserve one extra buffer for it.
|
||||
*/
|
||||
|
||||
/* The worst case event length, Read Local Supported Commands Complete:
|
||||
* 2 (HCI evt hdr) + 3 (cmd complete hdr) + 65 (parameters) = 70.
|
||||
*/
|
||||
#define PRIO_EVT_SIZE (CONFIG_BLUETOOTH_HCI_RECV_RESERVE + 70)
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_TINYCRYPT_ECC)
|
||||
NET_BUF_POOL_DEFINE(hci_evt_prio_pool, 2, PRIO_EVT_SIZE,
|
||||
BT_BUF_USER_DATA_MIN, NULL);
|
||||
#else
|
||||
NET_BUF_POOL_DEFINE(hci_evt_prio_pool, 1, PRIO_EVT_SIZE,
|
||||
BT_BUF_USER_DATA_MIN, NULL);
|
||||
#endif
|
||||
|
||||
static struct tc_hmac_prng_struct prng;
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_DEBUG)
|
||||
|
@ -3454,15 +3432,6 @@ static inline void handle_event(struct net_buf *buf)
|
|||
break;
|
||||
#endif /* CONFIG_BLUETOOTH_CONN */
|
||||
default:
|
||||
/*
|
||||
* If buffer used is from priority pool we are running low on
|
||||
* buffers and those needs to be kept for 'critical' events
|
||||
* handled directly from bt_recv().
|
||||
*/
|
||||
if (buf->pool == &hci_evt_prio_pool) {
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_RECV_IS_RX_THREAD)
|
||||
hci_event(net_buf_ref(buf));
|
||||
#else
|
||||
|
@ -3975,49 +3944,6 @@ int bt_le_scan_stop(void)
|
|||
return bt_le_scan_update(false);
|
||||
}
|
||||
|
||||
struct net_buf *bt_buf_get_evt(uint8_t opcode, int32_t timeout)
|
||||
{
|
||||
struct net_buf *buf;
|
||||
|
||||
switch (opcode) {
|
||||
case BT_HCI_EVT_CMD_COMPLETE:
|
||||
case BT_HCI_EVT_CMD_STATUS:
|
||||
case BT_HCI_EVT_NUM_COMPLETED_PACKETS:
|
||||
buf = net_buf_alloc(&hci_evt_prio_pool, timeout);
|
||||
break;
|
||||
default:
|
||||
buf = net_buf_alloc(&hci_rx_pool, K_NO_WAIT);
|
||||
if (!buf && opcode == 0x00) {
|
||||
buf = net_buf_alloc(&hci_evt_prio_pool, timeout);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (buf) {
|
||||
net_buf_reserve(buf, CONFIG_BLUETOOTH_HCI_RECV_RESERVE);
|
||||
bt_buf_set_type(buf, BT_BUF_EVT);
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
struct net_buf *bt_buf_get_acl(int32_t timeout)
|
||||
{
|
||||
#if defined(CONFIG_BLUETOOTH_CONN)
|
||||
struct net_buf *buf;
|
||||
|
||||
buf = net_buf_alloc(&hci_rx_pool, timeout);
|
||||
if (buf) {
|
||||
net_buf_reserve(buf, CONFIG_BLUETOOTH_HCI_RECV_RESERVE);
|
||||
bt_buf_set_type(buf, BT_BUF_ACL_IN);
|
||||
}
|
||||
|
||||
return buf;
|
||||
#else
|
||||
return NULL;
|
||||
#endif /* CONFIG_BLUETOOTH_CONN */
|
||||
}
|
||||
|
||||
struct net_buf *bt_buf_get_rx(int32_t timeout)
|
||||
{
|
||||
struct net_buf *buf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue