diff options
author | Ilan Elias <ilane@ti.com> | 2011-11-09 11:09:16 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-11 18:32:50 +0100 |
commit | db98c829b70e0a313e627d1c63cf5a7087290e5c (patch) | |
tree | ddf1c3982c0a07ece89355675efd4464475cac57 /net/nfc/nci | |
parent | NFC: Removal of unused operations for NCI spec 1.0 d18 (diff) | |
download | linux-db98c829b70e0a313e627d1c63cf5a7087290e5c.tar.xz linux-db98c829b70e0a313e627d1c63cf5a7087290e5c.zip |
NFC: Check if NCI data flow control is used
Check if NCI data flow control is used in nci_tx_work.
Signed-off-by: Ilan Elias <ilane@ti.com>
Acked-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/nci')
-rw-r--r-- | net/nfc/nci/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index 9d0b5305c36e..3dffcb3221cc 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c @@ -722,7 +722,10 @@ static void nci_tx_work(struct work_struct *work) if (!skb) return; - atomic_dec(&ndev->credits_cnt); + /* 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", nci_pbf(skb->data), |