diff options
author | Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> | 2014-03-14 16:24:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-14 22:15:26 -0400 |
commit | ae531b9475f62c5e1863508604cd6b3faf362d56 (patch) | |
tree | c719f25779f44c4241d799e44c8fc2c8c8065957 /net/ieee802154/reassembly.c | |
parent | e6278d92005e9d6e374f269b4ce39c908a68ad5d (diff) |
ieee802154: use ieee802154_addr instead of *_sa variants
Change all internal uses of ieee802154_addr_sa to ieee802154_addr,
except for those instances that communicate directly with userspace.
Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154/reassembly.c')
-rw-r--r-- | net/ieee802154/reassembly.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/net/ieee802154/reassembly.c b/net/ieee802154/reassembly.c index f08b37a24b1d..a2b9e4e533f8 100644 --- a/net/ieee802154/reassembly.c +++ b/net/ieee802154/reassembly.c | |||
@@ -36,8 +36,8 @@ static int lowpan_frag_reasm(struct lowpan_frag_queue *fq, | |||
36 | struct sk_buff *prev, struct net_device *dev); | 36 | struct sk_buff *prev, struct net_device *dev); |
37 | 37 | ||
38 | static unsigned int lowpan_hash_frag(__be16 tag, u16 d_size, | 38 | static unsigned int lowpan_hash_frag(__be16 tag, u16 d_size, |
39 | const struct ieee802154_addr_sa *saddr, | 39 | const struct ieee802154_addr *saddr, |
40 | const struct ieee802154_addr_sa *daddr) | 40 | const struct ieee802154_addr *daddr) |
41 | { | 41 | { |
42 | u32 c; | 42 | u32 c; |
43 | 43 | ||
@@ -65,8 +65,8 @@ static bool lowpan_frag_match(struct inet_frag_queue *q, void *a) | |||
65 | 65 | ||
66 | fq = container_of(q, struct lowpan_frag_queue, q); | 66 | fq = container_of(q, struct lowpan_frag_queue, q); |
67 | return fq->tag == arg->tag && fq->d_size == arg->d_size && | 67 | return fq->tag == arg->tag && fq->d_size == arg->d_size && |
68 | ieee802154_addr_addr_equal(&fq->saddr, arg->src) && | 68 | ieee802154_addr_equal(&fq->saddr, arg->src) && |
69 | ieee802154_addr_addr_equal(&fq->daddr, arg->dst); | 69 | ieee802154_addr_equal(&fq->daddr, arg->dst); |
70 | } | 70 | } |
71 | 71 | ||
72 | static void lowpan_frag_init(struct inet_frag_queue *q, void *a) | 72 | static void lowpan_frag_init(struct inet_frag_queue *q, void *a) |
@@ -103,7 +103,8 @@ out: | |||
103 | 103 | ||
104 | static inline struct lowpan_frag_queue * | 104 | static inline struct lowpan_frag_queue * |
105 | fq_find(struct net *net, const struct ieee802154_frag_info *frag_info, | 105 | fq_find(struct net *net, const struct ieee802154_frag_info *frag_info, |
106 | const struct ieee802154_addr_sa *src, const struct ieee802154_addr_sa *dst) | 106 | const struct ieee802154_addr *src, |
107 | const struct ieee802154_addr *dst) | ||
107 | { | 108 | { |
108 | struct inet_frag_queue *q; | 109 | struct inet_frag_queue *q; |
109 | struct lowpan_create_arg arg; | 110 | struct lowpan_create_arg arg; |
@@ -346,8 +347,12 @@ int lowpan_frag_rcv(struct sk_buff *skb, const u8 frag_type) | |||
346 | struct lowpan_frag_queue *fq; | 347 | struct lowpan_frag_queue *fq; |
347 | struct net *net = dev_net(skb->dev); | 348 | struct net *net = dev_net(skb->dev); |
348 | struct ieee802154_frag_info *frag_info = &mac_cb(skb)->frag_info; | 349 | struct ieee802154_frag_info *frag_info = &mac_cb(skb)->frag_info; |
350 | struct ieee802154_addr source, dest; | ||
349 | int err; | 351 | int err; |
350 | 352 | ||
353 | source = mac_cb(skb)->source; | ||
354 | dest = mac_cb(skb)->dest; | ||
355 | |||
351 | err = lowpan_get_frag_info(skb, frag_type, frag_info); | 356 | err = lowpan_get_frag_info(skb, frag_type, frag_info); |
352 | if (err < 0) | 357 | if (err < 0) |
353 | goto err; | 358 | goto err; |
@@ -357,7 +362,7 @@ int lowpan_frag_rcv(struct sk_buff *skb, const u8 frag_type) | |||
357 | 362 | ||
358 | inet_frag_evictor(&net->ieee802154_lowpan.frags, &lowpan_frags, false); | 363 | inet_frag_evictor(&net->ieee802154_lowpan.frags, &lowpan_frags, false); |
359 | 364 | ||
360 | fq = fq_find(net, frag_info, &mac_cb(skb)->sa, &mac_cb(skb)->da); | 365 | fq = fq_find(net, frag_info, &source, &dest); |
361 | if (fq != NULL) { | 366 | if (fq != NULL) { |
362 | int ret; | 367 | int ret; |
363 | spin_lock(&fq->q.lock); | 368 | spin_lock(&fq->q.lock); |