Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db98c829 authored by Ilan Elias's avatar Ilan Elias Committed by John W. Linville
Browse files

NFC: Check if NCI data flow control is used



Check if NCI data flow control is used in nci_tx_work.

Signed-off-by: default avatarIlan Elias <ilane@ti.com>
Acked-by: default avatarLauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ee4c64fb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -108,6 +108,9 @@
/* NCI Static RF connection ID */
#define NCI_STATIC_RF_CONN_ID					0x00

/* NCI Data Flow Control */
#define NCI_DATA_FLOW_CONTROL_NOT_USED				0xff

/* NCI RF_DISCOVER_MAP_CMD modes */
#define NCI_DISC_MAP_MODE_POLL					0x01
#define NCI_DISC_MAP_MODE_LISTEN				0x02
+4 −1
Original line number Diff line number Diff line
@@ -722,6 +722,9 @@ static void nci_tx_work(struct work_struct *work)
		if (!skb)
			return;

		/* Check if data flow control is used */
		if (atomic_read(&ndev->credits_cnt) !=
				NCI_DATA_FLOW_CONTROL_NOT_USED)
			atomic_dec(&ndev->credits_cnt);

		nfc_dbg("NCI TX: MT=data, PBF=%d, conn_id=%d, plen=%d",