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
8bedf7c7
Commit
8bedf7c7
authored
Sep 25, 2003
by
Chas Williams
Committed by
David S. Miller
Sep 25, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: [ioctl][3/8] Use new code for pppoatm and br2684 (from levon@movementarian.org)
parent
2267e86d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
55 deletions
+21
-55
net/atm/br2684.c
net/atm/br2684.c
+11
-3
net/atm/ioctl.c
net/atm/ioctl.c
+0
-49
net/atm/pppoatm.c
net/atm/pppoatm.c
+10
-3
No files found.
net/atm/br2684.c
View file @
8bedf7c7
...
...
@@ -634,9 +634,11 @@ static int br2684_create(unsigned long arg)
* This handles ioctls actually performed on our vcc - we must return
* -ENOIOCTLCMD for any unrecognized ioctl
*/
static
int
br2684_ioctl
(
struct
atm_vcc
*
atmvcc
,
unsigned
int
cmd
,
static
int
br2684_ioctl
(
struct
socket
*
sock
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
atm_vcc
*
atmvcc
=
ATM_SD
(
sock
);
int
err
;
switch
(
cmd
)
{
case
ATM_SETBACKEND
:
...
...
@@ -667,6 +669,12 @@ static int br2684_ioctl(struct atm_vcc *atmvcc, unsigned int cmd,
return
-
ENOIOCTLCMD
;
}
static
struct
atm_ioctl
br2684_ioctl_ops
=
{
.
owner
=
THIS_MODULE
,
.
ioctl
=
br2684_ioctl
,
};
#ifdef CONFIG_PROC_FS
static
void
*
br2684_seq_start
(
struct
seq_file
*
seq
,
loff_t
*
pos
)
{
...
...
@@ -774,7 +782,7 @@ static int __init br2684_init(void)
return
-
ENOMEM
;
p
->
proc_fops
=
&
br2684_proc_ops
;
#endif
br2684_ioctl_set
(
br2684_ioctl
);
register_atm_ioctl
(
&
br2684_ioctl_ops
);
return
0
;
}
...
...
@@ -783,7 +791,7 @@ static void __exit br2684_exit(void)
struct
net_device
*
net_dev
;
struct
br2684_dev
*
brdev
;
struct
br2684_vcc
*
brvcc
;
br2684_ioctl_set
(
NULL
);
deregister_atm_ioctl
(
&
br2684_ioctl_ops
);
#ifdef CONFIG_PROC_FS
remove_proc_entry
(
"br2684"
,
atm_proc_root
);
...
...
net/atm/ioctl.c
View file @
8bedf7c7
...
...
@@ -122,38 +122,6 @@ EXPORT_SYMBOL(atm_clip_ops_set);
#endif
#endif
#if defined(CONFIG_PPPOATM) || defined(CONFIG_PPPOATM_MODULE)
static
DECLARE_MUTEX
(
pppoatm_ioctl_mutex
);
static
int
(
*
pppoatm_ioctl_hook
)(
struct
atm_vcc
*
,
unsigned
int
,
unsigned
long
);
void
pppoatm_ioctl_set
(
int
(
*
hook
)(
struct
atm_vcc
*
,
unsigned
int
,
unsigned
long
))
{
down
(
&
pppoatm_ioctl_mutex
);
pppoatm_ioctl_hook
=
hook
;
up
(
&
pppoatm_ioctl_mutex
);
}
#ifdef CONFIG_PPPOATM_MODULE
EXPORT_SYMBOL
(
pppoatm_ioctl_set
);
#endif
#endif
#if defined(CONFIG_ATM_BR2684) || defined(CONFIG_ATM_BR2684_MODULE)
static
DECLARE_MUTEX
(
br2684_ioctl_mutex
);
static
int
(
*
br2684_ioctl_hook
)(
struct
atm_vcc
*
,
unsigned
int
,
unsigned
long
);
void
br2684_ioctl_set
(
int
(
*
hook
)(
struct
atm_vcc
*
,
unsigned
int
,
unsigned
long
))
{
down
(
&
br2684_ioctl_mutex
);
br2684_ioctl_hook
=
hook
;
up
(
&
br2684_ioctl_mutex
);
}
#ifdef CONFIG_ATM_BR2684_MODULE
EXPORT_SYMBOL
(
br2684_ioctl_set
);
#endif
#endif
static
DECLARE_MUTEX
(
ioctl_mutex
);
static
LIST_HEAD
(
ioctl_list
);
...
...
@@ -434,23 +402,6 @@ int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
if
(
error
!=
-
ENOIOCTLCMD
)
goto
done
;
#if defined(CONFIG_PPPOATM) || defined(CONFIG_PPPOATM_MODULE)
down
(
&
pppoatm_ioctl_mutex
);
if
(
pppoatm_ioctl_hook
)
error
=
pppoatm_ioctl_hook
(
vcc
,
cmd
,
arg
);
up
(
&
pppoatm_ioctl_mutex
);
if
(
error
!=
-
ENOIOCTLCMD
)
goto
done
;
#endif
#if defined(CONFIG_ATM_BR2684) || defined(CONFIG_ATM_BR2684_MODULE)
down
(
&
br2684_ioctl_mutex
);
if
(
br2684_ioctl_hook
)
error
=
br2684_ioctl_hook
(
vcc
,
cmd
,
arg
);
up
(
&
br2684_ioctl_mutex
);
if
(
error
!=
-
ENOIOCTLCMD
)
goto
done
;
#endif
error
=
atm_dev_ioctl
(
cmd
,
arg
);
done:
...
...
net/atm/pppoatm.c
View file @
8bedf7c7
...
...
@@ -315,9 +315,11 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, unsigned long arg)
* This handles ioctls actually performed on our vcc - we must return
* -ENOIOCTLCMD for any unrecognized ioctl
*/
static
int
pppoatm_ioctl
(
struct
atm_vcc
*
atmvcc
,
unsigned
int
cmd
,
static
int
pppoatm_ioctl
(
struct
socket
*
sock
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
atm_vcc
*
atmvcc
=
ATM_SD
(
sock
);
if
(
cmd
!=
ATM_SETBACKEND
&&
atmvcc
->
push
!=
pppoatm_push
)
return
-
ENOIOCTLCMD
;
switch
(
cmd
)
{
...
...
@@ -341,15 +343,20 @@ static int pppoatm_ioctl(struct atm_vcc *atmvcc, unsigned int cmd,
return
-
ENOIOCTLCMD
;
}
struct
atm_ioctl
pppoatm_ioctl_ops
=
{
.
owner
=
THIS_MODULE
,
.
ioctl
=
pppoatm_ioctl
,
};
static
int
__init
pppoatm_init
(
void
)
{
pppoatm_ioctl_set
(
pppoatm_ioctl
);
register_atm_ioctl
(
&
pppoatm_ioctl_ops
);
return
0
;
}
static
void
__exit
pppoatm_exit
(
void
)
{
pppoatm_ioctl_set
(
NULL
);
deregister_atm_ioctl
(
&
pppoatm_ioctl_ops
);
}
module_init
(
pppoatm_init
);
...
...
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