Jonathan Cameron | 5 Jun 2010 22:57
Picon
Picon
Favicon

Re: warning message from ieee802154_tx

On 05/20/10 14:06, Xue Liu wrote:
> Hi,
> 
> Recently I update my zigbee kernel source tree. I use iz and
> izcoordinator to test it on imote2. When I run iz assoc,
> I get a warning message from ieee802154_tx:

I'm seeing exactly the same thing with a similar platform (stargate 2).
Was wondering if anyone had gotten back to you off list or if you had
any more idea yourself?

Thanks,

Jonathan
> 
> ------------[ cut here ]------------
> WARNING: at net/mac802154/tx.c:76 ieee802154_tx+0x6c/0x1c0 [mac802154]()
> Modules linked in: cc2420 mac802154 af_802154 ieee802154 [last unloaded:
> mac802154]
> [<c0024504>] (unwind_backtrace+0x0/0xdc) from [<c003221c>]
> (warn_slowpath_common+0x4c/0x80)
> [<c003221c>] (warn_slowpath_common+0x4c/0x80) from [<bf037204>]
> (ieee802154_tx+0x6c/0x1c0 [mac802154])
> [<bf037204>] (ieee802154_tx+0x6c/0x1c0 [mac802154]) from [<c01896fc>]
> (dev_hard_start_xmit+0x20c/0x2ec)
> [<c01896fc>] (dev_hard_start_xmit+0x20c/0x2ec) from [<c01978a0>]
> (sch_direct_xmit+0x44/0x168)
> [<c01978a0>] (sch_direct_xmit+0x44/0x168) from [<c0189c40>]
> (dev_queue_xmit+0x320/0x4a4)
> [<c0189c40>] (dev_queue_xmit+0x320/0x4a4) from [<bf038a58>]
(Continue reading)

Jonathan Cameron | 5 Jun 2010 23:21
Picon
Picon
Favicon

Re: warning message from ieee802154_tx

On 06/05/10 21:57, Jonathan Cameron wrote:
> On 05/20/10 14:06, Xue Liu wrote:
>> Hi,
>>
>> Recently I update my zigbee kernel source tree. I use iz and
>> izcoordinator to test it on imote2. When I run iz assoc,
>> I get a warning message from ieee802154_tx:
> 
> I'm seeing exactly the same thing with a similar platform (stargate 2).
> Was wondering if anyone had gotten back to you off list or if you had
> any more idea yourself?
> 
> Thanks,
> 
> Jonathan
>>
>> ------------[ cut here ]------------
>> WARNING: at net/mac802154/tx.c:76 ieee802154_tx+0x6c/0x1c0 [mac802154]()
>> Modules linked in: cc2420 mac802154 af_802154 ieee802154 [last unloaded:
>> mac802154]
>> [<c0024504>] (unwind_backtrace+0x0/0xdc) from [<c003221c>]
>> (warn_slowpath_common+0x4c/0x80)
>> [<c003221c>] (warn_slowpath_common+0x4c/0x80) from [<bf037204>]
>> (ieee802154_tx+0x6c/0x1c0 [mac802154])
>> [<bf037204>] (ieee802154_tx+0x6c/0x1c0 [mac802154]) from [<c01896fc>]
>> (dev_hard_start_xmit+0x20c/0x2ec)
>> [<c01896fc>] (dev_hard_start_xmit+0x20c/0x2ec) from [<c01978a0>]
>> (sch_direct_xmit+0x44/0x168)
>> [<c01978a0>] (sch_direct_xmit+0x44/0x168) from [<c0189c40>]
>> (dev_queue_xmit+0x320/0x4a4)
(Continue reading)

Jonathan Cameron | 5 Jun 2010 23:36
Picon
Picon
Favicon

Re: warning message from ieee802154_tx

On 06/05/10 22:21, Jonathan Cameron wrote:
> On 06/05/10 21:57, Jonathan Cameron wrote:
>> On 05/20/10 14:06, Xue Liu wrote:
>>> Hi,
>>>
>>> Recently I update my zigbee kernel source tree. I use iz and
>>> izcoordinator to test it on imote2. When I run iz assoc,
>>> I get a warning message from ieee802154_tx:
>>
>> I'm seeing exactly the same thing with a similar platform (stargate 2).
>> Was wondering if anyone had gotten back to you off list or if you had
>> any more idea yourself?
>>
>> Thanks,
>>
>> Jonathan
>>>
>>> ------------[ cut here ]------------
>>> WARNING: at net/mac802154/tx.c:76 ieee802154_tx+0x6c/0x1c0 [mac802154]()
>>> Modules linked in: cc2420 mac802154 af_802154 ieee802154 [last unloaded:
>>> mac802154]
>>> [<c0024504>] (unwind_backtrace+0x0/0xdc) from [<c003221c>]
>>> (warn_slowpath_common+0x4c/0x80)
>>> [<c003221c>] (warn_slowpath_common+0x4c/0x80) from [<bf037204>]
>>> (ieee802154_tx+0x6c/0x1c0 [mac802154])
>>> [<bf037204>] (ieee802154_tx+0x6c/0x1c0 [mac802154]) from [<c01896fc>]
>>> (dev_hard_start_xmit+0x20c/0x2ec)
>>> [<c01896fc>] (dev_hard_start_xmit+0x20c/0x2ec) from [<c01978a0>]
>>> (sch_direct_xmit+0x44/0x168)
>>> [<c01978a0>] (sch_direct_xmit+0x44/0x168) from [<c0189c40>]
(Continue reading)

