Blob Blame History Raw
From 426a50e89645bde78c1ff7b286605105ddf5cc2a Mon Sep 17 00:00:00 2001
From: Jens Osterkamp <jens@linux.vnet.ibm.com>
Date: Tue, 8 Feb 2011 00:51:02 -0800
Subject: [PATCH 05/51] new: change the ECP ack timer from RTE based to fixed

This patch adapts the ECP ack timer value from the RTE based value to a
fixed one as described in newer drafts.

Signed-off-by: Jens Osterkamp <jens@linux.vnet.ibm.com>
Signed-off-by: Petr Sabata <psabata@redhat.com>
---
 ecp/ecp.h    |    3 +--
 ecp/ecp_tx.c |    6 ++----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/ecp/ecp.h b/ecp/ecp.h
index 2c0ea0f..7fbfa58 100644
--- a/ecp/ecp.h
+++ b/ecp/ecp.h
@@ -34,8 +34,7 @@
 #define ECP_MAX_RETRIES			3
 #define ECP_SEQUENCE_NR_START		0x0
 
-#define ECP_TRANSMISSION_TIMER(rte)	EVB_RTM(rte)*EVB_RTG
-#define ECP_TRANSMISSION_DIVIDER	10000
+#define ECP_ACK_TIMER_DEFAULT		500000 /* 500 ms in us */
 
 typedef enum {
 	ECP_REQUEST = 0,
diff --git a/ecp/ecp_tx.c b/ecp/ecp_tx.c
index 6dff8c7..54a278f 100644
--- a/ecp/ecp_tx.c
+++ b/ecp/ecp_tx.c
@@ -321,10 +321,8 @@ static void ecp_tx_start_ackTimer(struct vdp_data *vd)
 
 	vd->ecp.ackTimerExpired = false;
 
-	rte = evb_get_rte(vd->ifname);
-
-	secs = ECP_TRANSMISSION_TIMER(rte) / ECP_TRANSMISSION_DIVIDER;
-	usecs = ECP_TRANSMISSION_TIMER(rte) % ECP_TRANSMISSION_DIVIDER;
+	secs = 0;
+	usecs = ECP_ACK_TIMER_DEFAULT;
 
 	LLDPAD_DBG("%s(%i)-%s: starting timer\n", __func__, __LINE__,
 	       vd->ifname);
-- 
1.7.4.4