You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2020/01/07 20:06:59 UTC

[mynewt-nimble] 02/05: nimble/ll: Add 'ignored' flag to ble_hdr flags

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit a05e3b52cab5277a5a3c3619285f11a732b6c776
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Thu Jan 2 09:39:19 2020 +0100

    nimble/ll: Add 'ignored' flag to ble_hdr flags
    
    This flag will be used by scanner to indicate that PDU is not valid and
    shall be simply ignored. It's pretty much the same as failed CRC, but it
    should be easier to debug if we have separate flags for both cases.
---
 nimble/include/nimble/ble.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nimble/include/nimble/ble.h b/nimble/include/nimble/ble.h
index 09b0743..02c3de4 100644
--- a/nimble/include/nimble/ble.h
+++ b/nimble/include/nimble/ble.h
@@ -82,6 +82,7 @@ struct ble_mbuf_hdr_rxinfo
 };
 
 /* Flag definitions for rxinfo  */
+#define BLE_MBUF_HDR_F_IGNORED          (0x8000)
 #define BLE_MBUF_HDR_F_SCAN_REQ_TXD     (0x4000)
 #define BLE_MBUF_HDR_F_INITA_RESOLVED   (0x2000)
 #define BLE_MBUF_HDR_F_EXT_ADV_SEC      (0x1000)
@@ -115,6 +116,9 @@ struct ble_mbuf_hdr
     uint32_t rem_usecs;
 };
 
+#define BLE_MBUF_HDR_IGNORED(hdr) \
+    (!!((hdr)->rxinfo.flags & BLE_MBUF_HDR_F_IGNORED))
+
 #define BLE_MBUF_HDR_SCAN_REQ_TXD(hdr) \
     (!!((hdr)->rxinfo.flags & BLE_MBUF_HDR_F_SCAN_REQ_TXD))