diff options
author | Martin Townsend <mtownsend1973@gmail.com> | 2014-10-23 10:40:56 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-10-27 10:51:16 -0400 |
commit | 01141234f237957ec962dda2f1ca89d9ef180884 (patch) | |
tree | 1ed206b2d4dd83f6514dd07e0cabbe345f22b375 /net/ieee802154 | |
parent | 3c400b843d4c07703b68e91854bc395c95e4c51a (diff) |
ieee802154: 6lowpan: rename process_data and lowpan_process_data
As we have decouple decompression from data delivery we can now rename all
occurences of process_data in receive path.
Signed-off-by: Martin Townsend <mtownsend1973@gmail.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/6lowpan_rtnl.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c index 21742c827475..519a65452d90 100644 --- a/net/ieee802154/6lowpan_rtnl.c +++ b/net/ieee802154/6lowpan_rtnl.c | |||
@@ -166,7 +166,8 @@ static int lowpan_give_skb_to_devices(struct sk_buff *skb, | |||
166 | return stat; | 166 | return stat; |
167 | } | 167 | } |
168 | 168 | ||
169 | static int process_data(struct sk_buff *skb, const struct ieee802154_hdr *hdr) | 169 | static int |
170 | iphc_decompress(struct sk_buff *skb, const struct ieee802154_hdr *hdr) | ||
170 | { | 171 | { |
171 | u8 iphc0, iphc1; | 172 | u8 iphc0, iphc1; |
172 | struct ieee802154_addr_sa sa, da; | 173 | struct ieee802154_addr_sa sa, da; |
@@ -196,9 +197,9 @@ static int process_data(struct sk_buff *skb, const struct ieee802154_hdr *hdr) | |||
196 | else | 197 | else |
197 | dap = &da.hwaddr; | 198 | dap = &da.hwaddr; |
198 | 199 | ||
199 | return lowpan_process_data(skb, skb->dev, sap, sa.addr_type, | 200 | return lowpan_header_decompress(skb, skb->dev, sap, sa.addr_type, |
200 | IEEE802154_ADDR_LEN, dap, da.addr_type, | 201 | IEEE802154_ADDR_LEN, dap, da.addr_type, |
201 | IEEE802154_ADDR_LEN, iphc0, iphc1); | 202 | IEEE802154_ADDR_LEN, iphc0, iphc1); |
202 | 203 | ||
203 | drop: | 204 | drop: |
204 | kfree_skb(skb); | 205 | kfree_skb(skb); |
@@ -541,7 +542,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev, | |||
541 | } else { | 542 | } else { |
542 | switch (skb->data[0] & 0xe0) { | 543 | switch (skb->data[0] & 0xe0) { |
543 | case LOWPAN_DISPATCH_IPHC: /* ipv6 datagram */ | 544 | case LOWPAN_DISPATCH_IPHC: /* ipv6 datagram */ |
544 | ret = process_data(skb, &hdr); | 545 | ret = iphc_decompress(skb, &hdr); |
545 | if (ret < 0) | 546 | if (ret < 0) |
546 | goto drop; | 547 | goto drop; |
547 | 548 | ||
@@ -549,7 +550,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev, | |||
549 | case LOWPAN_DISPATCH_FRAG1: /* first fragment header */ | 550 | case LOWPAN_DISPATCH_FRAG1: /* first fragment header */ |
550 | ret = lowpan_frag_rcv(skb, LOWPAN_DISPATCH_FRAG1); | 551 | ret = lowpan_frag_rcv(skb, LOWPAN_DISPATCH_FRAG1); |
551 | if (ret == 1) { | 552 | if (ret == 1) { |
552 | ret = process_data(skb, &hdr); | 553 | ret = iphc_decompress(skb, &hdr); |
553 | if (ret < 0) | 554 | if (ret < 0) |
554 | goto drop; | 555 | goto drop; |
555 | 556 | ||
@@ -562,7 +563,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev, | |||
562 | case LOWPAN_DISPATCH_FRAGN: /* next fragments headers */ | 563 | case LOWPAN_DISPATCH_FRAGN: /* next fragments headers */ |
563 | ret = lowpan_frag_rcv(skb, LOWPAN_DISPATCH_FRAGN); | 564 | ret = lowpan_frag_rcv(skb, LOWPAN_DISPATCH_FRAGN); |
564 | if (ret == 1) { | 565 | if (ret == 1) { |
565 | ret = process_data(skb, &hdr); | 566 | ret = iphc_decompress(skb, &hdr); |
566 | if (ret < 0) | 567 | if (ret < 0) |
567 | goto drop; | 568 | goto drop; |
568 | 569 | ||