Re: [Linux-zigbee-devel] [PATCH 1/3] 6lowpan: add helper to get 6lowpan namespace

2014-04-22 Thread Johannes Berg
On Thu, 2014-04-17 at 18:22 -0700, Luis R. Rodriguez wrote: > +#if IS_ENABLED(CONFIG_IEEE802154_6LOWPAN) > [...] > +#else > +static inline struct netns_ieee802154_lowpan * > +net_ieee802154_lowpan(struct net *net) > +{ > + return NULL; > +} > +#endif Why would that be needed? If nobody compil

[Linux-zigbee-devel] [PATCH net-next 03/15] at86rf230: remove irq_type in request_irq

2014-04-22 Thread Alexander Aring
We don't need to set these values at request_irq. The interrupt line is already configured to same value like irq_get_trigger_type returned. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/iee

[Linux-zigbee-devel] [PATCH net-next 05/15] at86rf230: use devm_gpio_request_one

2014-04-22 Thread Alexander Aring
This patch replace the gpio_request functions with devm_gpio_request_one functions. Then we don't need to take care about freeing gpios. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 53 +- 1 file changed, 12 insertions(+), 41 deletio

[Linux-zigbee-devel] [PATCH net-next 11/15] at86rf230: reset irq line before irq request

2014-04-22 Thread Alexander Aring
This patch resets the irq line before we are requesting the irq. This avoids pending interrupts before requesting. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c

[Linux-zigbee-devel] [PATCH net-next 07/15] at86rf230: make of_device_id const

2014-04-22 Thread Alexander Aring
Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 46d992a..41c3384 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/n

[Linux-zigbee-devel] [PATCH net-next 12/15] at86rf230: remove unnecessary buf on heap

2014-04-22 Thread Alexander Aring
This patch puts a buffer on the stack instead of heap. There is no need to hold the buffer on the heap. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/ne

[Linux-zigbee-devel] [PATCH net-next 14/15] at86rf230: remove unnecessary state read

2014-04-22 Thread Alexander Aring
This patch removes a unnecessary state read. The status value is never evaluate after reading the state. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86r

[Linux-zigbee-devel] [PATCH net-next 09/15] at86rf230: remove #ifdef CONFIG_OF

2014-04-22 Thread Alexander Aring
This is already handled by the of_match_ptr macro. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index cf376c4..b324bb3 100644 --- a/drivers/net/i

[Linux-zigbee-devel] [PATCH net-next 08/15] at86rf230: add at86rf230_device_id table

2014-04-22 Thread Alexander Aring
This patch adds a at86rf230_device_id table to offers various module aliases. Signed-off-by: Alexander Aring Reported-by: Varka Bhadram --- drivers/net/ieee802154/at86rf230.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee80

[Linux-zigbee-devel] [PATCH net-next 02/15] devicetree: add at86rf230 bindings

2014-04-22 Thread Alexander Aring
This patch adds devicetree bindings for the at86rf230 IEEE 802.15.4 SPI device driver. Signed-off-by: Alexander Aring --- .../bindings/net/ieee802154/at86rf230.txt | 23 ++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/ie

[Linux-zigbee-devel] [PATCH net-next 10/15] at86rf230: remove unnecessary assign

2014-04-22 Thread Alexander Aring
Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index b324bb3..960444b 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drive

[Linux-zigbee-devel] [PATCH net-next 15/15] at86rf230: remove function for setting irq polarity

2014-04-22 Thread Alexander Aring
The function is small enough, we don't need a extra function for this. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 6e

[Linux-zigbee-devel] [PATCH net-next 00/15] at86rf230 cleanup

2014-04-22 Thread Alexander Aring
Hi, this is the first patch series to cleanup the at86rf230 driver. Later I want to implement regmap and a asynchron spi handling for transmit and receiving frames. If all seems fine I will send these patches to net-next tomorrow. - Alex Alexander Aring (15): at86rf230: use irq_get_trigger_ty

