Skip to content

Commit

Permalink
NFC: Handle RSET in SHDLC_CONNECTING state
Browse files Browse the repository at this point in the history
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: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Acked-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Waldemar Rymarkiewicz authored and Samuel Ortiz committed Sep 24, 2012
1 parent 96e3240 commit 9010e39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/nfc/hci/llc_shdlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 9010e39

Please sign in to comment.