diff options
author | Ilan Elias <ilane@ti.com> | 2012-01-17 11:03:50 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 20:21:55 +0100 |
commit | c4bf98b220cba7a8618405261d69ee53a265110e (patch) | |
tree | 2710efffaefc519f0d08f116ba669b1648aaab4a /net/nfc/nci/data.c | |
parent | mac80211: clean up rate control code (diff) | |
download | linux-c4bf98b220cba7a8618405261d69ee53a265110e.tar.xz linux-c4bf98b220cba7a8618405261d69ee53a265110e.zip |
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 <ilane@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/nci/data.c')
-rw-r--r-- | net/nfc/nci/data.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c index e5756b30e602..7880ae924d5e 100644 --- a/net/nfc/nci/data.c +++ b/net/nfc/nci/data.c @@ -44,6 +44,10 @@ void nci_data_exchange_complete(struct nci_dev *ndev, pr_debug("len %d, err %d\n", skb ? skb->len : 0, err); + /* data exchange is complete, stop the data timer */ + del_timer_sync(&ndev->data_timer); + clear_bit(NCI_DATA_EXCHANGE_TO, &ndev->flags); + if (cb) { ndev->data_exchange_cb = NULL; ndev->data_exchange_cb_context = 0; |