aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/nci/rsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/nfc/nci/rsp.c')
-rw-r--r--net/nfc/nci/rsp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/nfc/nci/rsp.c b/net/nfc/nci/rsp.c
index 3c73e92eb625..cb8bce6899cf 100644
--- a/net/nfc/nci/rsp.c
+++ b/net/nfc/nci/rsp.c
@@ -137,7 +137,7 @@ static void nci_rf_disc_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)
137 pr_debug("status 0x%x\n", status); 137 pr_debug("status 0x%x\n", status);
138 138
139 if (status == NCI_STATUS_OK) 139 if (status == NCI_STATUS_OK)
140 set_bit(NCI_DISCOVERY, &ndev->flags); 140 atomic_set(&ndev->state, NCI_DISCOVERY);
141 141
142 nci_req_complete(ndev, status); 142 nci_req_complete(ndev, status);
143} 143}
@@ -149,12 +149,12 @@ static void nci_rf_deactivate_rsp_packet(struct nci_dev *ndev,
149 149
150 pr_debug("status 0x%x\n", status); 150 pr_debug("status 0x%x\n", status);
151 151
152 clear_bit(NCI_DISCOVERY, &ndev->flags);
153
154 /* If target was active, complete the request only in deactivate_ntf */ 152 /* If target was active, complete the request only in deactivate_ntf */
155 if ((status != NCI_STATUS_OK) || 153 if ((status != NCI_STATUS_OK) ||
156 (!test_bit(NCI_POLL_ACTIVE, &ndev->flags))) 154 (atomic_read(&ndev->state) != NCI_POLL_ACTIVE)) {
155 atomic_set(&ndev->state, NCI_IDLE);
157 nci_req_complete(ndev, status); 156 nci_req_complete(ndev, status);
157 }
158} 158}
159 159
160void nci_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb) 160void nci_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)