diff options
Diffstat (limited to 'net/can/raw.c')
-rw-r--r-- | net/can/raw.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/can/raw.c b/net/can/raw.c index 31b9748cbb4e..2e67b1423cd3 100644 --- a/net/can/raw.c +++ b/net/can/raw.c | |||
@@ -75,7 +75,7 @@ MODULE_ALIAS("can-proto-1"); | |||
75 | */ | 75 | */ |
76 | 76 | ||
77 | struct uniqframe { | 77 | struct uniqframe { |
78 | ktime_t tstamp; | 78 | int skbcnt; |
79 | const struct sk_buff *skb; | 79 | const struct sk_buff *skb; |
80 | unsigned int join_rx_count; | 80 | unsigned int join_rx_count; |
81 | }; | 81 | }; |
@@ -133,7 +133,7 @@ static void raw_rcv(struct sk_buff *oskb, void *data) | |||
133 | 133 | ||
134 | /* eliminate multiple filter matches for the same skb */ | 134 | /* eliminate multiple filter matches for the same skb */ |
135 | if (this_cpu_ptr(ro->uniq)->skb == oskb && | 135 | if (this_cpu_ptr(ro->uniq)->skb == oskb && |
136 | ktime_equal(this_cpu_ptr(ro->uniq)->tstamp, oskb->tstamp)) { | 136 | this_cpu_ptr(ro->uniq)->skbcnt == can_skb_prv(oskb)->skbcnt) { |
137 | if (ro->join_filters) { | 137 | if (ro->join_filters) { |
138 | this_cpu_inc(ro->uniq->join_rx_count); | 138 | this_cpu_inc(ro->uniq->join_rx_count); |
139 | /* drop frame until all enabled filters matched */ | 139 | /* drop frame until all enabled filters matched */ |
@@ -144,7 +144,7 @@ static void raw_rcv(struct sk_buff *oskb, void *data) | |||
144 | } | 144 | } |
145 | } else { | 145 | } else { |
146 | this_cpu_ptr(ro->uniq)->skb = oskb; | 146 | this_cpu_ptr(ro->uniq)->skb = oskb; |
147 | this_cpu_ptr(ro->uniq)->tstamp = oskb->tstamp; | 147 | this_cpu_ptr(ro->uniq)->skbcnt = can_skb_prv(oskb)->skbcnt; |
148 | this_cpu_ptr(ro->uniq)->join_rx_count = 1; | 148 | this_cpu_ptr(ro->uniq)->join_rx_count = 1; |
149 | /* drop first frame to check all enabled filters? */ | 149 | /* drop first frame to check all enabled filters? */ |
150 | if (ro->join_filters && ro->count > 1) | 150 | if (ro->join_filters && ro->count > 1) |
@@ -749,6 +749,7 @@ static int raw_sendmsg(struct socket *sock, struct msghdr *msg, size_t size) | |||
749 | 749 | ||
750 | can_skb_reserve(skb); | 750 | can_skb_reserve(skb); |
751 | can_skb_prv(skb)->ifindex = dev->ifindex; | 751 | can_skb_prv(skb)->ifindex = dev->ifindex; |
752 | can_skb_prv(skb)->skbcnt = 0; | ||
752 | 753 | ||
753 | err = memcpy_from_msg(skb_put(skb, size), msg, size); | 754 | err = memcpy_from_msg(skb_put(skb, size), msg, size); |
754 | if (err < 0) | 755 | if (err < 0) |