netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code
@ 2011-06-30 12:37 Dmitry Eremin-Solenikov
  2011-06-30 12:37 ` [PATCH 1/5] fakehard: stop setting platform_data as it's unused anymore Dmitry Eremin-Solenikov
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-06-30 12:37 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

Hello,

Please merge the following changes into the net-next repo:

The following changes since commit 1049f6413f6e52572a768ca1590fa479ef0a48e8:

  myri10ge: Update MAINTAINERS (2011-06-29 06:02:05 -0700)

are available in the git repository at:
  git://git2.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git for-next

Alexander Smirnov (1):
      ieee802154: free skb buffer if dev isn't running

Dmitry Eremin-Solenikov (3):
      fakehard: stop setting platform_data as it's unused anymore
      ieee802154: support specifying hw address for created devices
      ieee802154: it's IEEE 802.15.4, not ZigBee

Werner Almesberger (1):
      IEEE 802.15.4: do not enable driver debugging by default

 drivers/ieee802154/Makefile    |    2 --
 drivers/ieee802154/fakehard.c  |    2 --
 net/ieee802154/af_ieee802154.c |    2 +-
 net/ieee802154/dgram.c         |    2 +-
 net/ieee802154/nl-phy.c        |   31 +++++++++++++++++++++++++++++++
 5 files changed, 33 insertions(+), 6 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] fakehard: stop setting platform_data as it's unused anymore
  2011-06-30 12:37 [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code Dmitry Eremin-Solenikov
@ 2011-06-30 12:37 ` Dmitry Eremin-Solenikov
  2011-06-30 12:37 ` [PATCH 2/5] ieee802154: support specifying hw address for created devices Dmitry Eremin-Solenikov
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-06-30 12:37 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

Previously dev.platform_data was used to store a pointer to net device.
Now this code was gone. Drop it.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 drivers/ieee802154/fakehard.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/ieee802154/fakehard.c b/drivers/ieee802154/fakehard.c
index a5a49a1..eb0e2cc 100644
--- a/drivers/ieee802154/fakehard.c
+++ b/drivers/ieee802154/fakehard.c
@@ -370,8 +370,6 @@ static int __devinit ieee802154fake_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 
-	phy->dev.platform_data = dev;
-
 	memcpy(dev->dev_addr, "\xba\xbe\xca\xfe\xde\xad\xbe\xef",
 			dev->addr_len);
 	memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/5] ieee802154: support specifying hw address for created devices
  2011-06-30 12:37 [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code Dmitry Eremin-Solenikov
  2011-06-30 12:37 ` [PATCH 1/5] fakehard: stop setting platform_data as it's unused anymore Dmitry Eremin-Solenikov
@ 2011-06-30 12:37 ` Dmitry Eremin-Solenikov
  2011-06-30 12:37 ` [PATCH 3/5] ieee802154: it's IEEE 802.15.4, not ZigBee Dmitry Eremin-Solenikov
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-06-30 12:37 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

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

diff --git a/net/ieee802154/nl-phy.c b/net/ieee802154/nl-phy.c
index 02548b2..c64a38d 100644
--- a/net/ieee802154/nl-phy.c
+++ b/net/ieee802154/nl-phy.c
@@ -24,6 +24,7 @@
 
 #include <linux/kernel.h>
 #include <linux/slab.h>
+#include <linux/if_arp.h>
 #include <net/netlink.h>
 #include <net/genetlink.h>
 #include <net/wpan-phy.h>
@@ -213,12 +214,37 @@ static int ieee802154_add_iface(struct sk_buff *skb,
 		goto nla_put_failure;
 	}
 
+	if (info->attrs[IEEE802154_ATTR_HW_ADDR] &&
+	    nla_len(info->attrs[IEEE802154_ATTR_HW_ADDR]) !=
+			IEEE802154_ADDR_LEN) {
+		rc = -EINVAL;
+		goto nla_put_failure;
+	}
+
 	dev = phy->add_iface(phy, devname);
 	if (IS_ERR(dev)) {
 		rc = PTR_ERR(dev);
 		goto nla_put_failure;
 	}
 
+	if (info->attrs[IEEE802154_ATTR_HW_ADDR]) {
+		struct sockaddr addr;
+
+		addr.sa_family = ARPHRD_IEEE802154;
+		nla_memcpy(&addr.sa_data, info->attrs[IEEE802154_ATTR_HW_ADDR],
+				IEEE802154_ADDR_LEN);
+
+		/*
+		 * strangely enough, some callbacks (inetdev_event) from
+		 * dev_set_mac_address require RTNL_LOCK
+		 */
+		rtnl_lock();
+		rc = dev_set_mac_address(dev, &addr);
+		rtnl_unlock();
+		if (rc)
+			goto dev_unregister;
+	}
+
 	NLA_PUT_STRING(msg, IEEE802154_ATTR_PHY_NAME, wpan_phy_name(phy));
 	NLA_PUT_STRING(msg, IEEE802154_ATTR_DEV_NAME, dev->name);
 
