Bluetooth: controller: Release term event memory on timeout

Release memory allocated to ext adv terminate event, after timeout

Signed-off-by: Dag Bjarvin <Dag.Bjarvin@nordicsemi.no>
This commit is contained in:
Dag Bjarvin 2020-07-01 10:54:18 +02:00 committed by Carles Cufí
commit 46a622837d
3 changed files with 15 additions and 18 deletions

View file

@ -3604,12 +3604,12 @@ static void le_adv_ext_terminate(struct pdu_data *pdu_data,
}
sep = meta_evt(buf, BT_HCI_EVT_LE_ADV_SET_TERMINATED, sizeof(*sep));
sep->status = ((uint32_t)node_rx->hdr.rx_ftr.extra >> 8) & 0xff;
sep->adv_handle = (node_rx->hdr.handle & 0xff);
sep->conn_handle =
sys_cpu_to_le16(*(uint16_t *)node_rx->hdr.rx_ftr.param);
sep->num_completed_ext_adv_evts =
(uint8_t)((uint32_t)node_rx->hdr.rx_ftr.extra & 0xff);
sep->status = ((uint32_t)node_rx->hdr.rx_ftr.extra >> 8) & 0xff;
sep->adv_handle = (node_rx->hdr.handle & 0xff);
sep->conn_handle = sys_cpu_to_le16
(*(uint16_t *)((uint32_t)node_rx->hdr.rx_ftr.extra >> 16));
}
#endif /* CONFIG_BT_CTLR_ADV_EXT */
#endif /* CONFIG_BT_OBSERVER */
@ -4326,6 +4326,7 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx)
case NODE_RX_TYPE_EXT_1M_REPORT:
case NODE_RX_TYPE_EXT_2M_REPORT:
case NODE_RX_TYPE_EXT_CODED_REPORT:
case NODE_RX_TYPE_EXT_ADV_TERMINATE:
#endif /* CONFIG_BT_CTLR_ADV_EXT */
#endif /* CONFIG_BT_OBSERVER */
@ -4353,10 +4354,6 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx)
case NODE_RX_TYPE_MESH_REPORT:
#endif /* CONFIG_BT_HCI_MESH_EXT */
#if defined(CONFIG_BT_CTLR_ADV_EXT)
/* fallthrough */
case NODE_RX_TYPE_EXT_ADV_TERMINATE:
#endif /* CONFIG_BT_CTLR_ADV_EXT */
#if defined(CONFIG_BT_CONN)
case NODE_RX_TYPE_CONNECTION: