Skip to content

Commit

Permalink
NFC: NCI: Handle Discovery deactivation type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jlefrique authored and Samuel Ortiz committed Nov 28, 2014
1 parent 966efbf commit 6ff5462
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/nfc/nci/ntf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 6ff5462

Please sign in to comment.