[Linux-zigbee-devel] [PATCH net-next 08/15] 6lowpan: fix udp compress ordering

2013-10-09 Thread Alexander Aring
In case ((ntohs(uh->source) & LOWPAN_NHC_UDP_8BIT_MASK) the order of uncompression is wrong. It's always first source port then destionation port as second. See: http://tools.ietf.org/html/rfc6282#section-4.3.3 "Fields carried in-line (in part or in whole) appear in the same order as they do in t

[Linux-zigbee-devel] [PATCH net-next 03/15] 6lowpan: remove several copies of sk_buff

2013-10-09 Thread Alexander Aring
The current implementation does many copies of the sk_buff for increasing headroom which are not necessary. This patch increases the headroom in the maclayer for a worst case scenario of (sizeof(struct ipv6hdr) + sizeof(struct udphdr)). Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.

[Linux-zigbee-devel] [PATCH net-next 07/15] 6lowpan: fix udp nullpointer dereferencing

2013-10-09 Thread Alexander Aring
Sometimes a nullpointer dereferencing occurs because of using a wrong pointer arithmetic in udp_uncompression. This patch changes "**(hc06_ptr + 3)" to the right one "*(*hc06_ptr + 3)". Dereferencing like "**(hc06_ptr + 3)" works in a random case only. Signed-off-by: Alexander Aring --- net/iee

[Linux-zigbee-devel] [PATCH net-next 05/15] 6lowpan: allow to skip bytes in lowpan_fetch_skb

2013-10-09 Thread Alexander Aring
This will add support to skip bytes from skb with the lowpan_fetch_skb function. This is necessary for upcomming patches. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/ieee802154/6lowpan.h b/net/ieee802154/

[Linux-zigbee-devel] [PATCH net-next 06/15] 6lowpan: fix fragmentation on receiving side

2013-10-09 Thread Alexander Aring
This patch fixes the fragmentation of receiving 6lowpan packets. The current fragmentation isn't rfc4944 compatible. Add support for fragmentation frame match with source and destination addresses, instead of using tag id of fragmentation header only. Signed-off-by: Alexander Aring --- net/ieee

[Linux-zigbee-devel] [PATCH net-next 12/15] 6lowpan: udp use subtraction on both conditions

2013-10-09 Thread Alexander Aring
Cleanup code to handle both calculation in the same way. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index 4ef6b39..d054da6 100644 --- a/net/ieee802154/6lowpan.

[Linux-zigbee-devel] [PATCH net-next 04/15] 6lowpan: fix fragmentation on sending side

2013-10-09 Thread Alexander Aring
This patch fix the fragmentation on sending side according to rfc4944. Also add improvement to use the full payload of a PDU which calculate the nearest divided to 8 payload length for the fragmentation datagram offset attribute. Signed-off-by: Alexander Aring --- include/net/ieee802154_netdev.

[Linux-zigbee-devel] [PATCH net-next 15/15] 6lowpan: use try_to_del_timer_sync instead del_timer_sync

2013-10-09 Thread Alexander Aring
This is a race condition fix if the timer expire occurs when the last frame is arrived otherwise we cleanup the list entry twice. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/ieee802154/6lowpan.c b/net/iee

[Linux-zigbee-devel] [PATCHv2 net-next 00/15] 6lowpan: fragmentation and udp fixes

2013-10-09 Thread Alexander Aring
This patch series fixes the fragmentation implementation according to rfc4944. So ping (with fragmentation) to contiki(or other rfc4944 compatible 6lowpan stacks) comes possible. I wanted to made a fragmentation implementation with the internal fragmentation api(include/net/inet_frag.h). The curre

[Linux-zigbee-devel] [PATCH net-next 09/15] 6lowpan: fix udp byte ordering

2013-10-09 Thread Alexander Aring
The incoming udp header in lowpan_compress_udp_header function is already in network byte order. Everytime we read this values for source and destination port we need to convert this value to host byte order. In the outcoming header we need to set this value in network byteorder which the upcomin

[Linux-zigbee-devel] [PATCH net-next 01/15] 6lowpan: set and use mac_len for mac header length

2013-10-09 Thread Alexander Aring
Set the mac header length while creating the 802.15.4 mac header. Drop the function for recalculate mac header length in upper layers which was static and works for intra pan communication only. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 13 + net/mac802154/wpan.c

[Linux-zigbee-devel] [PATCH net-next 11/15] 6lowpan: udp use lowpan_fetch_skb function

2013-10-09 Thread Alexander Aring
Cleanup the lowpan_uncompress_udp_header function to use the lowpan_fetch_skb function. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 46 -- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/

[Linux-zigbee-devel] [PATCH net-next 14/15] 6lowpan: fix fragmentation race condition

2013-10-09 Thread Alexander Aring
If the timer expire on fragmentation handling we need to hold the flist_lock spinlock while accessing fraglist. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index 93a44a8..af3

[Linux-zigbee-devel] [PATCH net-next 02/15] 6lowpan: clean lowpan netdev setup

2013-10-09 Thread Alexander Aring
This patch replaces a redundant open-coded calculation with the already defined MAC802154_FRAME_HARD_HEADER_LEN. Also replace a magic number with the already defined IEEE802154_MFR_SIZE. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 d

[Linux-zigbee-devel] [PATCH net-next 10/15] 6lowpan: add udp warning for elided checksum

2013-10-09 Thread Alexander Aring
Bit 5 of "UDP LOWPAN_NHC Format" indicate that the checksum can be elided. The host need to calculate the udp checksum afterwards but this isn't supported right now. See: http://tools.ietf.org/html/rfc6282#section-4.3.3 Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 11 ---

[Linux-zigbee-devel] [PATCH net-next 13/15] 6lowpan: udp remove unecessary break

2013-10-09 Thread Alexander Aring
Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index d054da6..93a44a8 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -442,7 +442,6 @@ lowpan_uncompress_udp_

Re: [Linux-zigbee-devel] [PATCH net-next 04/15] 6lowpan: fix fragmentation on sending side

2013-10-09 Thread Alexander Aring
Hi, On Wed, Oct 09, 2013 at 07:06:14PM +0200, Alexander Aring wrote: > This patch fix the fragmentation on sending side according to rfc4944. > > Also add improvement to use the full payload of a PDU which calculate the > nearest divided to 8 payload length for the fragmentation datagram > offset