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
865f31e0
Commit
865f31e0
authored
May 19, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/acme/net-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents
bb923b74
a59e8eb9
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
70 deletions
+57
-70
drivers/net/wan/sdla.c
drivers/net/wan/sdla.c
+2
-1
drivers/net/wan/sdla_chdlc.c
drivers/net/wan/sdla_chdlc.c
+1
-1
drivers/net/wan/sdla_fr.c
drivers/net/wan/sdla_fr.c
+1
-0
drivers/net/wan/sdla_ppp.c
drivers/net/wan/sdla_ppp.c
+1
-0
drivers/net/wan/sdla_x25.c
drivers/net/wan/sdla_x25.c
+1
-0
net/wanrouter/wanproc.c
net/wanrouter/wanproc.c
+51
-68
No files found.
drivers/net/wan/sdla.c
View file @
865f31e0
...
...
@@ -1639,6 +1639,7 @@ int __init sdla_init(struct net_device *dev)
dev
->
hard_header_len
=
0
;
dev
->
addr_len
=
0
;
dev
->
mtu
=
SDLA_MAX_MTU
;
SET_MODULE_OWNER
(
dev
);
flp
->
activate
=
sdla_activate
;
flp
->
deactivate
=
sdla_deactivate
;
...
...
drivers/net/wan/sdla_chdlc.c
View file @
865f31e0
...
...
@@ -915,7 +915,6 @@ static int if_init(struct net_device* dev)
dev
->
tx_timeout
=
&
if_tx_timeout
;
dev
->
watchdog_timeo
=
TX_TIMEOUT
;
/* Initialize media-specific parameters */
dev
->
flags
|=
IFF_POINTOPOINT
;
dev
->
flags
|=
IFF_NOARP
;
...
...
@@ -951,6 +950,7 @@ static int if_init(struct net_device* dev)
* by stack.
*/
dev
->
tx_queue_len
=
100
;
SET_MODULE_OWNER
(
dev
);
return
0
;
}
...
...
drivers/net/wan/sdla_fr.c
View file @
865f31e0
...
...
@@ -1187,6 +1187,7 @@ static int if_init(struct net_device* dev)
dev
->
base_addr
=
wandev
->
ioport
;
dev
->
mem_start
=
wandev
->
maddr
;
dev
->
mem_end
=
wandev
->
maddr
+
wandev
->
msize
-
1
;
SET_MODULE_OWNER
(
dev
);
return
0
;
}
...
...
drivers/net/wan/sdla_ppp.c
View file @
865f31e0
...
...
@@ -722,6 +722,7 @@ static int if_init(struct net_device *dev)
/* Set transmit buffer queue length */
dev
->
tx_queue_len
=
100
;
SET_MODULE_OWNER
(
dev
);
return
0
;
}
...
...
drivers/net/wan/sdla_x25.c
View file @
865f31e0
...
...
@@ -1148,6 +1148,7 @@ static int if_init(struct net_device* dev)
/* Set transmit buffer queue length */
dev
->
tx_queue_len
=
100
;
SET_MODULE_OWNER
(
dev
);
/* FIXME Why are we doing this */
set_chan_state
(
dev
,
WAN_DISCONNECTED
);
...
...
net/wanrouter/wanproc.c
View file @
865f31e0
...
...
@@ -20,22 +20,17 @@
* Dec 13, 1996 Gene Kozin Initial version (based on Sangoma's WANPIPE)
*****************************************************************************/
#include <linux/version.h>
#include <linux/config.h>
#include <linux/init.h>
/* __initfunc et al. */
#include <linux/stddef.h>
/* offsetof(), etc. */
#include <linux/errno.h>
/* return codes */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
/* kmalloc(), kfree() */
#include <linux/mm.h>
/* verify_area(), etc. */
#include <linux/string.h>
/* inline mem*, str* functions */
#include <asm/byteorder.h>
/* htons(), etc. */
#include <asm/io.h>
#include <linux/wanrouter.h>
/* WAN router API definitions */
#include <linux/seq_file.h>
#include <linux/smp_lock.h>
#include <linux/init.h>
/* __initfunc et al. */
#include <asm/
uaccess.h>
/* copy_to_user */
#include <asm/
io.h>
#define PROC_STATS_FORMAT "%30s: %12lu\n"
...
...
@@ -48,16 +43,6 @@
(prot == WANCONFIG_MPPP) ? " MPPP" : \
" Unknown" )
/****** Data Types **********************************************************/
typedef
struct
wan_stat_entry
{
struct
wan_stat_entry
*
next
;
char
*
description
;
/* description string */
void
*
data
;
/* -> data */
unsigned
data_type
;
/* data type */
}
wan_stat_entry_t
;
/****** Function Prototypes *************************************************/
#ifdef CONFIG_PROC_FS
...
...
@@ -106,12 +91,14 @@ static void *r_start(struct seq_file *m, loff_t *pos)
;
return
wandev
;
}
static
void
*
r_next
(
struct
seq_file
*
m
,
void
*
v
,
loff_t
*
pos
)
{
struct
wan_device
*
wandev
=
v
;
(
*
pos
)
++
;
return
(
v
==
(
void
*
)
1
)
?
router_devlist
:
wandev
->
next
;
}
static
void
r_stop
(
struct
seq_file
*
m
,
void
*
v
)
{
unlock_kernel
();
...
...
@@ -121,8 +108,8 @@ static int config_show(struct seq_file *m, void *v)
{
struct
wan_device
*
p
=
v
;
if
(
v
==
(
void
*
)
1
)
{
seq_puts
(
m
,
"Device name | port |IRQ|DMA| mem.addr |"
);
seq_puts
(
m
,
"mem.size|option1|option2|option3|option4
\n
"
);
seq_puts
(
m
,
"Device name | port |IRQ|DMA| mem.addr |"
"mem.size|option1|option2|option3|option4
\n
"
);
return
0
;
}
if
(
!
p
->
state
)
...
...
@@ -137,21 +124,21 @@ static int status_show(struct seq_file *m, void *v)
{
struct
wan_device
*
p
=
v
;
if
(
v
==
(
void
*
)
1
)
{
seq_puts
(
m
,
"Device name |protocol|station|interface|"
);
seq_puts
(
m
,
"clocking|baud rate| MTU |ndev|link state
\n
"
);
seq_puts
(
m
,
"Device name |protocol|station|interface|"
"clocking|baud rate| MTU |ndev|link state
\n
"
);
return
0
;
}
if
(
!
p
->
state
)
return
0
;
seq_printf
(
m
,
"%-15s|%-8s|
%-7s|
%-9s|%-8s|%9u|%5u|%3u |"
,
seq_printf
(
m
,
"%-15s|%-8s|
%-7s|
%-9s|%-8s|%9u|%5u|%3u |"
,
p
->
name
,
PROT_DECODE
(
p
->
config_id
),
p
->
config_id
==
WANCONFIG_FR
?
(
p
->
station
?
"
Node"
:
"
CPE"
)
:
(
p
->
station
?
"
Node"
:
"
CPE"
)
:
(
p
->
config_id
==
WANCONFIG_X25
?
(
p
->
station
?
"
DCE"
:
"
DTE"
)
:
(
"
N/A"
)),
p
->
interface
?
"
V.35"
:
"
RS-232"
,
(
p
->
station
?
"
DCE"
:
"
DTE"
)
:
(
"N/A"
)),
p
->
interface
?
"
V.35"
:
"
RS-232"
,
p
->
clocking
?
"internal"
:
"external"
,
p
->
bps
,
p
->
mtu
,
...
...
@@ -178,17 +165,17 @@ static int status_show(struct seq_file *m, void *v)
}
static
struct
seq_operations
config_op
=
{
.
start
=
r_start
,
.
start
=
r_start
,
.
next
=
r_next
,
.
stop
=
r_stop
,
.
show
=
config_show
.
show
=
config_show
,
};
static
struct
seq_operations
status_op
=
{
.
start
=
r_start
,
.
start
=
r_start
,
.
next
=
r_next
,
.
stop
=
r_stop
,
.
show
=
status_show
.
show
=
status_show
,
};
static
int
config_open
(
struct
inode
*
inode
,
struct
file
*
file
)
...
...
@@ -201,8 +188,7 @@ static int status_open(struct inode *inode, struct file *file)
return
seq_open
(
file
,
&
status_op
);
}
static
struct
file_operations
config_fops
=
{
static
struct
file_operations
config_fops
=
{
.
owner
=
THIS_MODULE
,
.
open
=
config_open
,
.
read
=
seq_read
,
...
...
@@ -210,8 +196,7 @@ static struct file_operations config_fops =
.
release
=
seq_release
,
};
static
struct
file_operations
status_fops
=
{
static
struct
file_operations
status_fops
=
{
.
owner
=
THIS_MODULE
,
.
open
=
status_open
,
.
read
=
seq_read
,
...
...
@@ -235,11 +220,11 @@ static int wandev_show(struct seq_file *m, void *v)
if
(
wandev
->
update
)
{
int
err
=
wandev
->
update
(
wandev
);
if
(
err
==
-
EAGAIN
)
{
seq_p
rintf
(
m
,
"Device is busy!
\n
"
);
seq_p
uts
(
m
,
"Device is busy!
\n
"
);
return
0
;
}
if
(
err
)
{
seq_p
rintf
(
m
,
"Device is not configured!
\n
"
);
seq_p
uts
(
m
,
"Device is not configured!
\n
"
);
return
0
;
}
}
...
...
@@ -286,8 +271,7 @@ static int wandev_open(struct inode *inode, struct file *file)
return
single_open
(
file
,
wandev_show
,
PDE
(
inode
)
->
data
);
}
static
struct
file_operations
wandev_fops
=
{
static
struct
file_operations
wandev_fops
=
{
.
owner
=
THIS_MODULE
,
.
open
=
wandev_open
,
.
read
=
seq_read
,
...
...
@@ -300,7 +284,7 @@ static struct file_operations wandev_fops =
* Initialize router proc interface.
*/
int
__init
wanrouter_proc_init
(
void
)
int
__init
wanrouter_proc_init
(
void
)
{
struct
proc_dir_entry
*
p
;
proc_router
=
proc_mkdir
(
ROUTER_NAME
,
proc_net
);
...
...
@@ -328,11 +312,11 @@ int __init wanrouter_proc_init (void)
* Clean up router proc interface.
*/
void
wanrouter_proc_cleanup
(
void
)
void
wanrouter_proc_cleanup
(
void
)
{
remove_proc_entry
(
"config"
,
proc_router
);
remove_proc_entry
(
"status"
,
proc_router
);
remove_proc_entry
(
ROUTER_NAME
,
proc_net
);
remove_proc_entry
(
ROUTER_NAME
,
proc_net
);
}
/*
...
...
@@ -355,7 +339,6 @@ int wanrouter_proc_add(struct wan_device* wandev)
/*
* Delete directory entry for WAN device.
*/
int
wanrouter_proc_delete
(
struct
wan_device
*
wandev
)
{
if
(
wandev
->
magic
!=
ROUTER_MAGIC
)
...
...
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