diff options
author | Alexander Aring <alex.aring@gmail.com> | 2015-09-02 14:21:16 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-09-17 13:20:02 +0200 |
commit | f4606583fd8dcf15a07060dbd45a3e369144a934 (patch) | |
tree | 10407dd95d7a4f692b5da93c6b199940ca55f3c6 /net/ieee802154/6lowpan/rx.c | |
parent | 517a5460a93d641e2beb362d4066f9861f108e2f (diff) |
ieee802154: 6lowpan: change dev vars to wdev and ldev
Inside the IEEE 802.15.4 6LoWPAN subsystem we use two interfaces which
are wpan and lowpan interfaces. Instead of using always the variable
name "dev" for both we rename the "dev" variable to wdev which means the
wpan net_device and ldev which means a lowpan net_device. This avoids
confusing and always looking back to see which net_device is meant by
the variable name "dev".
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154/6lowpan/rx.c')
-rw-r--r-- | net/ieee802154/6lowpan/rx.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/net/ieee802154/6lowpan/rx.c b/net/ieee802154/6lowpan/rx.c index 12e10201d263..b1442f397cda 100644 --- a/net/ieee802154/6lowpan/rx.c +++ b/net/ieee802154/6lowpan/rx.c @@ -16,9 +16,9 @@ #include "6lowpan_i.h" static int lowpan_give_skb_to_device(struct sk_buff *skb, - struct net_device *dev) + struct net_device *wdev) { - skb->dev = dev->ieee802154_ptr->lowpan_dev; + skb->dev = wdev->ieee802154_ptr->lowpan_dev; skb->protocol = htons(ETH_P_IPV6); skb->pkt_type = PACKET_HOST; @@ -61,21 +61,21 @@ iphc_decompress(struct sk_buff *skb, const struct ieee802154_hdr *hdr) IEEE802154_ADDR_LEN, iphc0, iphc1); } -static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev, - struct packet_type *pt, struct net_device *orig_dev) +static int lowpan_rcv(struct sk_buff *skb, struct net_device *wdev, + struct packet_type *pt, struct net_device *orig_wdev) { struct ieee802154_hdr hdr; int ret; - if (dev->type != ARPHRD_IEEE802154 || - !dev->ieee802154_ptr->lowpan_dev) + if (wdev->type != ARPHRD_IEEE802154 || + !wdev->ieee802154_ptr->lowpan_dev) goto drop; skb = skb_share_check(skb, GFP_ATOMIC); if (!skb) goto drop; - if (!netif_running(dev)) + if (!netif_running(wdev)) goto drop_skb; if (skb->pkt_type == PACKET_OTHERHOST) @@ -88,7 +88,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev, if (skb->data[0] == LOWPAN_DISPATCH_IPV6) { /* Pull off the 1-byte of 6lowpan header. */ skb_pull(skb, 1); - return lowpan_give_skb_to_device(skb, dev); + return lowpan_give_skb_to_device(skb, wdev); } else { switch (skb->data[0] & 0xe0) { case LOWPAN_DISPATCH_IPHC: /* ipv6 datagram */ @@ -96,7 +96,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev, if (ret < 0) goto drop_skb; - return lowpan_give_skb_to_device(skb, dev); + return lowpan_give_skb_to_device(skb, wdev); case LOWPAN_DISPATCH_FRAG1: /* first fragment header */ ret = lowpan_frag_rcv(skb, LOWPAN_DISPATCH_FRAG1); if (ret == 1) { @@ -104,7 +104,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev, if (ret < 0) goto drop_skb; - return lowpan_give_skb_to_device(skb, dev); + return lowpan_give_skb_to_device(skb, wdev); } else if (ret == -1) { return NET_RX_DROP; } else { @@ -117,7 +117,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev, if (ret < 0) goto drop_skb; - return lowpan_give_skb_to_device(skb, dev); + return lowpan_give_skb_to_device(skb, wdev); } else if (ret == -1) { return NET_RX_DROP; } else { |