[Linux-zigbee-devel] [PATCH net-next 13/15] at86rf230: remove unnecessary spi_set_drvdata

2014-04-22 Thread Alexander Aring
Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index d1fca56..5079036 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at8

[Linux-zigbee-devel] [PATCH net-next 04/15] at86rf230: use devm_request_irq

2014-04-22 Thread Alexander Aring
This patch replace request_irq with devm_request_irq. With devm_request_irq we don't need to care about freeing the irq. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/net/ieee802154/at

[Linux-zigbee-devel] [PATCH net-next 06/15] at86rf230: add missing MODULE_DEVICE_TABLE

2014-04-22 Thread Alexander Aring
Signed-off-by: Alexander Aring Reported-by: Varka Bhadram --- drivers/net/ieee802154/at86rf230.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index d52700f..46d992a 100644 --- a/drivers/net/ieee802154/at86rf230.c +++

[Linux-zigbee-devel] [PATCH net-next 01/15] at86rf230: use irq_get_trigger_type

2014-04-22 Thread Alexander Aring
This patch removes the platform data for the irq_type. We use instead the irq_get_trigger_type function to get these flags which should already configured by the interrupt controller. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 28 include

[Linux-zigbee-devel] [PATCH] 6lowpan: nuke net_ieee802154_lowpan() accessor when 6lowpan is disabled

2014-04-22 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" Johannes noted this is not needed, all of the fragment accessors don't need CONFIG_NET_NS. This goes test compiled with CONFIG_BT_6LOWPAN=y and a disabled CONFIG_NET_NS. CC: Alexander Smirnov Cc: Dmitry Eremin-Solenikov Cc: linux-zigbee-devel@lists.sourceforge.net Cc:

Re: [Linux-zigbee-devel] [PATCH 1/3] 6lowpan: add helper to get 6lowpan namespace

2014-04-22 Thread Luis R. Rodriguez
On Tue, Apr 22, 2014 at 11:45 AM, Johannes Berg wrote: > On Tue, 2014-04-22 at 19:58 +0200, Luis R. Rodriguez wrote: > >> > > > +#if IS_ENABLED(CONFIG_IEEE802154_6LOWPAN) >> > > > [...] >> > > > +#else >> > > > +static inline struct netns_ieee802154_lowpan * >> > > > +net_ieee802154_lowpan(struct

Re: [Linux-zigbee-devel] [PATCH 1/3] 6lowpan: add helper to get 6lowpan namespace

2014-04-22 Thread Luis R. Rodriguez
On Tue, Apr 22, 2014 at 11:49 AM, Alexander Aring wrote: > On Tue, Apr 22, 2014 at 08:45:15PM +0200, Johannes Berg wrote: >> On Tue, 2014-04-22 at 19:58 +0200, Luis R. Rodriguez wrote: >> >> > > > > +#if IS_ENABLED(CONFIG_IEEE802154_6LOWPAN) >> > > > > [...] >> > > > > +#else >> > > > > +static in

Re: [Linux-zigbee-devel] [PATCH net-next 12/15] at86rf230: remove unnecessary buf on heap

2014-04-22 Thread Phoebe Buckheister
On Tue, April 22, 2014 8:55 pm, Alexander Aring wrote: > This patch puts a buffer on the stack instead of heap. There is no need > to hold the buffer on the heap. I put that there because I was told that heap memory is DMA safe, while stack memory need not be. If you intend to change that back to

Re: [Linux-zigbee-devel] [PATCH net-next 12/15] at86rf230: remove unnecessary buf on heap

2014-04-22 Thread Alexander Aring
On Tue, Apr 22, 2014 at 10:13:40PM +0200, Phoebe Buckheister wrote: > On Tue, April 22, 2014 8:55 pm, Alexander Aring wrote: > > This patch puts a buffer on the stack instead of heap. There is no need > > to hold the buffer on the heap. > > I put that there because I was told that heap memory is D