Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
01590d20
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
01590d20
编写于
4月 02, 2007
作者:
S
Stefan Richter
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ieee1394: eth1394: don't use alloc_etherdev
Signed-off-by:
N
Stefan Richter
<
stefanr@s5r6.in-berlin.de
>
上级
8a62bf79
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
15 deletion
+5
-15
drivers/ieee1394/eth1394.c
drivers/ieee1394/eth1394.c
+5
-15
未找到文件。
drivers/ieee1394/eth1394.c
浏览文件 @
01590d20
...
...
@@ -50,7 +50,6 @@
#include <linux/netdevice.h>
#include <linux/inetdevice.h>
#include <linux/etherdevice.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <linux/ip.h>
...
...
@@ -494,10 +493,8 @@ static void ether1394_reset_priv(struct net_device *dev, int set_mtu)
spin_unlock_irqrestore
(
&
priv
->
lock
,
flags
);
}
/* This function is called right before register_netdev */
static
void
ether1394_init_dev
(
struct
net_device
*
dev
)
{
/* Our functions */
dev
->
open
=
ether1394_open
;
dev
->
stop
=
ether1394_stop
;
dev
->
hard_start_xmit
=
ether1394_tx
;
...
...
@@ -510,10 +507,9 @@ static void ether1394_init_dev(struct net_device *dev)
dev
->
hard_header_cache
=
ether1394_header_cache
;
dev
->
header_cache_update
=
ether1394_header_cache_update
;
dev
->
hard_header_parse
=
ether1394_header_parse
;
dev
->
set_mac_address
=
NULL
;
SET_ETHTOOL_OPS
(
dev
,
&
ethtool_ops
);
/* Some constants */
dev
->
watchdog_timeo
=
ETHER1394_TIMEOUT
;
dev
->
flags
=
IFF_BROADCAST
|
IFF_MULTICAST
;
dev
->
features
=
NETIF_F_HIGHDMA
;
...
...
@@ -521,7 +517,8 @@ static void ether1394_init_dev(struct net_device *dev)
dev
->
hard_header_len
=
ETH1394_HLEN
;
dev
->
type
=
ARPHRD_IEEE1394
;
ether1394_reset_priv
(
dev
,
1
);
/* FIXME: This value was copied from ether_setup(). Is it too much? */
dev
->
tx_queue_len
=
1000
;
}
/*
...
...
@@ -551,11 +548,7 @@ static void ether1394_add_host(struct hpsb_host *host)
return
;
}
/* We should really have our own alloc_hpsbdev() function in
* net_init.c instead of calling the one for ethernet then hijacking
* it for ourselves. That way we'd be a real networking device. */
dev
=
alloc_etherdev
(
sizeof
(
struct
eth1394_priv
));
dev
=
alloc_netdev
(
sizeof
(
*
priv
),
"eth%d"
,
ether1394_init_dev
);
if
(
dev
==
NULL
)
{
ETH1394_PRINT_G
(
KERN_ERR
,
"Out of memory
\n
"
);
goto
out
;
...
...
@@ -568,21 +561,18 @@ static void ether1394_add_host(struct hpsb_host *host)
#endif
priv
=
netdev_priv
(
dev
);
INIT_LIST_HEAD
(
&
priv
->
ip_node_list
);
spin_lock_init
(
&
priv
->
lock
);
priv
->
host
=
host
;
priv
->
local_fifo
=
fifo_addr
;
hi
=
hpsb_create_hostinfo
(
&
eth1394_highlevel
,
host
,
sizeof
(
*
hi
));
if
(
hi
==
NULL
)
{
ETH1394_PRINT_G
(
KERN_ERR
,
"Out of memory
\n
"
);
goto
out
;
}
ether1394_
init_dev
(
dev
);
ether1394_
reset_priv
(
dev
,
1
);
if
(
register_netdev
(
dev
))
{
ETH1394_PRINT_G
(
KERN_ERR
,
"Cannot register the driver
\n
"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录