[Linux-zigbee-devel] [PATCH net-next v2 0/6] 802154: some cleanups and fixes

2014-05-14 Thread Phoebe Buckheister
This series adds some definitions for 802.15.4 header fields that were missing, changes 6lowpan fragmentation to be aware of security headers and fixes 802.15.4 datagram socket sendmsg(), which was entirely incompliant to date. Also a few minor changes to mac_cb handling, mark a single-use function

[Linux-zigbee-devel] [PATCH net-next 2/6] mac802154: account for all header parts during wpan header creationg

2014-05-14 Thread Phoebe Buckheister
The current WPAN header creation code checks for EMSGSIZE conditions, but does not account for the MIC field that link layer security may add at the end of the frame. Now that we can accurately calculate the maximum payload size of packets, use that to check for EMSGSIZE conditions. Signed-off-by:

[Linux-zigbee-devel] [PATCH net-next 3/6] ieee802154: change _cb handling slightly

2014-05-14 Thread Phoebe Buckheister
The current mac_cb handling of ieee802154 is rather awkward and limited. Decompose the single flags field into multiple fields with the meanings of each subfield of the flags field to make future extensions (for example, link-layer security) easier. Also don't set the frame sequence number in upper

[Linux-zigbee-devel] [PATCH net-next 6/6] mac802154: make mac802154_wpan_open static

2014-05-14 Thread Phoebe Buckheister
This function is only used within the same translation unit, so mark it static. Signed-off-by: Phoebe Buckheister --- net/mac802154/wpan.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c index bb49e88..ed10577 100644 --- a/net/ma

[Linux-zigbee-devel] [PATCH net-next 4/6] 6lowpan: fix fragmentation

2014-05-14 Thread Phoebe Buckheister
Currently, 6lowpan creates one 802.15.4 MAC header for the original packet the device was given by upper layers and reuses this header for all fragments, if fragmentation is required. This also reuses frame sequence numbers, which must not happen. 6lowpan also has issues with fragmentation in the p

[Linux-zigbee-devel] [PATCH net-next 5/6] ieee802154: fix dgram socket sendmsg()

2014-05-14 Thread Phoebe Buckheister
802.15.4 datagram sockets do not currently have a compliant sendmsg(). The destination address supplied is always ignored, and in unconnected mode, packets are broadcast instead of dropped with -EDESTADDRREQ. This patch fixes 802.15.4 dgram sockets to be compliant, i.e. !conn && !msg_name => -EDE

[Linux-zigbee-devel] [PATCH net-next 1/6] ieee802154: add definitions for link-layer security and header functions

2014-05-14 Thread Phoebe Buckheister
When dealing with 802.15.4, one often has to know the maximum payload size for a given packet. This depends on many factors, one of which is whether or not a security header is present in the frame. These definitions and functions provide an easy way for any upper layer to calculate the maximum pay

Re: [Linux-zigbee-devel] [PATCH net-next 4/6] 6lowpan: fix fragmentation

2014-05-14 Thread Alexander Aring
Hi Phoebe, that's a nice solution for the DSN increment on fragmentation. This stands long time on my ToDo list and you did a very nice solution. Thanks. :-) On Wed, May 14, 2014 at 05:43:09PM +0200, Phoebe Buckheister wrote: > Currently, 6lowpan creates one 802.15.4 MAC header for the original

Re: [Linux-zigbee-devel] [PATCH net-next 4/6] 6lowpan: fix fragmentation

2014-05-14 Thread Phoebe Buckheister
On Wed, 14 May 2014 17:56:57 +0200 Alexander Aring wrote: > > + > > + frag = alloc_skb(real_dev->hard_header_len + > > +real_dev->needed_tailroom + size, > > +GFP_ATOMIC); > > Why not keep netdev_alloc_skb for the real_dev? > > But then we need to use d