From: Ilan Elias <ilane@xxxxxx> Check if NCI data flow control is used in nci_tx_work. Signed-off-by: Ilan Elias <ilane@xxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html