Repository: incubator-mynewt-core Updated Branches: refs/heads/upf54 60a7b59b1 -> eb7e415fc
Add statistic to count received l2cap bytes at LL Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/eb7e415f Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/eb7e415f Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/eb7e415f Branch: refs/heads/upf54 Commit: eb7e415fc569ed51417e4828ff0aa610af563c45 Parents: 60a7b59 Author: William San Filippo <wi...@runtime.io> Authored: Mon Jun 6 14:18:29 2016 -0700 Committer: William San Filippo <wi...@runtime.io> Committed: Mon Jun 6 14:56:02 2016 -0700 ---------------------------------------------------------------------- net/nimble/controller/src/ble_ll_conn.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/eb7e415f/net/nimble/controller/src/ble_ll_conn.c ---------------------------------------------------------------------- diff --git a/net/nimble/controller/src/ble_ll_conn.c b/net/nimble/controller/src/ble_ll_conn.c index 57fcdc2..77d2452 100644 --- a/net/nimble/controller/src/ble_ll_conn.c +++ b/net/nimble/controller/src/ble_ll_conn.c @@ -172,6 +172,7 @@ STATS_SECT_START(ble_ll_conn_stats) STATS_SECT_ENTRY(l2cap_enqueued) STATS_SECT_ENTRY(rx_ctrl_pdus) STATS_SECT_ENTRY(rx_l2cap_pdus) + STATS_SECT_ENTRY(rx_l2cap_bytes) STATS_SECT_ENTRY(rx_malformed_ctrl_pdus) STATS_SECT_ENTRY(rx_bad_llid) STATS_SECT_ENTRY(tx_ctrl_pdus) @@ -201,6 +202,7 @@ STATS_NAME_START(ble_ll_conn_stats) STATS_NAME(ble_ll_conn_stats, l2cap_enqueued) STATS_NAME(ble_ll_conn_stats, rx_ctrl_pdus) STATS_NAME(ble_ll_conn_stats, rx_l2cap_pdus) + STATS_NAME(ble_ll_conn_stats, rx_l2cap_bytes) STATS_NAME(ble_ll_conn_stats, rx_malformed_ctrl_pdus) STATS_NAME(ble_ll_conn_stats, rx_bad_llid) STATS_NAME(ble_ll_conn_stats, tx_ctrl_pdus) @@ -2445,8 +2447,9 @@ ble_ll_conn_rx_data_pdu(struct os_mbuf *rxpdu, struct ble_mbuf_hdr *hdr) STATS_INC(ble_ll_conn_stats, rx_malformed_ctrl_pdus); } } else { - /* Count # of data frames */ + /* Count # of received l2cap frames and byes */ STATS_INC(ble_ll_conn_stats, rx_l2cap_pdus); + STATS_INCN(ble_ll_conn_stats, rx_l2cap_bytes, acl_len); /* NOTE: there should be at least two bytes available */ assert(OS_MBUF_LEADINGSPACE(rxpdu) >= 2);