Commit 5018e490 authored by Eric Lapuyade's avatar Eric Lapuyade Committed by John W. Linville

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: default avatarEric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent d3b40445
...@@ -404,12 +404,12 @@ static void nfc_shdlc_rcv_u_frame(struct nfc_shdlc *shdlc, ...@@ -404,12 +404,12 @@ static void nfc_shdlc_rcv_u_frame(struct nfc_shdlc *shdlc,
r = nfc_shdlc_connect_send_ua(shdlc); r = nfc_shdlc_connect_send_ua(shdlc);
nfc_shdlc_connect_complete(shdlc, r); nfc_shdlc_connect_complete(shdlc, r);
} }
} else if (shdlc->state > SHDLC_NEGOCIATING) { } else if (shdlc->state == SHDLC_CONNECTED) {
/* /*
* TODO: Chip wants to reset link * Chip wants to reset link. This is unexpected and
* send ua, empty skb lists, reset counters * unsupported.
* propagate info to HCI layer
*/ */
shdlc->hard_fault = -ECONNRESET;
} }
break; break;
case U_FRAME_UA: case U_FRAME_UA:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment