diff options
author | Eric Lapuyade <eric.lapuyade@intel.com> | 2012-05-02 13:23:11 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-10 00:42:05 +0400 |
commit | 5018e490c372d5ed0e0ced2f2471140bf5ba9b32 (patch) | |
tree | c773de1723b9b9020f0b5a08bb8665c7c8a49ae5 /net/nfc/hci | |
parent | d3b404453192aa195ccfb2f0d946f880b16f8b1f (diff) | |
download | linux-5018e490c372d5ed0e0ced2f2471140bf5ba9b32.tar.xz |
NFC: Handle SHDLC RSET frames from an SHDLC connected chip
shdlc reset may leave HCI in an inconsistent state by loosing parts of
HCI frames. Handle this case by reporting an unrecoverable error to HCI.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc/hci')
-rw-r--r-- | net/nfc/hci/shdlc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/nfc/hci/shdlc.c b/net/nfc/hci/shdlc.c index 18d1536df5f6..6f840c18c892 100644 --- a/net/nfc/hci/shdlc.c +++ b/net/nfc/hci/shdlc.c @@ -404,12 +404,12 @@ static void nfc_shdlc_rcv_u_frame(struct nfc_shdlc *shdlc, r = nfc_shdlc_connect_send_ua(shdlc); nfc_shdlc_connect_complete(shdlc, r); } - } else if (shdlc->state > SHDLC_NEGOCIATING) { + } else if (shdlc->state == SHDLC_CONNECTED) { /* - * TODO: Chip wants to reset link - * send ua, empty skb lists, reset counters - * propagate info to HCI layer + * Chip wants to reset link. This is unexpected and + * unsupported. */ + shdlc->hard_fault = -ECONNRESET; } break; case U_FRAME_UA: |