From 16e4057a7e3757af038de7d62b80df45899e3a42 Mon Sep 17 00:00:00 2001 From: Ilan Elias Date: Wed, 9 Nov 2011 12:09:16 +0200 Subject: [PATCH] --- yaml --- r: 277833 b: refs/heads/master c: db98c829b70e0a313e627d1c63cf5a7087290e5c h: refs/heads/master i: 277831: e05dc454286594e46d881df03816c59ba631f4c5 v: v3 --- [refs] | 2 +- trunk/include/net/nfc/nci.h | 3 +++ trunk/net/nfc/nci/core.c | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index cbc01233fd0e..70b5ee2a35e8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ee4c64fb984e652c0d49d41d19d1b8e4576c3203 +refs/heads/master: db98c829b70e0a313e627d1c63cf5a7087290e5c diff --git a/trunk/include/net/nfc/nci.h b/trunk/include/net/nfc/nci.h index 0b34fde9b130..cdbe67139343 100644 --- a/trunk/include/net/nfc/nci.h +++ b/trunk/include/net/nfc/nci.h @@ -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 diff --git a/trunk/net/nfc/nci/core.c b/trunk/net/nfc/nci/core.c index 9d0b5305c36e..3dffcb3221cc 100644 --- a/trunk/net/nfc/nci/core.c +++ b/trunk/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),