aboutsummaryrefslogtreecommitdiff
path: root/drivers/nfc/st-nci
AgeCommit message (Collapse)Author
2015-08-17nfc: st-nci: Remove pr_err in rcv_queue when ndlc header is unknownChristophe Ricard
spi phy needs to use ndlc_recv at every spi transaction causing "unknown packet control byte" error message each time the header is 00. Make this silent. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-08-17nfc: st-nci: Add spi phy support for st21nfcbChristophe Ricard
st21nfcb does support another phy than i2c: spi. st21nfcc does not support spi as the spi ios are used by the AMS RF booster. st21nfcb is not following NCI NFC Forum recommendations for spi but rely on ST prioritary protocol ndlc as for i2c. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-08-17nfc: st-nci: Free data with irrelevant NDLC PCB_SYNC valueChristophe Ricard
PCB_SYNC different than PCB_TYPE_SUPERVISOR or PCB_TYPE_DATAFRAME should be discarded. Irrelevant data may be forwarded up to the ndlc state machine by phys like spi to prevent missing potential data during "write" transactions. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-08-17nfc: st-nci: Remove data from ack_pending_q when receiving a SYNC_ACKChristophe Ricard
When receiving a NDLC PCB_SYNC_ACK the pending data was never removed from ack_pending_q and cleared. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-08-17NFC: st-nci: fix use of uninitialized variables in error pathChristophe Ricard
st_nci_hci_load_session() calls kfree_skb() on unitialized variables skb_pipe_info and skb_pipe_list if the call to nci_hci_connect_gate() failed. Reword the error path to not use these variables when they are not initialized. While at it, there seemed to be a memory leak because skb_pipe_info was only freed once, after the for-loop, even though several ones were created by nci_hci_send_cmd. Cc: stable@vger.kernel.org Acked-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-08-17nfc: st-nci: Fix non accurate comment for st_nci_i2c_readChristophe Ricard
Due to a copy and paste error st_nci_i2c_read still contains st21nfca header comment. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-08-17nfc: st-nci: Fix typo when changing from st21nfcb to st-nciChristophe Ricard
Replace ST21NFCB with ST_NCI or st21nfcb with st_nci as it was forgotten in commit "nfc: st-nci: Rename st21nfcb to st-nci" ed06aeefdac348cfb91a3db5fe1067e3202afd70 Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-08-17nfc: st-nci: Remove duplicate file platform_data/st_nci.hChristophe Ricard
commit "nfc: st-nci: Rename st21nfcb to st-nci" adds include/linux/platform_data/st_nci.h duplicated with include/linux/platform_data/st-nci.h. Only drivers/nfc/st-nci/i2c.c uses platform_data/st_nci.h. Cc: stable@vger.kernel.org Reported-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-06-10nfc: st-nci: Rename st21nfcb to st-nciChristophe Ricard
STMicroelectronics NFC NCI chips family is extending with the new ST21NFCC using the AMS AS39230 RF booster. The st21nfcb driver is relevant for this solution and might be with future products. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>