Bluetooth: Use bt_buf_get_rx in hci_ecc.c
There's no need to use the type-specific helpers since those anyway map to the same pool. Change-Id: I74750f545c989bb921abca58166fe591ed325856 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
95049fb99b
commit
8f766efc2f
1 changed files with 6 additions and 15 deletions
|
@ -75,11 +75,8 @@ static void send_cmd_status(uint16_t opcode, uint8_t status)
|
|||
|
||||
BT_DBG("opcode %x status %x", opcode, status);
|
||||
|
||||
buf = bt_buf_get_evt(BT_HCI_EVT_CMD_STATUS, K_FOREVER);
|
||||
if (!buf) {
|
||||
BT_ERR("No available event buffers!");
|
||||
return;
|
||||
}
|
||||
buf = bt_buf_get_rx(K_FOREVER);
|
||||
bt_buf_set_type(buf, BT_BUF_EVT);
|
||||
|
||||
hdr = net_buf_add(buf, sizeof(*hdr));
|
||||
hdr->evt = BT_HCI_EVT_CMD_STATUS;
|
||||
|
@ -137,11 +134,8 @@ static void emulate_le_p256_public_key_cmd(struct net_buf *buf)
|
|||
|
||||
send_cmd_status(BT_HCI_OP_LE_P256_PUBLIC_KEY, 0);
|
||||
|
||||
buf = bt_buf_get_evt(BT_HCI_EVT_LE_META_EVENT, K_FOREVER);
|
||||
if (!buf) {
|
||||
BT_ERR("No available event buffers!");
|
||||
return;
|
||||
}
|
||||
buf = bt_buf_get_rx(K_FOREVER);
|
||||
bt_buf_set_type(buf, BT_BUF_EVT);
|
||||
|
||||
hdr = net_buf_add(buf, sizeof(*hdr));
|
||||
hdr->evt = BT_HCI_EVT_LE_META_EVENT;
|
||||
|
@ -178,11 +172,8 @@ static void emulate_le_generate_dhkey(struct net_buf *buf)
|
|||
|
||||
net_buf_unref(buf);
|
||||
|
||||
buf = bt_buf_get_evt(BT_HCI_EVT_LE_META_EVENT, K_FOREVER);
|
||||
if (!buf) {
|
||||
BT_ERR("No available event buffers!");
|
||||
return;
|
||||
}
|
||||
buf = bt_buf_get_rx(K_FOREVER);
|
||||
bt_buf_set_type(buf, BT_BUF_EVT);
|
||||
|
||||
hdr = net_buf_add(buf, sizeof(*hdr));
|
||||
hdr->evt = BT_HCI_EVT_LE_META_EVENT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue