diff options
author | Julien Lefrique <lefrique@marvell.com> | 2014-10-21 16:52:52 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-11-28 14:07:51 +0100 |
commit | 6ff5462b678db88fa35fda9016d53c32f18eed5f (patch) | |
tree | c3e1196faad45fe6c0c86ba9e469f52f2ec7d839 | |
parent | 966efbfb0dc06bc90131ea41aa4be67c0d22853d (diff) | |
download | linux-6ff5462b678db88fa35fda9016d53c32f18eed5f.tar.gz linux-6ff5462b678db88fa35fda9016d53c32f18eed5f.tar.bz2 linux-6ff5462b678db88fa35fda9016d53c32f18eed5f.zip |
NFC: NCI: Handle Discovery deactivation type
When the deactivation type reported by RF_DEACTIVATE_NTF is Discovery, go in
RFST_DISCOVERY state. The NFCC stays in Poll mode and/or Listen mode.
Signed-off-by: Julien Lefrique <lefrique@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | net/nfc/nci/ntf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c index 46b2a90ac55a..8d337aa0cf52 100644 --- a/net/nfc/nci/ntf.c +++ b/net/nfc/nci/ntf.c @@ -681,7 +681,10 @@ static void nci_rf_deactivate_ntf_packet(struct nci_dev *ndev, nci_data_exchange_complete(ndev, NULL, -EIO); nci_clear_target_list(ndev); - atomic_set(&ndev->state, NCI_IDLE); + if (ntf->type == NCI_DEACTIVATE_TYPE_DISCOVERY) + atomic_set(&ndev->state, NCI_DISCOVERY); + else + atomic_set(&ndev->state, NCI_IDLE); nci_req_complete(ndev, NCI_STATUS_OK); } |