diff mbox

[v2,net-next,11/12] 6lowpan: use the PANID provided by the device instead of a static value

Message ID 1364270372-19430-12-git-send-email-tony.cheneau@amnesiak.org
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Tony Cheneau March 26, 2013, 3:59 a.m. UTC
Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
---
 net/ieee802154/6lowpan.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index d1d4ee6..276971b 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -577,10 +577,12 @@  static int lowpan_header_create(struct sk_buff *skb,
 
 		/* prepare wpan address data */
 		sa.addr_type = IEEE802154_ADDR_LONG;
-		sa.pan_id = 0xff;
+		sa.pan_id = ieee802154_mlme_ops(dev)->get_pan_id(dev);
+
 		memcpy(&(sa.hwaddr), saddr, 8);
+		/* intra-PAN communications */
+		da.pan_id = ieee802154_mlme_ops(dev)->get_pan_id(dev);
 
-		da.pan_id = 0xff;
 		/*
 		 * if the destination address is the broadcast address, use the
 		 * corresponding short address