Jonathan Cameron | 6 Jun 2010 16:16
Picon
Picon
Favicon

[PATCH 1/2] mac802154: fix channel mask check

Signed-off-by: Jonathan Cameron <jic23@...>
---
 net/mac802154/tx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index 24c55c9..af1db49 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
 <at>  <at>  -71,7 +71,7  <at>  <at>  netdev_tx_t ieee802154_tx(struct ieee802154_priv *priv, struct sk_buff *skb,
 	struct xmit_work *work;

 	if (WARN_ON(!(priv->phy->channels_supported[page] &
-					(chan))))
+					(1 << chan))))
 		return NETDEV_TX_OK;

 	if (!(priv->hw.flags & IEEE802154_HW_OMIT_CKSUM)) {
--

-- 
1.7.0.4

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
Jonathan Cameron | 6 Jun 2010 16:16
Picon
Picon
Favicon

[PATCH 2/2] stargate2: add cc2420 support

Signed-off-by: Jonathan Cameron <jic23@...>
---
 arch/arm/mach-pxa/stargate2.c |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index a98a434..4a70c17 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
 <at>  <at>  -51,6 +51,7  <at>  <at> 
 #include <linux/spi/spi.h>
 #include <linux/mfd/da903x.h>
 #include <linux/sht15.h>
+#include <linux/spi/cc2420.h>

 #include "devices.h"
 #include "generic.h"
 <at>  <at>  -695,6 +696,22  <at>  <at>  static struct pxa2xx_spi_chip cc2420_info = {
 	.gpio_cs = 39,
 };

+#define GPIO_FIFOP	0
+#define GPIO_SFD	16
+#define GPIO_RESET	22
+#define GPIO_FIFO	114
+#define GPIO_VREG	115
+#define GPIO_CCA	116
+
+static struct cc2420_platform_data cc2420_pdata = {
+	.fifo	= GPIO_FIFO,
(Continue reading)

Jonathan Cameron | 6 Jun 2010 20:55
Picon
Picon
Favicon

various minor issues.

Hi All,

I've just been looking at what happens if one diverts even
slightly from the setup approach on the getting started
page.

On classic is that if one attempt

iz assoc wpan0 0x777 1 10

(e.g. not a valid channel) there is no checking code in mac802154
to prevent this invalid option. In cc2420 at least, this triggers
a Bug on.

I'm not sure where best to check this (and return error).  Currently 
have added to

static int ieee802154_mlme_assoc_req(struct net_device *dev,
 		struct ieee802154_addr *addr, u8 channel, u8 page, u8 cap)

+	if (!(priv->hw->phy->channels_supported[page] &
+				(1 << channel)))
+		return -EINVAL;

which does the job, but I don't know my way around the code well enough
to say if this is the best place. (if it is I'm happy to submit a proper patch)

The other fun one I know of is the random error returned if one tries
to associate with a device before bringing it up.  Not sure what the correct
sanity check to prevent this. (by random error, I mean a random value that
(Continue reading)

Stefan Schmidt | 7 Jun 2010 09:11
Favicon
Gravatar

Re: [PATCH 2/2] stargate2: add cc2420 support

Hello.

On Sun, 2010-06-06 at 15:16, Jonathan Cameron wrote:
> Signed-off-by: Jonathan Cameron <jic23@...>

Acked-by: Stefan Schmidt <stefan@...>

> +#define GPIO_FIFOP	0
> +#define GPIO_SFD	16
> +#define GPIO_RESET	22
> +#define GPIO_FIFO	114
> +#define GPIO_VREG	115
> +#define GPIO_CCA	116

Nice to see that it uses the same GPIOs as imote2. That should make a later
merge of the two board file even easier.

regards
Stefan Schmidt

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
Stefan Schmidt | 7 Jun 2010 09:23
Favicon
Gravatar

Re: [PATCH 1/2] mac802154: fix channel mask check

Hello.

On Sun, 2010-06-06 at 15:16, Jonathan Cameron wrote:
> Signed-off-by: Jonathan Cameron <jic23@...>

Well spotted.

Acked-by: Stefan Schmidt <stefan@...>

regards
Stefan Schmidt

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
agogolev | 11 Jun 2010 14:25
Picon
Favicon

cc2420 linux radio power adjustment

Hello everyone,

Couldn't figure out how to set max rx/tx output power for cc2420.
Are there any user space commands (from root console, for example) to
adjust it, or I should recompile the kernel with some new driver
parameters?
What and where are these parameters?

Can anyone help? 
--

-- 
Respectfully yours, Alexander E. Gogolev

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
Jonathan Cameron | 11 Jun 2010 15:30
Picon
Picon
Favicon

Re: cc2420 linux radio power adjustment

On 06/11/10 13:25, agogolev wrote:
> Hello everyone,
> 
> Couldn't figure out how to set max rx/tx output power for cc2420.
> Are there any user space commands (from root console, for example) to
> adjust it, or I should recompile the kernel with some new driver
> parameters?
> What and where are these parameters?
> 
> Can anyone help? 
I can't currently see any driver support for this, so it looks like
you are going to have get your hands dirty in the driver.

>From the data sheet it looks like a simple register write to
TXCTRL.PA_LEVEL

Can't actually see any support for power control in any of the
drivers.

Jonathan

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo

Gmane