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
nexedi
linux
Commits
6d012ae2
Commit
6d012ae2
authored
Jul 15, 2003
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Dynamic net_device for serial eql balancer.
parent
f945e9c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
24 deletions
+17
-24
drivers/net/eql.c
drivers/net/eql.c
+17
-24
No files found.
drivers/net/eql.c
View file @
6d012ae2
...
@@ -162,22 +162,12 @@ static void eql_timer(unsigned long param)
...
@@ -162,22 +162,12 @@ static void eql_timer(unsigned long param)
static
char
version
[]
__initdata
=
static
char
version
[]
__initdata
=
"Equalizer2002: Simon Janes (simon@ncm.com) and David S. Miller (davem@redhat.com)
\n
"
;
"Equalizer2002: Simon Janes (simon@ncm.com) and David S. Miller (davem@redhat.com)
\n
"
;
static
int
__init
eql_init
(
struct
net_device
*
dev
)
static
void
__init
eql_setup
(
struct
net_device
*
dev
)
{
{
static
unsigned
int
version_printed
;
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
;
SET_MODULE_OWNER
(
dev
);
SET_MODULE_OWNER
(
dev
);
if
(
version_printed
++
==
0
)
printk
(
version
);
dev
->
priv
=
kmalloc
(
sizeof
(
equalizer_t
),
GFP_KERNEL
);
if
(
dev
->
priv
==
NULL
)
return
-
ENOMEM
;
memset
(
dev
->
priv
,
0
,
sizeof
(
equalizer_t
));
eql
=
dev
->
priv
;
init_timer
(
&
eql
->
timer
);
init_timer
(
&
eql
->
timer
);
eql
->
timer
.
data
=
(
unsigned
long
)
dev
->
priv
;
eql
->
timer
.
data
=
(
unsigned
long
)
dev
->
priv
;
eql
->
timer
.
expires
=
jiffies
+
EQL_DEFAULT_RESCHED_IVAL
;
eql
->
timer
.
expires
=
jiffies
+
EQL_DEFAULT_RESCHED_IVAL
;
...
@@ -203,8 +193,6 @@ static int __init eql_init(struct net_device *dev)
...
@@ -203,8 +193,6 @@ static int __init eql_init(struct net_device *dev)
dev
->
type
=
ARPHRD_SLIP
;
dev
->
type
=
ARPHRD_SLIP
;
dev
->
tx_queue_len
=
5
;
/* Hands them off fast */
dev
->
tx_queue_len
=
5
;
/* Hands them off fast */
return
0
;
}
}
static
int
eql_open
(
struct
net_device
*
dev
)
static
int
eql_open
(
struct
net_device
*
dev
)
...
@@ -598,23 +586,28 @@ static int eql_s_master_cfg(struct net_device *dev, master_config_t *mcp)
...
@@ -598,23 +586,28 @@ static int eql_s_master_cfg(struct net_device *dev, master_config_t *mcp)
return
-
EINVAL
;
return
-
EINVAL
;
}
}
static
struct
net_device
dev_eql
;
static
struct
net_device
*
dev_eql
;
static
int
__init
eql_init_module
(
void
)
static
int
__init
eql_init_module
(
void
)
{
{
strcpy
(
dev_eql
.
name
,
"eql"
);
int
err
;
dev_eql
.
init
=
eql_init
;
if
(
register_netdev
(
&
dev_eql
)
!=
0
)
{
printk
(
version
);
printk
(
"eql: register_netdev() returned non-zero.
\n
"
);
return
-
EIO
;
dev_eql
=
alloc_netdev
(
sizeof
(
equalizer_t
),
"eql"
,
eql_setup
);
}
if
(
!
dev_eql
)
return
0
;
return
-
ENOMEM
;
err
=
register_netdev
(
dev_eql
);
if
(
err
)
kfree
(
dev_eql
);
return
err
;
}
}
static
void
__exit
eql_cleanup_module
(
void
)
static
void
__exit
eql_cleanup_module
(
void
)
{
{
kfree
(
dev_eql
.
priv
);
unregister_netdev
(
dev_eql
);
unregister_netdev
(
&
dev_eql
);
kfree
(
dev_eql
);
}
}
module_init
(
eql_init_module
);
module_init
(
eql_init_module
);
...
...
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