aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/nci/ntf.c
diff options
context:
space:
mode:
authorIlan Elias <ilane@ti.com>2012-01-18 06:16:12 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:32:28 -0500
commit8939e47fc953cce6ef53e79e9ff9b53319d1a72d (patch)
treefba0ffe539b4d6937bfb2bd9986fe989917b8039 /net/nfc/nci/ntf.c
parent6d810f10325522cfcf498dc6d64b9f96e1f5153f (diff)
NFC: Clearly separate NCI states from flags
Make a clear separation between NCI states and flags. This is required in order to support more NCI states (e.g. for multiple targets support). Signed-off-by: Ilan Elias <ilane@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/nci/ntf.c')
-rw-r--r--net/nfc/nci/ntf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c
index a88be91e973f..8ec39464cea5 100644
--- a/net/nfc/nci/ntf.c
+++ b/net/nfc/nci/ntf.c
@@ -261,8 +261,7 @@ static void nci_rf_intf_activated_ntf_packet(struct nci_dev *ndev,
261 __u8 *data = skb->data; 261 __u8 *data = skb->data;
262 int err = 0; 262 int err = 0;
263 263
264 clear_bit(NCI_DISCOVERY, &ndev->flags); 264 atomic_set(&ndev->state, NCI_POLL_ACTIVE);
265 set_bit(NCI_POLL_ACTIVE, &ndev->flags);
266 265
267 ntf.rf_discovery_id = *data++; 266 ntf.rf_discovery_id = *data++;
268 ntf.rf_interface = *data++; 267 ntf.rf_interface = *data++;
@@ -350,7 +349,7 @@ static void nci_rf_deactivate_ntf_packet(struct nci_dev *ndev,
350 349
351 pr_debug("entry, type 0x%x, reason 0x%x\n", ntf->type, ntf->reason); 350 pr_debug("entry, type 0x%x, reason 0x%x\n", ntf->type, ntf->reason);
352 351
353 clear_bit(NCI_POLL_ACTIVE, &ndev->flags); 352 atomic_set(&ndev->state, NCI_IDLE);
354 ndev->target_active_prot = 0; 353 ndev->target_active_prot = 0;
355 354
356 /* drop tx data queue */ 355 /* drop tx data queue */