summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNattharat Jariyanuntanaet <nattharatj@google.com>2024-04-08 08:15:45 +0000
committerNattharat Jariyanuntanaet <nattharatj@google.com>2024-04-09 03:07:02 +0000
commitc033e8fec7788de13b85d54bf37f37b16dae8b04 (patch)
treee9459e46f9f7ba084955ed0d470c961990da4604
parentf4842b843ec264ba9d35ecd038738153a5de5cab (diff)
downloadnfc-master.tar.gz
Capture missing commands by accompanying HAL_WRITEHEADmastermain
Test: manual Bug: 333318221 Change-Id: I652a73b0e7603c36ccf53d1375e240476f475129
-rw-r--r--src/nfc/nfc/nfc_ncif.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nfc/nfc/nfc_ncif.cc b/src/nfc/nfc/nfc_ncif.cc
index fb991ddc..499ebc2a 100644
--- a/src/nfc/nfc/nfc_ncif.cc
+++ b/src/nfc/nfc/nfc_ncif.cc
@@ -299,6 +299,7 @@ void nfc_ncif_check_cmd_queue(NFC_HDR* p_buf) {
nfc_cb.nci_cmd_window--;
/* send to HAL */
+ nfcsnoop_capture(p_buf, false);
HAL_WRITE(p_buf);
/* start NFC command-timeout timer */
nfc_start_timer(&nfc_cb.nci_wait_rsp_timer,
@@ -363,7 +364,6 @@ void nfc_ncif_send_cmd(NFC_HDR* p_buf) {
/* post the p_buf to NCIT task */
p_buf->event = BT_EVT_TO_NFC_NCI;
p_buf->layer_specific = 0;
- nfcsnoop_capture(p_buf, false);
nfc_ncif_check_cmd_queue(p_buf);
}
@@ -404,6 +404,8 @@ bool nfc_ncif_process_event(NFC_HDR* p_msg) {
return free;
}
+ nfcsnoop_capture(p_msg, true);
+
NCI_MSG_PRS_HDR0(p, mt, pbf, gid);
oid = ((*p) & NCI_OID_MASK);
if (nfc_cb.rawVsCbflag == true &&
@@ -413,7 +415,6 @@ bool nfc_ncif_process_event(NFC_HDR* p_msg) {
return free;
}
- nfcsnoop_capture(p_msg, true);
switch (mt) {
case NCI_MT_DATA:
LOG(DEBUG) << StringPrintf("NFC received data");