Bluetooth: controller: Add flow control logging
When Controller to Host flow control is enabled, output informational messages for certain operations to help tune and debug the feature. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
8a7eeeb7f1
commit
ff2a85a587
2 changed files with 6 additions and 1 deletions
|
@ -257,6 +257,7 @@ static void host_buffer_size(struct net_buf *buf, struct net_buf **evt)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BT_DBG("FC: host buf size: %d", acl_pkts);
|
||||||
hci_hbuf_total = -acl_pkts;
|
hci_hbuf_total = -acl_pkts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -284,6 +285,7 @@ static void host_num_completed_packets(struct net_buf *buf,
|
||||||
count += sys_le16_to_cpu(cmd->h[i].count);
|
count += sys_le16_to_cpu(cmd->h[i].count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BT_DBG("FC: acked: %d", count);
|
||||||
hci_hbuf_acked += count;
|
hci_hbuf_acked += count;
|
||||||
k_poll_signal(hbuf_signal, 0x0);
|
k_poll_signal(hbuf_signal, 0x0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,6 +165,7 @@ static inline struct net_buf *process_node(struct radio_pdu_node_rx *node_rx)
|
||||||
if (pend || !hbuf_count) {
|
if (pend || !hbuf_count) {
|
||||||
sys_slist_append(&hbuf_pend,
|
sys_slist_append(&hbuf_pend,
|
||||||
&node_rx->hdr.onion.node);
|
&node_rx->hdr.onion.node);
|
||||||
|
BT_DBG("FC: Queuing item: %d", class);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -210,10 +211,12 @@ static inline struct net_buf *process_hbuf(void)
|
||||||
class = hci_get_class(node_rx);
|
class = hci_get_class(node_rx);
|
||||||
switch (class) {
|
switch (class) {
|
||||||
case HCI_CLASS_EVT_CONNECTION:
|
case HCI_CLASS_EVT_CONNECTION:
|
||||||
|
BT_DBG("FC: dequeueing event");
|
||||||
node = sys_slist_get(&hbuf_pend);
|
node = sys_slist_get(&hbuf_pend);
|
||||||
break;
|
break;
|
||||||
case HCI_CLASS_ACL_DATA:
|
case HCI_CLASS_ACL_DATA:
|
||||||
if (hbuf_count) {
|
if (hbuf_count) {
|
||||||
|
BT_DBG("FC: dequeueing ACL data");
|
||||||
node = sys_slist_get(&hbuf_pend);
|
node = sys_slist_get(&hbuf_pend);
|
||||||
hbuf_count--;
|
hbuf_count--;
|
||||||
} else {
|
} else {
|
||||||
|
@ -247,7 +250,7 @@ static inline struct net_buf *process_hbuf(void)
|
||||||
/* more to process, schedule an
|
/* more to process, schedule an
|
||||||
* iteration
|
* iteration
|
||||||
*/
|
*/
|
||||||
|
BT_DBG("FC: signalling");
|
||||||
k_poll_signal(&hbuf_signal, 0x0);
|
k_poll_signal(&hbuf_signal, 0x0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue