提交 db98c829 编写于 作者: I Ilan Elias 提交者: John W. Linville

NFC: Check if NCI data flow control is used

Check if NCI data flow control is used in nci_tx_work.
Signed-off-by: NIlan Elias <ilane@ti.com>
Acked-by: NLauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 ee4c64fb
......@@ -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
......
......@@ -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),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册