diff options
author | Nikolay Aleksandrov <nikolay@redhat.com> | 2014-08-01 06:29:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-02 18:31:31 -0400 |
commit | 06aa8b8a0345c78f4d9a1fb3f852952b12a0e40c (patch) | |
tree | 9511c6007eed4f71fe5e601688f35d6ff7dd4b9b /net/ieee802154/reassembly.c | |
parent | d2373862b3589260f0139a6e4969478f84154369 (diff) |
inet: frags: rename last_in to flags
The last_in field has been used to store various flags different from
first/last frag in so give it a more descriptive name: flags.
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154/reassembly.c')
-rw-r--r-- | net/ieee802154/reassembly.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ieee802154/reassembly.c b/net/ieee802154/reassembly.c index f13d4f32e207..5607accd2fee 100644 --- a/net/ieee802154/reassembly.c +++ b/net/ieee802154/reassembly.c | |||
@@ -99,7 +99,7 @@ static void lowpan_frag_expire(unsigned long data) | |||
99 | 99 | ||
100 | spin_lock(&fq->q.lock); | 100 | spin_lock(&fq->q.lock); |
101 | 101 | ||
102 | if (fq->q.last_in & INET_FRAG_COMPLETE) | 102 | if (fq->q.flags & INET_FRAG_COMPLETE) |
103 | goto out; | 103 | goto out; |
104 | 104 | ||
105 | inet_frag_kill(&fq->q, &lowpan_frags); | 105 | inet_frag_kill(&fq->q, &lowpan_frags); |
@@ -142,7 +142,7 @@ static int lowpan_frag_queue(struct lowpan_frag_queue *fq, | |||
142 | struct net_device *dev; | 142 | struct net_device *dev; |
143 | int end, offset; | 143 | int end, offset; |
144 | 144 | ||
145 | if (fq->q.last_in & INET_FRAG_COMPLETE) | 145 | if (fq->q.flags & INET_FRAG_COMPLETE) |
146 | goto err; | 146 | goto err; |
147 | 147 | ||
148 | offset = lowpan_cb(skb)->d_offset << 3; | 148 | offset = lowpan_cb(skb)->d_offset << 3; |
@@ -154,14 +154,14 @@ static int lowpan_frag_queue(struct lowpan_frag_queue *fq, | |||
154 | * or have different end, the segment is corrupted. | 154 | * or have different end, the segment is corrupted. |
155 | */ | 155 | */ |
156 | if (end < fq->q.len || | 156 | if (end < fq->q.len || |
157 | ((fq->q.last_in & INET_FRAG_LAST_IN) && end != fq->q.len)) | 157 | ((fq->q.flags & INET_FRAG_LAST_IN) && end != fq->q.len)) |
158 | goto err; | 158 | goto err; |
159 | fq->q.last_in |= INET_FRAG_LAST_IN; | 159 | fq->q.flags |= INET_FRAG_LAST_IN; |
160 | fq->q.len = end; | 160 | fq->q.len = end; |
161 | } else { | 161 | } else { |
162 | if (end > fq->q.len) { | 162 | if (end > fq->q.len) { |
163 | /* Some bits beyond end -> corruption. */ | 163 | /* Some bits beyond end -> corruption. */ |
164 | if (fq->q.last_in & INET_FRAG_LAST_IN) | 164 | if (fq->q.flags & INET_FRAG_LAST_IN) |
165 | goto err; | 165 | goto err; |
166 | fq->q.len = end; | 166 | fq->q.len = end; |
167 | } | 167 | } |
@@ -201,13 +201,13 @@ found: | |||
201 | if (frag_type == LOWPAN_DISPATCH_FRAG1) { | 201 | if (frag_type == LOWPAN_DISPATCH_FRAG1) { |
202 | /* Calculate uncomp. 6lowpan header to estimate full size */ | 202 | /* Calculate uncomp. 6lowpan header to estimate full size */ |
203 | fq->q.meat += lowpan_uncompress_size(skb, NULL); | 203 | fq->q.meat += lowpan_uncompress_size(skb, NULL); |
204 | fq->q.last_in |= INET_FRAG_FIRST_IN; | 204 | fq->q.flags |= INET_FRAG_FIRST_IN; |
205 | } else { | 205 | } else { |
206 | fq->q.meat += skb->len; | 206 | fq->q.meat += skb->len; |
207 | } | 207 | } |
208 | add_frag_mem_limit(&fq->q, skb->truesize); | 208 | add_frag_mem_limit(&fq->q, skb->truesize); |
209 | 209 | ||
210 | if (fq->q.last_in == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) && | 210 | if (fq->q.flags == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) && |
211 | fq->q.meat == fq->q.len) { | 211 | fq->q.meat == fq->q.len) { |
212 | int res; | 212 | int res; |
213 | unsigned long orefdst = skb->_skb_refdst; | 213 | unsigned long orefdst = skb->_skb_refdst; |