|
|
@@ -166,7 +166,8 @@ static int lowpan_give_skb_to_devices(struct sk_buff *skb,
|
|
|
return stat;
|
|
|
}
|
|
|
|
|
|
-static int process_data(struct sk_buff *skb, const struct ieee802154_hdr *hdr)
|
|
|
+static int
|
|
|
+iphc_decompress(struct sk_buff *skb, const struct ieee802154_hdr *hdr)
|
|
|
{
|
|
|
u8 iphc0, iphc1;
|
|
|
struct ieee802154_addr_sa sa, da;
|
|
|
@@ -196,9 +197,9 @@ static int process_data(struct sk_buff *skb, const struct ieee802154_hdr *hdr)
|
|
|
else
|
|
|
dap = &da.hwaddr;
|
|
|
|
|
|
- return lowpan_process_data(skb, skb->dev, sap, sa.addr_type,
|
|
|
- IEEE802154_ADDR_LEN, dap, da.addr_type,
|
|
|
- IEEE802154_ADDR_LEN, iphc0, iphc1);
|
|
|
+ return lowpan_header_decompress(skb, skb->dev, sap, sa.addr_type,
|
|
|
+ IEEE802154_ADDR_LEN, dap, da.addr_type,
|
|
|
+ IEEE802154_ADDR_LEN, iphc0, iphc1);
|
|
|
|
|
|
drop:
|
|
|
kfree_skb(skb);
|
|
|
@@ -541,7 +542,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,
|
|
|
} else {
|
|
|
switch (skb->data[0] & 0xe0) {
|
|
|
case LOWPAN_DISPATCH_IPHC: /* ipv6 datagram */
|
|
|
- ret = process_data(skb, &hdr);
|
|
|
+ ret = iphc_decompress(skb, &hdr);
|
|
|
if (ret < 0)
|
|
|
goto drop;
|
|
|
|
|
|
@@ -549,7 +550,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,
|
|
|
case LOWPAN_DISPATCH_FRAG1: /* first fragment header */
|
|
|
ret = lowpan_frag_rcv(skb, LOWPAN_DISPATCH_FRAG1);
|
|
|
if (ret == 1) {
|
|
|
- ret = process_data(skb, &hdr);
|
|
|
+ ret = iphc_decompress(skb, &hdr);
|
|
|
if (ret < 0)
|
|
|
goto drop;
|
|
|
|
|
|
@@ -562,7 +563,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,
|
|
|
case LOWPAN_DISPATCH_FRAGN: /* next fragments headers */
|
|
|
ret = lowpan_frag_rcv(skb, LOWPAN_DISPATCH_FRAGN);
|
|
|
if (ret == 1) {
|
|
|
- ret = process_data(skb, &hdr);
|
|
|
+ ret = iphc_decompress(skb, &hdr);
|
|
|
if (ret < 0)
|
|
|
goto drop;
|
|
|
|