From c4bf98b220cba7a8618405261d69ee53a265110e Mon Sep 17 00:00:00 2001 From: Ilan Elias Date: Tue, 17 Jan 2012 12:03:50 +0200 Subject: NFC: Add NCI data exchange timer Add NCI data exchange timer to catch timeouts, and call the data exchange callback with an error. Signed-off-by: Ilan Elias Acked-by: Samuel Ortiz Signed-off-by: John W. Linville --- include/net/nfc/nci_core.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h index f4963ea7794..9154663b606 100644 --- a/include/net/nfc/nci_core.h +++ b/include/net/nfc/nci_core.h @@ -41,6 +41,7 @@ enum { NCI_DISCOVERY, NCI_POLL_ACTIVE, NCI_DATA_EXCHANGE, + NCI_DATA_EXCHANGE_TO, }; /* NCI timeouts */ @@ -49,6 +50,7 @@ enum { #define NCI_RF_DISC_TIMEOUT 5000 #define NCI_RF_DEACTIVATE_TIMEOUT 30000 #define NCI_CMD_TIMEOUT 5000 +#define NCI_DATA_TIMEOUT 700 struct nci_dev; @@ -74,6 +76,7 @@ struct nci_dev { atomic_t credits_cnt; struct timer_list cmd_timer; + struct timer_list data_timer; struct workqueue_struct *cmd_wq; struct work_struct cmd_work; -- cgit v1.2.3