You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2016/06/06 21:18:55 UTC

incubator-mynewt-core git commit: Add statistic to count received l2cap bytes at LL

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop a3e7ae6d0 -> d42eddc47


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/d42eddc4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/d42eddc4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/d42eddc4

Branch: refs/heads/develop
Commit: d42eddc47836f50ea4879c7c6bcdc67f4d1d393d
Parents: a3e7ae6
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:18:44 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/d42eddc4/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);