aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>2012-09-20 02:59:11 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-09-24 18:17:27 -0400
commit9010e39f508ee57dc9a7675073659cb9d019a802 (patch)
tree05945183ec2c8dc0c323f2c502fa7e7516bace38 /net/nfc
parent96e324024b421b3753eb142d5d92fbe4ac5e7519 (diff)
NFC: Handle RSET in SHDLC_CONNECTING state
As queue_work() does not guarantee immediate execution of sm_work it can happen in crossover RSET usecase that connect timer will constantly change the shdlc state from NEGOTIATING to CONNECTING before shdlc has chance to handle incoming frame. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Acked-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/hci/llc_shdlc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/nfc/hci/llc_shdlc.c b/net/nfc/hci/llc_shdlc.c
index d54bfc51c693..a7931c7c57f2 100644
--- a/net/nfc/hci/llc_shdlc.c
+++ b/net/nfc/hci/llc_shdlc.c
@@ -414,7 +414,8 @@ static void llc_shdlc_rcv_u_frame(struct llc_shdlc *shdlc,
414 414
415 switch (u_frame_modifier) { 415 switch (u_frame_modifier) {
416 case U_FRAME_RSET: 416 case U_FRAME_RSET:
417 if (shdlc->state == SHDLC_NEGOCIATING) { 417 if ((shdlc->state == SHDLC_NEGOCIATING) ||
418 (shdlc->state == SHDLC_CONNECTING)) {
418 /* we sent RSET, but chip wants to negociate */ 419 /* we sent RSET, but chip wants to negociate */
419 if (skb->len > 0) 420 if (skb->len > 0)
420 w = skb->data[0]; 421 w = skb->data[0];