@@ -228,6 +254,11 @@ static int ieee802154_add_iface(struct sk_buff *skb,
 
 	return ieee802154_nl_reply(msg, info);
 
+dev_unregister:
+	rtnl_lock(); /* del_iface must be called with RTNL lock */
+	phy->del_iface(phy, dev);
+	dev_put(dev);
+	rtnl_unlock();
 nla_put_failure:
 	nlmsg_free(msg);
 out_dev:
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5] ieee802154: it's IEEE 802.15.4, not ZigBee
  2011-06-30 12:37 [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code Dmitry Eremin-Solenikov
  2011-06-30 12:37 ` [PATCH 1/5] fakehard: stop setting platform_data as it's unused anymore Dmitry Eremin-Solenikov
  2011-06-30 12:37 ` [PATCH 2/5] ieee802154: support specifying hw address for created devices Dmitry Eremin-Solenikov
@ 2011-06-30 12:37 ` Dmitry Eremin-Solenikov
  2011-06-30 12:37 ` [PATCH 4/5] ieee802154: free skb buffer if dev isn't running Dmitry Eremin-Solenikov
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-06-30 12:37 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

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

diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c
index 1a3334c..faecf64 100644
--- a/net/ieee802154/dgram.c
+++ b/net/ieee802154/dgram.c
@@ -1,5 +1,5 @@
 /*
- * ZigBee socket interface
+ * IEEE 802.15.4 dgram socket interface
  *
  * Copyright 2007, 2008 Siemens AG
  *
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] ieee802154: free skb buffer if dev isn't running
  2011-06-30 12:37 [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code Dmitry Eremin-Solenikov
                   ` (2 preceding siblings ...)
  2011-06-30 12:37 ` [PATCH 3/5] ieee802154: it's IEEE 802.15.4, not ZigBee Dmitry Eremin-Solenikov
@ 2011-06-30 12:37 ` Dmitry Eremin-Solenikov
  2011-06-30 12:37 ` [PATCH 5/5] IEEE 802.15.4: do not enable driver debugging by default Dmitry Eremin-Solenikov
  2011-07-01 23:17 ` [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code David Miller
  5 siblings, 0 replies; 7+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-06-30 12:37 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Alexander Smirnov

From: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 net/ieee802154/af_ieee802154.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ieee802154/af_ieee802154.c b/net/ieee802154/af_ieee802154.c
index 6df6ecf..40e606f 100644
--- a/net/ieee802154/af_ieee802154.c
+++ b/net/ieee802154/af_ieee802154.c
@@ -302,7 +302,7 @@ static int ieee802154_rcv(struct sk_buff *skb, struct net_device *dev,
 	struct packet_type *pt, struct net_device *orig_dev)
 {
 	if (!netif_running(dev))
-		return -ENODEV;
+		goto drop;
 	pr_debug("got frame, type %d, dev %p\n", dev->type, dev);
 #ifdef DEBUG
 	print_hex_dump_bytes("ieee802154_rcv ", DUMP_PREFIX_NONE, skb->data, skb->len);
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] IEEE 802.15.4: do not enable driver debugging by default
  2011-06-30 12:37 [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code Dmitry Eremin-Solenikov
                   ` (3 preceding siblings ...)
  2011-06-30 12:37 ` [PATCH 4/5] ieee802154: free skb buffer if dev isn't running Dmitry Eremin-Solenikov
@ 2011-06-30 12:37 ` Dmitry Eremin-Solenikov
  2011-07-01 23:17 ` [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code David Miller
  5 siblings, 0 replies; 7+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-06-30 12:37 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Werner Almesberger

From: Werner Almesberger <werner@almesberger.net>

The IEEE 802.15.4 drivers were compiled by default with debugging,
which caused them to be rather chatty and slow. This patch silences
them. People debugging drivers can still add a #define DEBUG in the
beginning of the respective file or use dynamic debug

This patch also removes the now unused option CONFIG_FFD.

Signed-off-by: Werner Almesberger <werner@almesberger.net>
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 drivers/ieee802154/Makefile |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/ieee802154/Makefile b/drivers/ieee802154/Makefile
index 6899913..800a389 100644
--- a/drivers/ieee802154/Makefile
+++ b/drivers/ieee802154/Makefile
@@ -1,3 +1 @@
 obj-$(CONFIG_IEEE802154_FAKEHARD) += fakehard.o
-
-ccflags-y := -DDEBUG -DCONFIG_FFD
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code
  2011-06-30 12:37 [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code Dmitry Eremin-Solenikov
                   ` (4 preceding siblings ...)
  2011-06-30 12:37 ` [PATCH 5/5] IEEE 802.15.4: do not enable driver debugging by default Dmitry Eremin-Solenikov
@ 2011-07-01 23:17 ` David Miller
  5 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-07-01 23:17 UTC (permalink / raw)
  To: dbaryshkov; +Cc: netdev

From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Date: Thu, 30 Jun 2011 16:37:43 +0400

> The following changes since commit 1049f6413f6e52572a768ca1590fa479ef0a48e8:
> 
>   myri10ge: Update MAINTAINERS (2011-06-29 06:02:05 -0700)
> 
> are available in the git repository at:
>   git://git2.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git for-next

Pulled, thanks Dmitry.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-07-01 23:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-30 12:37 [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code Dmitry Eremin-Solenikov
2011-06-30 12:37 ` [PATCH 1/5] fakehard: stop setting platform_data as it's unused anymore Dmitry Eremin-Solenikov
2011-06-30 12:37 ` [PATCH 2/5] ieee802154: support specifying hw address for created devices Dmitry Eremin-Solenikov
2011-06-30 12:37 ` [PATCH 3/5] ieee802154: it's IEEE 802.15.4, not ZigBee Dmitry Eremin-Solenikov
2011-06-30 12:37 ` [PATCH 4/5] ieee802154: free skb buffer if dev isn't running Dmitry Eremin-Solenikov
2011-06-30 12:37 ` [PATCH 5/5] IEEE 802.15.4: do not enable driver debugging by default Dmitry Eremin-Solenikov
2011-07-01 23:17 ` [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).