Bluetooth: Controller: Fix to use non-discardable buffer
Fix to use non-discardable Rx buffer for handling Extended
and Periodic Advertising Report.
Regression introduced in
commit 18171bc774
("Bluetooth: Host: Non-discardable event
buffer size is 255 for ext adv"). The default discardable Rx
buffer size was reduced causing increased fragmentation and
deadlock trying to get more free discardable Rx buffers to
generate HCI Extended and Periodic Advertising reports.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
bbf8564aa1
commit
230f4f1c1b
1 changed files with 13 additions and 18 deletions
|
@ -190,12 +190,6 @@ static uint32_t conn_count;
|
|||
static uint32_t cis_pending_count;
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_BT_HCI_RAW) && defined(CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT)
|
||||
#define ADV_REPORT_EVT_MAX_LEN CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE
|
||||
#else
|
||||
#define ADV_REPORT_EVT_MAX_LEN CONFIG_BT_BUF_EVT_RX_SIZE
|
||||
#endif
|
||||
|
||||
/* In HCI event PHY indices start at 1 compare to 0 indexed in aux_ptr field in
|
||||
* the Common Extended Payload Format in the PDUs.
|
||||
*/
|
||||
|
@ -6186,7 +6180,7 @@ no_ext_hdr:
|
|||
|
||||
/* HCI fragment */
|
||||
evt_buf = buf;
|
||||
data_len_max = ADV_REPORT_EVT_MAX_LEN -
|
||||
data_len_max = CONFIG_BT_BUF_EVT_RX_SIZE -
|
||||
sizeof(struct bt_hci_evt_le_meta_event) -
|
||||
sizeof(struct bt_hci_evt_le_ext_advertising_report) -
|
||||
sizeof(struct bt_hci_evt_le_ext_advertising_info);
|
||||
|
@ -6535,7 +6529,7 @@ no_ext_hdr:
|
|||
accept = ftr->sync_rx_enabled;
|
||||
}
|
||||
|
||||
data_len_max = ADV_REPORT_EVT_MAX_LEN -
|
||||
data_len_max = CONFIG_BT_BUF_EVT_RX_SIZE -
|
||||
sizeof(struct bt_hci_evt_le_meta_event) -
|
||||
sizeof(struct bt_hci_evt_le_per_advertising_report);
|
||||
data_len_total = node_rx->hdr.rx_ftr.aux_data_len;
|
||||
|
@ -7668,13 +7662,6 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx)
|
|||
defined(CONFIG_BT_CTLR_PROFILE_ISR)
|
||||
#if defined(CONFIG_BT_OBSERVER)
|
||||
case NODE_RX_TYPE_REPORT:
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||
__fallthrough;
|
||||
case NODE_RX_TYPE_EXT_1M_REPORT:
|
||||
case NODE_RX_TYPE_EXT_2M_REPORT:
|
||||
case NODE_RX_TYPE_EXT_CODED_REPORT:
|
||||
#endif /* CONFIG_BT_CTLR_ADV_EXT */
|
||||
#endif /* CONFIG_BT_OBSERVER */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_SCAN_REQ_NOTIFY)
|
||||
|
@ -7703,6 +7690,7 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx)
|
|||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||
#if defined(CONFIG_BT_BROADCASTER)
|
||||
case NODE_RX_TYPE_EXT_ADV_TERMINATE:
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_ISO)
|
||||
case NODE_RX_TYPE_BIG_COMPLETE:
|
||||
case NODE_RX_TYPE_BIG_TERMINATE:
|
||||
|
@ -7710,11 +7698,12 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx)
|
|||
#endif /* CONFIG_BT_BROADCASTER */
|
||||
|
||||
#if defined(CONFIG_BT_OBSERVER)
|
||||
__fallthrough;
|
||||
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_SCAN_TERMINATE:
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_SYNC_PERIODIC)
|
||||
__fallthrough;
|
||||
case NODE_RX_TYPE_SYNC:
|
||||
case NODE_RX_TYPE_SYNC_REPORT:
|
||||
case NODE_RX_TYPE_SYNC_LOST:
|
||||
|
@ -7724,7 +7713,6 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx)
|
|||
#endif /* CONFIG_BT_CTLR_DF_SCAN_CTE_RX */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_SYNC_ISO)
|
||||
__fallthrough;
|
||||
case NODE_RX_TYPE_SYNC_ISO:
|
||||
case NODE_RX_TYPE_SYNC_ISO_LOST:
|
||||
#endif /* CONFIG_BT_CTLR_SYNC_ISO */
|
||||
|
@ -7744,9 +7732,11 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx)
|
|||
#if defined(CONFIG_BT_CTLR_CONN_ISO)
|
||||
case NODE_RX_TYPE_CIS_ESTABLISHED:
|
||||
#endif /* CONFIG_BT_CTLR_CONN_ISO */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_RX)
|
||||
case NODE_RX_TYPE_CONN_IQ_SAMPLE_REPORT:
|
||||
#endif /* CONFIG_BT_CTLR_DF_CONN_CTE_RX */
|
||||
|
||||
return HCI_CLASS_EVT_REQUIRED;
|
||||
|
||||
case NODE_RX_TYPE_TERMINATE:
|
||||
|
@ -7759,17 +7749,22 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx)
|
|||
#if defined(CONFIG_BT_CTLR_CONN_RSSI_EVENT)
|
||||
case NODE_RX_TYPE_RSSI:
|
||||
#endif /* CONFIG_BT_CTLR_CONN_RSSI_EVENT */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_LE_PING)
|
||||
case NODE_RX_TYPE_APTO:
|
||||
#endif /* CONFIG_BT_CTLR_LE_PING */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_CHAN_SEL_2)
|
||||
case NODE_RX_TYPE_CHAN_SEL_ALGO:
|
||||
#endif /* CONFIG_BT_CTLR_CHAN_SEL_2 */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_PHY)
|
||||
case NODE_RX_TYPE_PHY_UPDATE:
|
||||
#endif /* CONFIG_BT_CTLR_PHY */
|
||||
|
||||
return HCI_CLASS_EVT_CONNECTION;
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_SYNC_ISO) || defined(CONFIG_BT_CTLR_CONN_ISO)
|
||||
case NODE_RX_TYPE_ISO_PDU:
|
||||
return HCI_CLASS_ISO_DATA;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue