diff options
author | Christophe Ricard <christophe.ricard@gmail.com> | 2014-09-13 04:28:48 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-09-23 20:02:23 -0400 |
commit | fa0daa02fb063ecef39b7d421c3d9c4109381dc2 (patch) | |
tree | ac2ab17b963525db7a603f2f7d4cd1397211a7a1 /drivers/nfc | |
parent | 4294e32040b5142824f420d4a3ae604b92f1d1b5 (diff) |
NFC: st21nfcb: Fix improper ndlc T2 management
T2 was never started when sending a command.
Start it when sending a command for the first attempt
and stop it once we receive the answer.
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/st21nfcb/ndlc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/nfc/st21nfcb/ndlc.c b/drivers/nfc/st21nfcb/ndlc.c index 83c97c36112b..e7bff8921d11 100644 --- a/drivers/nfc/st21nfcb/ndlc.c +++ b/drivers/nfc/st21nfcb/ndlc.c | |||
@@ -112,6 +112,10 @@ static void llt_ndlc_send_queue(struct llt_ndlc *ndlc) | |||
112 | ndlc->t1_active = true; | 112 | ndlc->t1_active = true; |
113 | mod_timer(&ndlc->t1_timer, time_sent + | 113 | mod_timer(&ndlc->t1_timer, time_sent + |
114 | msecs_to_jiffies(NDLC_TIMER_T1)); | 114 | msecs_to_jiffies(NDLC_TIMER_T1)); |
115 | /* start timer t2 for chip availability */ | ||
116 | ndlc->t2_active = true; | ||
117 | mod_timer(&ndlc->t2_timer, time_sent + | ||
118 | msecs_to_jiffies(NDLC_TIMER_T2)); | ||
115 | } | 119 | } |
116 | } | 120 | } |
117 | 121 | ||
@@ -207,7 +211,7 @@ static void llt_ndlc_sm_work(struct work_struct *work) | |||
207 | ndlc->t2_active = false; | 211 | ndlc->t2_active = false; |
208 | ndlc->t1_active = false; | 212 | ndlc->t1_active = false; |
209 | del_timer_sync(&ndlc->t1_timer); | 213 | del_timer_sync(&ndlc->t1_timer); |
210 | 214 | del_timer_sync(&ndlc->t2_timer); | |
211 | ndlc_close(ndlc); | 215 | ndlc_close(ndlc); |
212 | ndlc->hard_fault = -EREMOTEIO; | 216 | ndlc->hard_fault = -EREMOTEIO; |
213 | } | 217 | } |