Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
aea54bce
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
aea54bce
编写于
7月 01, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-next' of
git://git2.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan
上级
3e878b8d
0ac9ebed
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
6 deletion
+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
未找到文件。
drivers/ieee802154/Makefile
浏览文件 @
aea54bce
obj-$(CONFIG_IEEE802154_FAKEHARD)
+=
fakehard.o
ccflags-y
:=
-DDEBUG
-DCONFIG_FFD
drivers/ieee802154/fakehard.c
浏览文件 @
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
浏览文件 @
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
浏览文件 @
aea54bce
/*
*
ZigBee
socket interface
*
IEEE 802.15.4 dgram
socket interface
*
* Copyright 2007, 2008 Siemens AG
*
...
...
net/ieee802154/nl-phy.c
浏览文件 @
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:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录