Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
aea54bce
Commit
aea54bce
authored
Jul 01, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-next' of
git://git2.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan
parents
3e878b8d
0ac9ebed
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
6 deletions
+33
-6
drivers/ieee802154/Makefile
drivers/ieee802154/Makefile
+0
-2
drivers/ieee802154/fakehard.c
drivers/ieee802154/fakehard.c
+0
-2
net/ieee802154/af_ieee802154.c
net/ieee802154/af_ieee802154.c
+1
-1
net/ieee802154/dgram.c
net/ieee802154/dgram.c
+1
-1
net/ieee802154/nl-phy.c
net/ieee802154/nl-phy.c
+31
-0
No files found.
drivers/ieee802154/Makefile
View file @
aea54bce
obj-$(CONFIG_IEEE802154_FAKEHARD)
+=
fakehard.o
ccflags-y
:=
-DDEBUG
-DCONFIG_FFD
drivers/ieee802154/fakehard.c
View file @
aea54bce
...
...
@@ -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
);
...
...
net/ieee802154/af_ieee802154.c
View file @
aea54bce
...
...
@@ -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
);
...
...
net/ieee802154/dgram.c
View file @
aea54bce
/*
*
ZigBee
socket interface
*
IEEE 802.15.4 dgram
socket interface
*
* Copyright 2007, 2008 Siemens AG
*
...
...
net/ieee802154/nl-phy.c
View file @
aea54bce
...
...
@@ -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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment