aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm/mpoa_caches.h
diff options
context:
space:
mode:
authorTina Ruchandani <ruchandani.tina@gmail.com>2017-11-27 09:02:17 -0500
committerDavid S. Miller <davem@davemloft.net>2017-11-30 09:26:32 -0500
commitd750dbdc071bf863112ea83c64cd7c44d4bad261 (patch)
tree6de5b06174f72a5cff623e5fb0c46fd05c6abcf2 /net/atm/mpoa_caches.h
parent59c036995c65606ae7d4ba3b93dfc01361618dce (diff)
atm: mpoa: remove 32-bit timekeeping
net/atm/mpoa_* files use 'struct timeval' to store event timestamps. struct timeval uses a 32-bit seconds field which will overflow in the year 2038 and beyond. Morever, the timestamps are being compared only to get seconds elapsed, so struct timeval which stores a seconds and microseconds field is an overkill. This patch replaces the use of struct timeval with time64_t to store a 64-bit seconds field. Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/mpoa_caches.h')
-rw-r--r--net/atm/mpoa_caches.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/atm/mpoa_caches.h b/net/atm/mpoa_caches.h
index 6a266669ebf4..464c4c7f8d1f 100644
--- a/net/atm/mpoa_caches.h
+++ b/net/atm/mpoa_caches.h
@@ -2,6 +2,7 @@
2#ifndef MPOA_CACHES_H 2#ifndef MPOA_CACHES_H
3#define MPOA_CACHES_H 3#define MPOA_CACHES_H
4 4
5#include <linux/time64.h>
5#include <linux/netdevice.h> 6#include <linux/netdevice.h>
6#include <linux/types.h> 7#include <linux/types.h>
7#include <linux/atm.h> 8#include <linux/atm.h>
@@ -16,9 +17,9 @@ void atm_mpoa_init_cache(struct mpoa_client *mpc);
16typedef struct in_cache_entry { 17typedef struct in_cache_entry {
17 struct in_cache_entry *next; 18 struct in_cache_entry *next;
18 struct in_cache_entry *prev; 19 struct in_cache_entry *prev;
19 struct timeval tv; 20 time64_t time;
20 struct timeval reply_wait; 21 time64_t reply_wait;
21 struct timeval hold_down; 22 time64_t hold_down;
22 uint32_t packets_fwded; 23 uint32_t packets_fwded;
23 uint16_t entry_state; 24 uint16_t entry_state;
24 uint32_t retry_time; 25 uint32_t retry_time;
@@ -53,7 +54,7 @@ struct in_cache_ops{
53typedef struct eg_cache_entry{ 54typedef struct eg_cache_entry{
54 struct eg_cache_entry *next; 55 struct eg_cache_entry *next;
55 struct eg_cache_entry *prev; 56 struct eg_cache_entry *prev;
56 struct timeval tv; 57 time64_t time;
57 uint8_t MPS_ctrl_ATM_addr[ATM_ESA_LEN]; 58 uint8_t MPS_ctrl_ATM_addr[ATM_ESA_LEN];
58 struct atm_vcc *shortcut; 59 struct atm_vcc *shortcut;
59 uint32_t packets_rcvd; 60 uint32_t packets_rcvd;