NFC: st21nfca: Implement load_session HCI hook
authorChristophe Ricard <christophe.ricard@gmail.com>
Tue, 25 Mar 2014 05:51:50 +0000 (06:51 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 21 Apr 2014 22:37:26 +0000 (00:37 +0200)
commit58e1e0a920358cd0dd7fdccc8cbcaa1d117078cf
treedb23840b06a3a7faebfc8ad7cb0f3004bab471de
parente240bc36125691b0e18e70407c2d18ca6117c2f5
NFC: st21nfca: Implement load_session HCI hook

This implementation rely on the ST21NFCA_DEVICE_MGNT_GATE and
ST21NFCA_DM_GETINFO proprietary gates commands.

First we are retrieving a pipe list available on the CLF with the
ST21NFCA_DM_GETINFO_PIPE_LIST parameter. A gate<->pipe table match
is done with ST21NFCA_DM_GETINFO_PIPE_INFO for each pipe.
If the pipe is created and open, we fill st21nfca_gates table.
If the pipe is create but closed or is not created we keep the gate
with NFC_HCI_INVALID_PIPE.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/st21nfca/st21nfca.c