Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
4dfce407
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
4dfce407
编写于
6月 30, 2008
作者:
K
Krzysztof Hałasa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
WAN: cosmetic changes to generic HDLC
Signed-off-by:
N
Krzysztof Hałasa
<
khc@pm.waw.pl
>
上级
d6f8aa85
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
65 addition
and
72 deletion
+65
-72
drivers/net/wan/hdlc.c
drivers/net/wan/hdlc.c
+12
-13
drivers/net/wan/hdlc_cisco.c
drivers/net/wan/hdlc_cisco.c
+14
-15
drivers/net/wan/hdlc_fr.c
drivers/net/wan/hdlc_fr.c
+9
-10
drivers/net/wan/hdlc_ppp.c
drivers/net/wan/hdlc_ppp.c
+7
-8
drivers/net/wan/hdlc_raw.c
drivers/net/wan/hdlc_raw.c
+7
-8
drivers/net/wan/hdlc_raw_eth.c
drivers/net/wan/hdlc_raw_eth.c
+8
-9
drivers/net/wan/hdlc_x25.c
drivers/net/wan/hdlc_x25.c
+8
-9
未找到文件。
drivers/net/wan/hdlc.c
浏览文件 @
4dfce407
...
...
@@ -22,20 +22,19 @@
* - proto->start() and stop() are called with spin_lock_irq held.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/errno.h>
#include <linux/hdlc.h>
#include <linux/if_arp.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/pkt_sched.h>
#include <linux/inetdevice.h>
#include <linux/lapb.h>
#include <linux/poll.h>
#include <linux/rtnetlink.h>
#include <linux/
notifier
.h>
#include <linux/
hdlc
.h>
#include <linux/
skbuff
.h>
#include <linux/
slab
.h>
#include <net/net_namespace.h>
...
...
@@ -109,7 +108,7 @@ static int hdlc_device_event(struct notifier_block *this, unsigned long event,
if
(
dev
->
get_stats
!=
hdlc_get_stats
)
return
NOTIFY_DONE
;
/* not an HDLC device */
if
(
event
!=
NETDEV_CHANGE
)
return
NOTIFY_DONE
;
/* Only interrested in carrier changes */
...
...
@@ -357,7 +356,7 @@ static struct packet_type hdlc_packet_type = {
static
struct
notifier_block
hdlc_notifier
=
{
.
notifier_call
=
hdlc_device_event
,
.
notifier_call
=
hdlc_device_event
,
};
...
...
@@ -367,8 +366,8 @@ static int __init hdlc_module_init(void)
printk
(
KERN_INFO
"%s
\n
"
,
version
);
if
((
result
=
register_netdevice_notifier
(
&
hdlc_notifier
))
!=
0
)
return
result
;
dev_add_pack
(
&
hdlc_packet_type
);
return
result
;
dev_add_pack
(
&
hdlc_packet_type
);
return
0
;
}
...
...
drivers/net/wan/hdlc_cisco.c
浏览文件 @
4dfce407
...
...
@@ -9,19 +9,18 @@
* as published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/errno.h>
#include <linux/hdlc.h>
#include <linux/if_arp.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pkt_sched.h>
#include <linux/inetdevice.h>
#include <linux/lapb.h>
#include <linux/poll.h>
#include <linux/rtnetlink.h>
#include <linux/hdlc.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#undef DEBUG_HARD_HEADER
...
...
@@ -68,9 +67,9 @@ struct cisco_state {
static
int
cisco_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
);
static
inline
struct
cisco_state
*
state
(
hdlc_device
*
hdlc
)
static
inline
struct
cisco_state
*
state
(
hdlc_device
*
hdlc
)
{
return
(
struct
cisco_state
*
)(
hdlc
->
state
)
;
return
(
struct
cisco_state
*
)
hdlc
->
state
;
}
...
...
@@ -172,7 +171,7 @@ static int cisco_rx(struct sk_buff *skb)
data
->
address
!=
CISCO_UNICAST
)
goto
rx_error
;
switch
(
ntohs
(
data
->
protocol
))
{
switch
(
ntohs
(
data
->
protocol
))
{
case
CISCO_SYS_INFO
:
/* Packet is not needed, drop it. */
dev_kfree_skb_any
(
skb
);
...
...
@@ -336,7 +335,7 @@ static struct hdlc_proto proto = {
static
const
struct
header_ops
cisco_header_ops
=
{
.
create
=
cisco_hard_header
,
};
static
int
cisco_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
)
{
cisco_proto
__user
*
cisco_s
=
ifr
->
ifr_settings
.
ifs_ifsu
.
cisco
;
...
...
@@ -359,10 +358,10 @@ static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr)
return
0
;
case
IF_PROTO_CISCO
:
if
(
!
capable
(
CAP_NET_ADMIN
))
if
(
!
capable
(
CAP_NET_ADMIN
))
return
-
EPERM
;
if
(
dev
->
flags
&
IFF_UP
)
if
(
dev
->
flags
&
IFF_UP
)
return
-
EBUSY
;
if
(
copy_from_user
(
&
new_settings
,
cisco_s
,
size
))
...
...
@@ -372,7 +371,7 @@ static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr)
new_settings
.
timeout
<
2
)
return
-
EINVAL
;
result
=
hdlc
->
attach
(
dev
,
ENCODING_NRZ
,
PARITY_CRC16_PR1_CCITT
);
result
=
hdlc
->
attach
(
dev
,
ENCODING_NRZ
,
PARITY_CRC16_PR1_CCITT
);
if
(
result
)
return
result
;
...
...
drivers/net/wan/hdlc_fr.c
浏览文件 @
4dfce407
...
...
@@ -33,20 +33,19 @@
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/errno.h>
#include <linux/etherdevice.h>
#include <linux/hdlc.h>
#include <linux/if_arp.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pkt_sched.h>
#include <linux/inetdevice.h>
#include <linux/lapb.h>
#include <linux/poll.h>
#include <linux/rtnetlink.h>
#include <linux/
etherdevice
.h>
#include <linux/
hdlc
.h>
#include <linux/
skbuff
.h>
#include <linux/
slab
.h>
#undef DEBUG_PKT
#undef DEBUG_ECN
...
...
@@ -96,7 +95,7 @@ typedef struct {
unsigned
ea1
:
1
;
unsigned
cr
:
1
;
unsigned
dlcih
:
6
;
unsigned
ea2
:
1
;
unsigned
de
:
1
;
unsigned
becn
:
1
;
...
...
drivers/net/wan/hdlc_ppp.c
浏览文件 @
4dfce407
...
...
@@ -9,19 +9,18 @@
* as published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/errno.h>
#include <linux/hdlc.h>
#include <linux/if_arp.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pkt_sched.h>
#include <linux/inetdevice.h>
#include <linux/lapb.h>
#include <linux/poll.h>
#include <linux/rtnetlink.h>
#include <linux/hdlc.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <net/syncppp.h>
struct
ppp_state
{
...
...
drivers/net/wan/hdlc_raw.c
浏览文件 @
4dfce407
...
...
@@ -9,19 +9,18 @@
* as published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/errno.h>
#include <linux/hdlc.h>
#include <linux/if_arp.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pkt_sched.h>
#include <linux/inetdevice.h>
#include <linux/lapb.h>
#include <linux/poll.h>
#include <linux/rtnetlink.h>
#include <linux/hdlc.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
static
int
raw_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
);
...
...
drivers/net/wan/hdlc_raw_eth.c
浏览文件 @
4dfce407
...
...
@@ -9,20 +9,19 @@
* as published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/errno.h>
#include <linux/etherdevice.h>
#include <linux/hdlc.h>
#include <linux/if_arp.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pkt_sched.h>
#include <linux/inetdevice.h>
#include <linux/lapb.h>
#include <linux/poll.h>
#include <linux/rtnetlink.h>
#include <linux/
etherdevice
.h>
#include <linux/
hdlc
.h>
#include <linux/
skbuff
.h>
#include <linux/
slab
.h>
static
int
raw_eth_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
);
...
...
drivers/net/wan/hdlc_x25.c
浏览文件 @
4dfce407
...
...
@@ -9,20 +9,19 @@
* as published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/errno.h>
#include <linux/hdlc.h>
#include <linux/if_arp.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/pkt_sched.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/lapb.h>
#include <linux/module.h>
#include <linux/pkt_sched.h>
#include <linux/poll.h>
#include <linux/rtnetlink.h>
#include <linux/
hdlc
.h>
#include <linux/
skbuff
.h>
#include <linux/slab.h>
#include <net/x25device.h>
static
int
x25_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录