Linux wireless drivers development
 help / color / mirror / Atom feed
From: ilanelias78@gmail.com
To: aloisio.almeida@openbossa.org, lauro.venancio@openbossa.org,
	samuel@sortiz.org, linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, Ilan Elias <ilane@ti.com>
Subject: [PATCH v3 3/3] NFC: Check if NCI data flow control is used
Date: Tue,  1 Nov 2011 14:54:57 +0200	[thread overview]
Message-ID: <1320152097-2711-4-git-send-email-ilane@ti.com> (raw)
In-Reply-To: <1320152097-2711-1-git-send-email-ilane@ti.com>

From: Ilan Elias <ilane@ti.com>

Check if NCI data flow control is used in nci_tx_work.

Signed-off-by: Ilan Elias <ilane@ti.com>
---
 net/nfc/nci/core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 9d0b530..056cd37 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -722,7 +722,9 @@ 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) != 0xff)
+			atomic_dec(&ndev->credits_cnt);
 
 		nfc_dbg("NCI TX: MT=data, PBF=%d, conn_id=%d, plen=%d",
 				nci_pbf(skb->data),
-- 
1.7.0.4


  parent reply	other threads:[~2011-11-01 12:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01 12:54 [PATCH v3 0/3] NFC: update to NCI spec 1.0 draft 18 ilanelias78
2011-11-01 12:54 ` [PATCH v3 1/3] NFC: Update names and structs to NCI spec 1.0 d18 ilanelias78
2011-11-08 22:33   ` Lauro Ramos Venancio
2011-11-09  7:53     ` Elias, Ilan
2011-11-01 12:54 ` [PATCH v3 2/3] NFC: Removal of unused operations for " ilanelias78
2011-11-08 22:35   ` Lauro Ramos Venancio
2011-11-01 12:54 ` ilanelias78 [this message]
2011-11-08 22:38   ` [PATCH v3 3/3] NFC: Check if NCI data flow control is used Lauro Ramos Venancio
2011-11-09  7:54     ` Elias, Ilan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1320152097-2711-4-git-send-email-ilane@ti.com \
    --to=ilanelias78@gmail.com \
    --cc=aloisio.almeida@openbossa.org \
    --cc=ilane@ti.com \
    --cc=lauro.venancio@openbossa.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=samuel@sortiz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox