diff options
author | Eric Lapuyade <eric.lapuyade@intel.com> | 2012-05-02 05:23:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-09 16:42:05 -0400 |
commit | 5018e490c372d5ed0e0ced2f2471140bf5ba9b32 (patch) | |
tree | c773de1723b9b9020f0b5a08bb8665c7c8a49ae5 /net | |
parent | d3b404453192aa195ccfb2f0d946f880b16f8b1f (diff) |
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')
-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, | |||
404 | r = nfc_shdlc_connect_send_ua(shdlc); | 404 | r = nfc_shdlc_connect_send_ua(shdlc); |
405 | nfc_shdlc_connect_complete(shdlc, r); | 405 | nfc_shdlc_connect_complete(shdlc, r); |
406 | } | 406 | } |
407 | } else if (shdlc->state > SHDLC_NEGOCIATING) { | 407 | } else if (shdlc->state == SHDLC_CONNECTED) { |
408 | /* | 408 | /* |
409 | * TODO: Chip wants to reset link | 409 | * Chip wants to reset link. This is unexpected and |
410 | * send ua, empty skb lists, reset counters | 410 | * unsupported. |
411 | * propagate info to HCI layer | ||
412 | */ | 411 | */ |
412 | shdlc->hard_fault = -ECONNRESET; | ||
413 | } | 413 | } |
414 | break; | 414 | break; |
415 | case U_FRAME_UA: | 415 | case U_FRAME_UA: |