summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/net/sctp/structs.h6
-rw-r--r--net/sctp/output.c2
-rw-r--r--net/sctp/sm_statefuns.c5
-rw-r--r--net/sctp/transport.c7
4 files changed, 5 insertions, 15 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 90876b657775..ac794a6823eb 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -950,12 +950,6 @@ struct sctp_transport {
/* Source address. */
union sctp_addr saddr;
- /* When was the last time(in jiffies) that a data packet was sent on
- * this transport? This is used to adjust the cwnd when the transport
- * becomes inactive.
- */
- unsigned long last_time_used;
-
/* Heartbeat interval: The endpoint sends out a Heartbeat chunk to
* the destination address every heartbeat interval.
*/
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 5cbda8f1ddfd..9e8e0ea844be 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -557,8 +557,6 @@ int sctp_packet_transmit(struct sctp_packet *packet)
struct timer_list *timer;
unsigned long timeout;
- tp->last_time_used = jiffies;
-
/* Restart the AUTOCLOSE timer when sending data. */
if (sctp_state(asoc, ESTABLISHED) && asoc->autoclose) {
timer = &asoc->timers[SCTP_EVENT_TIMEOUT_AUTOCLOSE];
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 16a603527df2..1ef9de9bbae9 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -996,14 +996,15 @@ sctp_disposition_t sctp_sf_sendbeat_8_3(const struct sctp_endpoint *ep,
sctp_sf_heartbeat(ep, asoc, type, arg,
commands))
return SCTP_DISPOSITION_NOMEM;
+
/* Set transport error counter and association error counter
* when sending heartbeat.
*/
- sctp_add_cmd_sf(commands, SCTP_CMD_TRANSPORT_IDLE,
- SCTP_TRANSPORT(transport));
sctp_add_cmd_sf(commands, SCTP_CMD_TRANSPORT_HB_SENT,
SCTP_TRANSPORT(transport));
}
+ sctp_add_cmd_sf(commands, SCTP_CMD_TRANSPORT_IDLE,
+ SCTP_TRANSPORT(transport));
sctp_add_cmd_sf(commands, SCTP_CMD_HB_TIMER_UPDATE,
SCTP_TRANSPORT(transport));
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 3b141bb32faf..2df29cbdaf5a 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -83,7 +83,6 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
peer->fast_recovery = 0;
peer->last_time_heard = jiffies;
- peer->last_time_used = jiffies;
peer->last_time_ecne_reduced = jiffies;
peer->init_sent_count = 0;
@@ -565,10 +564,8 @@ void sctp_transport_lower_cwnd(struct sctp_transport *transport,
* to be done every RTO interval, we do it every hearbeat
* interval.
*/
- if (time_after(jiffies, transport->last_time_used +
- transport->rto))
- transport->cwnd = max(transport->cwnd/2,
- 4*transport->asoc->pathmtu);
+ transport->cwnd = max(transport->cwnd/2,
+ 4*transport->asoc->pathmtu);
break;
}