summaryrefslogtreecommitdiffstats
path: root/net/ieee802154/6lowpan/reassembly.c
diff options
context:
space:
mode:
authorAlexander Aring2015-09-02 14:21:16 +0200
committerMarcel Holtmann2015-09-17 13:20:02 +0200
commitf4606583fd8dcf15a07060dbd45a3e369144a934 (patch)
tree10407dd95d7a4f692b5da93c6b199940ca55f3c6 /net/ieee802154/6lowpan/reassembly.c
parentBluetooth: btmrvl: skb resource leak, and double free. (diff)
downloadkernel-qcow2-linux-f4606583fd8dcf15a07060dbd45a3e369144a934.tar.gz
kernel-qcow2-linux-f4606583fd8dcf15a07060dbd45a3e369144a934.tar.xz
kernel-qcow2-linux-f4606583fd8dcf15a07060dbd45a3e369144a934.zip
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/reassembly.c')
-rw-r--r--net/ieee802154/6lowpan/reassembly.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ieee802154/6lowpan/reassembly.c b/net/ieee802154/6lowpan/reassembly.c
index 214d44aef35b..60d6df75aee9 100644
--- a/net/ieee802154/6lowpan/reassembly.c
+++ b/net/ieee802154/6lowpan/reassembly.c
@@ -46,7 +46,7 @@ static struct lowpan_frag_info *lowpan_cb(struct sk_buff *skb)
static struct inet_frags lowpan_frags;
static int lowpan_frag_reasm(struct lowpan_frag_queue *fq,
- struct sk_buff *prev, struct net_device *dev);
+ struct sk_buff *prev, struct net_device *ldev);
static unsigned int lowpan_hash_frag(u16 tag, u16 d_size,
const struct ieee802154_addr *saddr,
@@ -141,7 +141,7 @@ static int lowpan_frag_queue(struct lowpan_frag_queue *fq,
struct sk_buff *skb, const u8 frag_type)
{
struct sk_buff *prev, *next;
- struct net_device *dev;
+ struct net_device *ldev;
int end, offset;
if (fq->q.flags & INET_FRAG_COMPLETE)
@@ -195,8 +195,8 @@ found:
else
fq->q.fragments = skb;
- dev = skb->dev;
- if (dev)
+ ldev = skb->dev;
+ if (ldev)
skb->dev = NULL;
fq->q.stamp = skb->tstamp;
@@ -215,7 +215,7 @@ found:
unsigned long orefdst = skb->_skb_refdst;
skb->_skb_refdst = 0UL;
- res = lowpan_frag_reasm(fq, prev, dev);
+ res = lowpan_frag_reasm(fq, prev, ldev);
skb->_skb_refdst = orefdst;
return res;
}
@@ -235,7 +235,7 @@ err:
* the last and the first frames arrived and all the bits are here.
*/
static int lowpan_frag_reasm(struct lowpan_frag_queue *fq, struct sk_buff *prev,
- struct net_device *dev)
+ struct net_device *ldev)
{
struct sk_buff *fp, *head = fq->q.fragments;
int sum_truesize;
@@ -313,7 +313,7 @@ static int lowpan_frag_reasm(struct lowpan_frag_queue *fq, struct sk_buff *prev,
sub_frag_mem_limit(fq->q.net, sum_truesize);
head->next = NULL;
- head->dev = dev;
+ head->dev = ldev;
head->tstamp = fq->q.stamp;
fq->q.fragments = NULL;