aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/digital_dep.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/nfc/digital_dep.c')
-rw-r--r--net/nfc/digital_dep.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/nfc/digital_dep.c b/net/nfc/digital_dep.c
index 171cb9949ab5..e1638dab076d 100644
--- a/net/nfc/digital_dep.c
+++ b/net/nfc/digital_dep.c
@@ -457,12 +457,10 @@ static void digital_tg_recv_dep_req(struct nfc_digital_dev *ddev, void *arg,
457 pr_err("Received a ACK/NACK PDU\n"); 457 pr_err("Received a ACK/NACK PDU\n");
458 rc = -EINVAL; 458 rc = -EINVAL;
459 goto exit; 459 goto exit;
460 break;
461 case DIGITAL_NFC_DEP_PFB_SUPERVISOR_PDU: 460 case DIGITAL_NFC_DEP_PFB_SUPERVISOR_PDU:
462 pr_err("Received a SUPERVISOR PDU\n"); 461 pr_err("Received a SUPERVISOR PDU\n");
463 rc = -EINVAL; 462 rc = -EINVAL;
464 goto exit; 463 goto exit;
465 break;
466 } 464 }
467 465
468 skb_pull(resp, size); 466 skb_pull(resp, size);
@@ -673,6 +671,7 @@ void digital_tg_recv_atr_req(struct nfc_digital_dev *ddev, void *arg,
673 int rc; 671 int rc;
674 struct digital_atr_req *atr_req; 672 struct digital_atr_req *atr_req;
675 size_t gb_len, min_size; 673 size_t gb_len, min_size;
674 u8 poll_tech_count;
676 675
677 if (IS_ERR(resp)) { 676 if (IS_ERR(resp)) {
678 rc = PTR_ERR(resp); 677 rc = PTR_ERR(resp);
@@ -730,12 +729,16 @@ void digital_tg_recv_atr_req(struct nfc_digital_dev *ddev, void *arg,
730 goto exit; 729 goto exit;
731 730
732 gb_len = resp->len - sizeof(struct digital_atr_req); 731 gb_len = resp->len - sizeof(struct digital_atr_req);
732
733 poll_tech_count = ddev->poll_tech_count;
734 ddev->poll_tech_count = 0;
735
733 rc = nfc_tm_activated(ddev->nfc_dev, NFC_PROTO_NFC_DEP_MASK, 736 rc = nfc_tm_activated(ddev->nfc_dev, NFC_PROTO_NFC_DEP_MASK,
734 NFC_COMM_PASSIVE, atr_req->gb, gb_len); 737 NFC_COMM_PASSIVE, atr_req->gb, gb_len);
735 if (rc) 738 if (rc) {
739 ddev->poll_tech_count = poll_tech_count;
736 goto exit; 740 goto exit;
737 741 }
738 ddev->poll_tech_count = 0;
739 742
740 rc = 0; 743 rc = 0;
741exit: 744exit: