diff options
| author | Dave Hibberd <hibby@debian.org> | 2025-11-09 22:34:23 +0000 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2025-11-09 22:34:23 +0000 |
| commit | 3c2c1cf9f880267b8006b87fbe84cd73a645be38 (patch) | |
| tree | 8dd6026fe09e80dbc5f0ce12c67a08ce8df75ad4 /L2Code.c | |
| parent | e569b24f9aea7eacce84d6caa646eacd452bea5f (diff) | |
| parent | 367ab8fb01191ec54c91810b1896c41fdf7de911 (diff) | |
Update upstream source from tag 'upstream/6.0.25.9+repack'
Update to upstream version '6.0.25.9+repack'
with Debian dir 15e3115d6f28e4fa9b1c62d4e3c93da6570dc7bc
Diffstat (limited to 'L2Code.c')
| -rw-r--r-- | L2Code.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -2346,6 +2346,9 @@ VOID SFRAME(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, UCHAR CTL, UCHA LINK->L2TIMER = ONEMINUTE; // (RE)SET TIMER
+
+ LINK->framesResent++;
+
PORT = LINK->LINKPORT;
if (PORT)
@@ -2452,6 +2455,20 @@ treatasRR: LINK->L2FLAGS &= ~POLLSENT; // CLEAR I(P) or RR(P) SET
+ // ?? is this the place to do RTT?
+
+ if (LINK->lastPSent)
+ {
+ int RTT = GetTickCount() - LINK->lastPSent;
+
+ if (LINK->RTT)
+ LINK->RTT = ((LINK->RTT * 90) / 100) + RTT /10; // Smooth - 90% of old + 10% of new
+ else
+ LINK->RTT = RTT;
+
+ LINK->lastPSent = 0;
+ }
+
if ((CTL & 0xf) == RNR)
{
// Dont Clear timer on receipt of RNR(F), spec says should poll for clearing of busy,
@@ -2927,6 +2944,8 @@ VOID RESETNS(struct _LINKTABLE * LINK, UCHAR NS) {
int Resent = (LINK->LINKNS - NS) & 7; // FRAMES TO RESEND
+ LINK->framesResent += Resent;
+
LINK->LINKNS = NS; // RESET N(S)
if (LINK->LINKTYPE == 3) // mode-Node
@@ -3150,6 +3169,11 @@ VOID SDETX(struct _LINKTABLE * LINK) LINK->LASTFRAMESENT = time(NULL);
LINK->LASTSENTQCOUNT = COUNT_AT_L2(LINK);
+ if (LINK->LASTSENTQCOUNT > LINK->maxQueued)
+ LINK->maxQueued = LINK->LASTSENTQCOUNT;
+
+ if (LINK->LASTSENTQCOUNT > LINK->intervalMaxQueued)
+ LINK->intervalMaxQueued = LINK->LASTSENTQCOUNT;
if (LINK->AllowCompress && Msg->LENGTH > 20 && LINK->TX_Q && Msg->PID == 240) // if short and no more not worth trying compression
{
@@ -3352,6 +3376,7 @@ VOID SDETX(struct _LINKTABLE * LINK) // FLAG BUFFER TO CAUSE TIMER TO BE RESET AFTER SEND (or ACK if ACKMODE)
Buffer->Linkptr = LINK;
+ LINK->lastPSent = GetTickCount();
}
}
|
