Skip to content

Commit d5d45d4

Browse files
committed
Merge branch '6lowpan'
Alexander Aring says: ==================== 6lowpan: trivial changes This patch series includes some trivial changes to prepare the 6lowpan stack for upcomming patch-series which mainly fix fragmentation according to rfc4944 and udp handling(which is currently broken). Changes since v3: - really fix intendation in patch 3/5 Changes since v2: - change intendation in patch 3/5 - fix typo in 5/5 unecessary -> unnecessary - add missing 6lowpan tag in cover-letter ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 747edc0 + 8ef007f commit d5d45d4

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

net/ieee802154/6lowpan.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ lowpan_uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh)
440440
default:
441441
pr_debug("ERROR: unknown UDP format\n");
442442
goto err;
443-
break;
444443
}
445444

446445
pr_debug("uncompressed UDP ports: src = %d, dst = %d\n",
@@ -785,7 +784,6 @@ lowpan_alloc_new_frame(struct sk_buff *skb, u16 len, u16 tag)
785784
goto skb_err;
786785

787786
frame->skb->priority = skb->priority;
788-
frame->skb->dev = skb->dev;
789787

790788
/* reserve headroom for uncompressed ipv6 header */
791789
skb_reserve(frame->skb, sizeof(struct ipv6hdr));
@@ -1120,19 +1118,19 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
11201118
int mlen, int plen, int offset, int type)
11211119
{
11221120
struct sk_buff *frag;
1123-
int hlen, ret;
1121+
int hlen;
11241122

11251123
hlen = (type == LOWPAN_DISPATCH_FRAG1) ?
11261124
LOWPAN_FRAG1_HEAD_SIZE : LOWPAN_FRAGN_HEAD_SIZE;
11271125

11281126
lowpan_raw_dump_inline(__func__, "6lowpan fragment header", head, hlen);
11291127

1130-
frag = dev_alloc_skb(hlen + mlen + plen + IEEE802154_MFR_SIZE);
1128+
frag = netdev_alloc_skb(skb->dev,
1129+
hlen + mlen + plen + IEEE802154_MFR_SIZE);
11311130
if (!frag)
11321131
return -ENOMEM;
11331132

11341133
frag->priority = skb->priority;
1135-
frag->dev = skb->dev;
11361134

11371135
/* copy header, MFR and payload */
11381136
memcpy(skb_put(frag, mlen), skb->data, mlen);
@@ -1145,9 +1143,7 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
11451143
lowpan_raw_dump_table(__func__, " raw fragment dump", frag->data,
11461144
frag->len);
11471145

1148-
ret = dev_queue_xmit(frag);
1149-
1150-
return ret;
1146+
return dev_queue_xmit(frag);
11511147
}
11521148

11531149
static int
@@ -1181,7 +1177,7 @@ lowpan_skb_fragmentation(struct sk_buff *skb, struct net_device *dev)
11811177
head[0] &= ~LOWPAN_DISPATCH_FRAG1;
11821178
head[0] |= LOWPAN_DISPATCH_FRAGN;
11831179

1184-
while ((payload_length - offset > 0) && (err >= 0)) {
1180+
while (payload_length - offset > 0) {
11851181
int len = LOWPAN_FRAG_SIZE;
11861182

11871183
head[4] = offset / 8;

0 commit comments

Comments
 (0)