[Linux-zigbee-devel] [PATCH 0/3] at86rf230: split register defs; update and repost

2011-06-18 Thread Werner Almesberger
This patch set begins with a patch that moves the register and SPI protocol definitions of at86rf230.c to a separate header. This makes at86rf230.c a bit less intimidating and will help with generalizing the transport. Next, the good old two IRQ and is_tx patches, updated for the latest changes.

[Linux-zigbee-devel] [PATCH 1/3] at86rf230: move register and protocol definitions to header file

2011-06-18 Thread Werner Almesberger
Moved the various register and protocol #defines from at86rf230.c to a header. This makes the driver a little easier to read and helps with further splitting of the driver into chip and transport part. - drivers/ieee802154/at86rf230.c: moved register and protocol #defines to drivers/ieee802154/a

[Linux-zigbee-devel] [PATCH 2/3] at86rf230: remove irq_disabled flag and clean up IRQ freeing

2011-06-18 Thread Werner Almesberger
The irq_disabled flag is part of an intricate locking mechanism whose only purpose seems to be to enforce how the program's logic should work anyway. Furthermore, since the worker calls enable_irq, we shouldn't free the interrupt before flushing the work. Also, there was an unreachable call to iee

[Linux-zigbee-devel] [PATCH 3/3] at86rf230: straighten out RX vs. TX synchronization

2011-06-18 Thread Werner Almesberger
The is_tx flag did not protect adequately against races when switching from receiving to transmitting. This patch removes the unnecessary spinlock and enforces proper synchronization along the interrupt processing chain (source, handler, and worker), before entering transmit mode. The mechanism fo

Re: [Linux-zigbee-devel] [PATCH] at86rf230: separate state change command from final state

2011-06-18 Thread Stefan Schmidt
Hello. On Fri, 2011-06-17 at 20:30, Dmitry Eremin-Solenikov wrote: > > On 17.06.2011 19:55, Stefan Schmidt wrote: > >Hello. > > > >On Fri, 2011-06-17 at 19:31, Dmitry Eremin-Solenikov wrote: > >> > >>Sorry for ignoring this patch for sooo lng. A bit better (IMHO) > >>patch was commited recent

Re: [Linux-zigbee-devel] [PATCH] at86rf230: separate state change command from final state

2011-06-18 Thread Dmitry Eremin-Solenikov
Hello, On 6/17/11, Werner Almesberger wrote: > Dmitry Eremin-Solenikov wrote: >> * Did I miss something? > > CSMA ? ARQ without hardware assistance ? Security ? (Though I find the > concept of link-layer security dubious in most cases.) No, No, Maybe. Basically CSMA-CA and ACK without hw assist

Re: [Linux-zigbee-devel] [PATCH] at86rf230: separate state change command from final state

2011-06-18 Thread Dmitry Eremin-Solenikov
On 6/18/11, Stefan Schmidt wrote: > Hello. > > On Fri, 2011-06-17 at 20:30, Dmitry Eremin-Solenikov wrote: >> >> On 17.06.2011 19:55, Stefan Schmidt wrote: >> >Hello. >> > >> >On Fri, 2011-06-17 at 19:31, Dmitry Eremin-Solenikov wrote: >> >> >> >>Sorry for ignoring this patch for sooo lng. A b

Re: [Linux-zigbee-devel] 6lowpan

2011-06-18 Thread jonsm...@gmail.com
On Thu, Jun 16, 2011 at 3:15 AM, Alexander Smirnov wrote: > Hi Jon, > > currently I'm working on 6lowpan support for zigbee linux. > I'm trying to rework your patch and make it more suitable for linux mainline > according Dmitry's help. > So do you have any updates or progress with this deal sinc

Re: [Linux-zigbee-devel] 6lowpan

2011-06-18 Thread jonsm...@gmail.com
On Thu, Jun 16, 2011 at 3:15 AM, Alexander Smirnov wrote: > Hi Jon, > > currently I'm working on 6lowpan support for zigbee linux. > I'm trying to rework your patch and make it more suitable for linux mainline > according Dmitry's help. > So do you have any updates or progress with this deal sinc

[Linux-zigbee-devel] [PATCH 2/4] ieee802154/cc2420: Fix hardware address recognition for ieee802154 long addresses

2011-06-18 Thread Stefan Schmidt
The ieee802154 long address was written into ram in the wrong order. The result was that only frame with a given short address did pass the hardware address recognition. This will already fail in the initial case when a node requests a short address from the pan coordinator. Also telling the stack

[Linux-zigbee-devel] [PATCH 1/4] ieee802154/cc2420: Check for FCS bit and skip frames with wrong CRC.

2011-06-18 Thread Stefan Schmidt
The cc2420 does offer hardware CRC calculation and we are using it in this driver. Once the CRC is checked in hardware the two CRC bytes get replaced with measurement informations and a FCS bit flag telling about the result of the CRC check. So far the driver did pass all frmaes into the stack wit

[Linux-zigbee-devel] CC2420 driver fixes

2011-06-18 Thread Stefan Schmidt
Hello. As promised here are some fixes for the cc2420 driver. [PATCH 1/4] ieee802154/cc2420: Check for FCS bit and skip frames I don't think it makes sense to push any frmaes into the stack that have a known failed CRC check. [PATCH 2/4] ieee802154/cc2420: Fix hardware address recognition for

[Linux-zigbee-devel] [PATCH 3/4] ieee802154/cc2420: Avoid race on irq_enabled

2011-06-18 Thread Stefan Schmidt
Handling both IRQs, FIFOP and SFD, in one isr and having only one variable to protect it brings up a race conditions we can hit with ienable_irq(): [ 2081.881115] WARNING: at kernel/irq/manage.c:274 enable_irq+0x4c/0x74() [ 2081.887621] Unbalanced enable for IRQ 112 Split the isr handler into two

Re: [Linux-zigbee-devel] Radio transmission using openembedded images

2011-06-18 Thread Stefan Schmidt
Hello. On Thu, 2011-06-16 at 13:34, Stefan Schmidt wrote: > > On Thu, 2011-06-16 at 16:49, bala krishna sanjeeva wrote: > > > > Many thanks for the reply. You can send the patches and I will test with the > > latest openembedded build. > > The hardware ack and FCS check patches are ready but th

Re: [Linux-zigbee-devel] [PATCH] at86rf230: separate state change command from final state

2011-06-18 Thread Stefan Schmidt
Hello. On Sat, 2011-06-18 at 21:26, Dmitry Eremin-Solenikov wrote: > On 6/18/11, Stefan Schmidt wrote: > > > > On Fri, 2011-06-17 at 20:30, Dmitry Eremin-Solenikov wrote: > >> > >> On 17.06.2011 19:55, Stefan Schmidt wrote: > >> * New drivers/hardware to support (at86rf230, rf212, cc25xx chips, e

Re: [Linux-zigbee-devel] 6lowpan

2011-06-18 Thread jonsm...@gmail.com
On Sat, Jun 18, 2011 at 1:35 PM, jonsm...@gmail.com wrote: > On Thu, Jun 16, 2011 at 3:15 AM, Alexander Smirnov > wrote: >> Hi Jon, >> >> currently I'm working on 6lowpan support for zigbee linux. >> I'm trying to rework your patch and make it more suitable for linux mainline >> according Dmitry