From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: "David S. Miller" <davem@redhat.com>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.6 IrDA] Fix handling of RD:RSP
Date: Wed, 14 Apr 2004 15:16:45 -0700 [thread overview]
Message-ID: <20040414221645.GC5434@bougret.hpl.hp.com> (raw)
ir265_rd_rsp_retry.diff :
~~~~~~~~~~~~~~~~~~~~~~~
<Patch from Martin Diehl>
o [CORRECT] Fix handling of RD:RSP to be spec compliant
diff -u -p linux/net/irda/irlap_event.d0.c linux/net/irda/irlap_event.c
--- linux/net/irda/irlap_event.d0.c Wed Apr 7 18:54:24 2004
+++ linux/net/irda/irlap_event.c Wed Apr 7 18:54:33 2004
@@ -2236,6 +2236,14 @@ static int irlap_state_sclose(struct irl
irlap_disconnect_indication(self, LAP_DISC_INDICATION);
break;
case RECV_DM_RSP:
+ /* IrLAP-1.1 p.82: in SCLOSE, S and I type RSP frames
+ * shall take us down into default NDM state, like DM_RSP
+ */
+ case RECV_RR_RSP:
+ case RECV_RNR_RSP:
+ case RECV_REJ_RSP:
+ case RECV_SREJ_RSP:
+ case RECV_I_RSP:
/* Always switch state before calling upper layers */
irlap_next_state(self, LAP_NDM);
@@ -2253,6 +2261,17 @@ static int irlap_state_sclose(struct irl
irlap_disconnect_indication(self, LAP_DISC_INDICATION);
break;
default:
+ /* IrLAP-1.1 p.82: in SCLOSE, basically any received frame
+ * with pf=1 shall restart the wd-timer and resend the rd:rsp
+ */
+ if (info != NULL && info->pf) {
+ del_timer(&self->wd_timer);
+ irlap_wait_min_turn_around(self, &self->qos_tx);
+ irlap_send_rd_frame(self);
+ irlap_start_wd_timer(self, self->wd_timeout);
+ break; /* stay in SCLOSE */
+ }
+
IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__,
event, irlap_event[event]);
reply other threads:[~2004-04-14 22:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040414221645.GC5434@bougret.hpl.hp.com \
--to=jt@bougret.hpl.hp.com \
--cc=davem@redhat.com \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®