Commit 9010e39f authored by Waldemar Rymarkiewicz's avatar Waldemar Rymarkiewicz Committed by Samuel Ortiz

NFC: Handle RSET in SHDLC_CONNECTING state

As queue_work() does not guarantee immediate execution of sm_work it
can happen in crossover RSET usecase that connect timer will constantly
change the shdlc state from NEGOTIATING to CONNECTING before shdlc has
chance to handle incoming frame.
Signed-off-by: default avatarWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Acked-by: default avatarEric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 96e32402
......@@ -414,7 +414,8 @@ static void llc_shdlc_rcv_u_frame(struct llc_shdlc *shdlc,
switch (u_frame_modifier) {
case U_FRAME_RSET:
if (shdlc->state == SHDLC_NEGOCIATING) {
if ((shdlc->state == SHDLC_NEGOCIATING) ||
(shdlc->state == SHDLC_CONNECTING)) {
/* we sent RSET, but chip wants to negociate */
if (skb->len > 0)
w = skb->data[0];
......
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