Pierre-emmanuel Goudet | 15 Sep 2009 19:02

Re: About "Userspace tools" compilation & use

It has been a bit tricky to compile "Userspace tools" but it's done.

=> Many tools where missing on my Lenny: libtool, libnl-dev bison, flex, 
pkg-info (maybe i should have look for a developpement distribution ;O)
=> My autoconf is 2.61 and not 2.64, thus URL functionnalitie from 
AC_INIT does not exists (i've added an AC_DEFINE) to avoid source code 
modification
=> I had to create a "m4" directory under linux-zigbee
=> Then just a little mistake in izattach.c that required "argc==3" but 
there just one argument to command (SERIAL_DEV) (.. just add a fake 
argument ...)

Ok  my "userspace tools" are now availables".

But please could you give me a bit more information about the way to use 
my serial interface, with your tools (iz, izchat, ...), once izattach is 
running ?

Notice that i could see that izattach has succedded in making the link 
with my serial device ... a tail on /var/log/syslog can show me received 
characters: " ... ieee802154_tty_receive 53 69 ..."

Best regards

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
(Continue reading)

Pierre-emmanuel Goudet | 15 Sep 2009 18:54
Picon

Re: About "Userspace tools" compilation & use

It has been a bit tricky to compile "Userspace tools" but it's done.

=> Many tools where missing on my Lenny: libtool, libnl-dev bison, flex, 
pkg-info (maybe i should have look for a developpement distribution ;O)
=> My autoconf is 2.61 and not 2.64, thus URL functionnalitie from 
AC_INIT does not exists (i've added an AC_DEFINE) to avoid source code 
modification
=> I had to create a "m4" directory under linux-zigbee
=> Then just a little mistake in izattach.c that required "argc==3" but 
there just one argument to command (SERIAL_DEV) (.. just add a fake 
argument ...)

Ok  my "userspace tools" are now availables".

But please could you give me a bit more information about the way to use 
my serial interface, with your tools (iz, izchat, ...), once izattach is 
running ?

Notice that i could see that izattach has succedded in making the link 
with my serial device ... a tail on /var/log/syslog can show me received 
characters: " ... ieee802154_tty_receive 53 69 ..."

Best regards

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
(Continue reading)

Dmitry Eremin-Solenikov | 16 Sep 2009 00:12
Picon
Gravatar

[GIT PULL 0/7] Small IEEE 802.15.4 updates

Hi, Dave,

Could you please pull small updates for IEEE 802.15.4 targeted
into 2.6.32-rcX. Thank you.

The following changes since commit 4142e0d1def2c0176c27fd2e810243045a62eb6d:
  Linus Torvalds (1):
        Merge branch 'osync_cleanup' of git://git.kernel.org/.../jack/linux-fs-2.6

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git for-next

Dmitry Eremin-Solenikov (7):
      af_ieee802154: setsockopt optlen arg isn't __user
      ieee802154: add locking for seq numbers
      ieee802154: add a helper to put the wpan_phy device
      ieee802154: add wpan-phy iteration functions
      ieee802154: merge nl802154 and wpan-class in single module
      nl802154: split away MAC commands implementation
      ieee802154: add LIST_PHY command support

 include/linux/nl802154.h    |    1 +
 include/net/wpan-phy.h      |    8 +
 net/ieee802154/Makefile     |    4 +-
 net/ieee802154/dgram.c      |    2 +-
 net/ieee802154/ieee802154.h |   48 ++++
 net/ieee802154/netlink.c    |  616 ++-----------------------------------------
 net/ieee802154/nl-mac.c     |  609 ++++++++++++++++++++++++++++++++++++++++++
 net/ieee802154/nl-phy.c     |  175 ++++++++++++
(Continue reading)

Dmitry Eremin-Solenikov | 16 Sep 2009 00:12
Picon
Gravatar

[PATCH 1/7] af_ieee802154: setsockopt optlen arg isn't __user

Remove __user annotation from optlen arg as it's bogus.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov <at> gmail.com>
---
 net/ieee802154/dgram.c |    2 +-
 net/ieee802154/raw.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c
index 77ae685..51593a4 100644
--- a/net/ieee802154/dgram.c
+++ b/net/ieee802154/dgram.c
 <at>  <at>  -414,7 +414,7  <at>  <at>  static int dgram_getsockopt(struct sock *sk, int level, int optname,
 }

 static int dgram_setsockopt(struct sock *sk, int level, int optname,
-		    char __user *optval, int __user optlen)
+		    char __user *optval, int optlen)
 {
 	struct dgram_sock *ro = dgram_sk(sk);
 	int val;
diff --git a/net/ieee802154/raw.c b/net/ieee802154/raw.c
index 4681501..1319885 100644
--- a/net/ieee802154/raw.c
+++ b/net/ieee802154/raw.c
 <at>  <at>  -244,7 +244,7  <at>  <at>  static int raw_getsockopt(struct sock *sk, int level, int optname,
 }

 static int raw_setsockopt(struct sock *sk, int level, int optname,
-		    char __user *optval, int __user optlen)
(Continue reading)

Dmitry Eremin-Solenikov | 16 Sep 2009 00:13
Picon
Gravatar

[PATCH 3/7] ieee802154: add a helper to put the wpan_phy device

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov <at> gmail.com>
---
 include/net/wpan-phy.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h
index 547b1e2..5e803a0 100644
--- a/include/net/wpan-phy.h
+++ b/include/net/wpan-phy.h
 <at>  <at>  -56,6 +56,12  <at>  <at>  static inline void *wpan_phy_priv(struct wpan_phy *phy)
 }

 struct wpan_phy *wpan_phy_find(const char *str);
+
+static inline void wpan_phy_put(struct wpan_phy *phy)
+{
+	put_device(&phy->dev);
+}
+
 static inline const char *wpan_phy_name(struct wpan_phy *phy)
 {
 	return dev_name(&phy->dev);
--

-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Dmitry Eremin-Solenikov | 16 Sep 2009 00:13
Picon
Gravatar

[PATCH 2/7] ieee802154: add locking for seq numbers

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov <at> gmail.com>
---
 net/ieee802154/netlink.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/ieee802154/netlink.c b/net/ieee802154/netlink.c
index 2106ecb..ca767bd 100644
--- a/net/ieee802154/netlink.c
+++ b/net/ieee802154/netlink.c
 <at>  <at>  -35,6 +35,7  <at>  <at> 
 #include <net/ieee802154_netdev.h>

 static unsigned int ieee802154_seq_num;
+static DEFINE_SPINLOCK(ieee802154_seq_lock);

 static struct genl_family ieee802154_coordinator_family = {
 	.id		= GENL_ID_GENERATE,
 <at>  <at>  -57,12 +58,15  <at>  <at>  static struct sk_buff *ieee802154_nl_create(int flags, u8 req)
 {
 	void *hdr;
 	struct sk_buff *msg = nlmsg_new(NLMSG_GOODSIZE, GFP_ATOMIC);
+	unsigned long f;

 	if (!msg)
 		return NULL;

+	spin_lock_irqsave(&ieee802154_seq_lock, f);
 	hdr = genlmsg_put(msg, 0, ieee802154_seq_num++,
 			&ieee802154_coordinator_family, flags, req);
+	spin_unlock_irqrestore(&ieee802154_seq_lock, f);
(Continue reading)

Dmitry Eremin-Solenikov | 16 Sep 2009 00:13
Picon
Gravatar

[PATCH 5/7] ieee802154: merge nl802154 and wpan-class in single module

There is no real need to have ieee802154 interfaces separate
into several small modules, as neither of them has it's own use.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov <at> gmail.com>
---
 net/ieee802154/Makefile     |    4 ++--
 net/ieee802154/netlink.c    |    9 ++-------
 net/ieee802154/wpan-class.c |   23 ++++++++++++++++++++---
 3 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/net/ieee802154/Makefile b/net/ieee802154/Makefile
index 4068a9f..42b1f0d 100644
--- a/net/ieee802154/Makefile
+++ b/net/ieee802154/Makefile
 <at>  <at>  -1,5 +1,5  <at>  <at> 
-obj-$(CONFIG_IEEE802154) +=	nl802154.o af_802154.o wpan-class.o
-nl802154-y		:= netlink.o nl_policy.o
+obj-$(CONFIG_IEEE802154) +=	ieee802154.o af_802154.o
+ieee802154-y		:= netlink.o nl_policy.o wpan-class.o
 af_802154-y		:= af_ieee802154.o raw.o dgram.o

 ccflags-y += -Wall -DDEBUG
diff --git a/net/ieee802154/netlink.c b/net/ieee802154/netlink.c
index ca767bd..0fadd6b 100644
--- a/net/ieee802154/netlink.c
+++ b/net/ieee802154/netlink.c
 <at>  <at>  -643,7 +643,7  <at>  <at>  static struct genl_ops ieee802154_coordinator_ops[] = {
 							ieee802154_dump_iface),
 };

(Continue reading)

Dmitry Eremin-Solenikov | 16 Sep 2009 00:13
Picon
Gravatar

[PATCH 4/7] ieee802154: add wpan-phy iteration functions

Add API to iterate over the wpan-phy instances.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov <at> gmail.com>
---
 include/net/wpan-phy.h      |    2 ++
 net/ieee802154/wpan-class.c |   25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h
index 5e803a0..3367dd9 100644
--- a/include/net/wpan-phy.h
+++ b/include/net/wpan-phy.h
 <at>  <at>  -48,6 +48,8  <at>  <at>  struct wpan_phy *wpan_phy_alloc(size_t priv_size);
 int wpan_phy_register(struct device *parent, struct wpan_phy *phy);
 void wpan_phy_unregister(struct wpan_phy *phy);
 void wpan_phy_free(struct wpan_phy *phy);
+/* Same semantics as for class_for_each_device */
+int wpan_phy_for_each(int (*fn)(struct wpan_phy *phy, void *data), void *data);

 static inline void *wpan_phy_priv(struct wpan_phy *phy)
 {
diff --git a/net/ieee802154/wpan-class.c b/net/ieee802154/wpan-class.c
index f306604..0cec138 100644
--- a/net/ieee802154/wpan-class.c
+++ b/net/ieee802154/wpan-class.c
 <at>  <at>  -91,6 +91,31  <at>  <at>  struct wpan_phy *wpan_phy_find(const char *str)
 }
 EXPORT_SYMBOL(wpan_phy_find);

+struct wpan_phy_iter_data {
(Continue reading)

Dmitry Eremin-Solenikov | 16 Sep 2009 00:13
Picon
Gravatar

[PATCH 7/7] ieee802154: add LIST_PHY command support

Add nl802154 command to get information about PHY's present in
the system.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov <at> gmail.com>
---
 include/linux/nl802154.h |    1 +
 net/ieee802154/Makefile  |    2 +-
 net/ieee802154/netlink.c |    4 +
 net/ieee802154/nl-phy.c  |  175 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 181 insertions(+), 1 deletions(-)
 create mode 100644 net/ieee802154/nl-phy.c

diff --git a/include/linux/nl802154.h b/include/linux/nl802154.h
index b7d9435..8707678 100644
--- a/include/linux/nl802154.h
+++ b/include/linux/nl802154.h
 <at>  <at>  -114,6 +114,7  <at>  <at>  enum {
 	IEEE802154_RX_ENABLE_CONF, /* Not supported yet */

 	IEEE802154_LIST_IFACE,
+	IEEE802154_LIST_PHY,

 	__IEEE802154_CMD_MAX,
 };
diff --git a/net/ieee802154/Makefile b/net/ieee802154/Makefile
index 69af9f6..ce2d335 100644
--- a/net/ieee802154/Makefile
+++ b/net/ieee802154/Makefile
 <at>  <at>  -1,5 +1,5  <at>  <at> 
 obj-$(CONFIG_IEEE802154) +=	ieee802154.o af_802154.o
(Continue reading)

Dmitry Eremin-Solenikov | 16 Sep 2009 00:13
Picon
Gravatar

[PATCH 6/7] nl802154: split away MAC commands implementation

Move all mac-related stuff to separate file so that ieee802154/netlink.c
contains only generic code.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov <at> gmail.com>
---
 net/ieee802154/Makefile                |    2 +-
 net/ieee802154/ieee802154.h            |   48 +++
 net/ieee802154/netlink.c               |  605 +-------------------------------
 net/ieee802154/{netlink.c => nl-mac.c} |  117 ++-----
 4 files changed, 81 insertions(+), 691 deletions(-)
 create mode 100644 net/ieee802154/ieee802154.h
 copy net/ieee802154/{netlink.c => nl-mac.c} (86%)

diff --git a/net/ieee802154/Makefile b/net/ieee802154/Makefile
index 42b1f0d..69af9f6 100644
--- a/net/ieee802154/Makefile
+++ b/net/ieee802154/Makefile
 <at>  <at>  -1,5 +1,5  <at>  <at> 
 obj-$(CONFIG_IEEE802154) +=	ieee802154.o af_802154.o
-ieee802154-y		:= netlink.o nl_policy.o wpan-class.o
+ieee802154-y		:= netlink.o nl-mac.o nl_policy.o wpan-class.o
 af_802154-y		:= af_ieee802154.o raw.o dgram.o

 ccflags-y += -Wall -DDEBUG
diff --git a/net/ieee802154/ieee802154.h b/net/ieee802154/ieee802154.h
new file mode 100644
index 0000000..0790eb0
--- /dev/null
+++ b/net/ieee802154/ieee802154.h
 <at>  <at>  -0,0 +1,48  <at>  <at> 
(Continue reading)


Gmane