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
63e2c2ce
Commit
63e2c2ce
authored
Jul 14, 2003
by
Chas Williams
Committed by
David S. Miller
Jul 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: Cleanup br2684_ioctl_hook.
parent
0fd6bf3e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
10 deletions
+22
-10
net/atm/br2684.c
net/atm/br2684.c
+5
-4
net/atm/common.c
net/atm/common.c
+16
-6
net/atm/common.h
net/atm/common.h
+1
-0
No files found.
net/atm/br2684.c
View file @
63e2c2ce
...
...
@@ -16,9 +16,12 @@ Author: Marcell GAL, 2000, XDSL Ltd, Hungary
#include <linux/ip.h>
#include <asm/uaccess.h>
#include <net/arp.h>
#include <linux/atm.h>
#include <linux/atmdev.h>
#include <linux/atmbr2684.h>
#include "common.h"
#include "ipcommon.h"
/*
...
...
@@ -768,8 +771,6 @@ static struct file_operations br2684_proc_operations = {
extern
struct
proc_dir_entry
*
atm_proc_root
;
/* from proc.c */
extern
int
(
*
br2684_ioctl_hook
)(
struct
atm_vcc
*
,
unsigned
int
,
unsigned
long
);
/* the following avoids some spurious warnings from the compiler */
#define UNUSED __attribute__((unused))
...
...
@@ -779,14 +780,14 @@ static int __init UNUSED br2684_init(void)
if
((
p
=
create_proc_entry
(
"br2684"
,
0
,
atm_proc_root
))
==
NULL
)
return
-
ENOMEM
;
p
->
proc_fops
=
&
br2684_proc_operations
;
br2684_ioctl_
hook
=
br2684_ioctl
;
br2684_ioctl_
set
(
br2684_ioctl
)
;
return
0
;
}
static
void
__exit
UNUSED
br2684_exit
(
void
)
{
struct
br2684_dev
*
brdev
;
br2684_ioctl_
hook
=
NULL
;
br2684_ioctl_
set
(
NULL
)
;
remove_proc_entry
(
"br2684"
,
atm_proc_root
);
while
(
!
list_empty
(
&
br2684_devs
))
{
brdev
=
list_entry_brdev
(
br2684_devs
.
next
);
...
...
net/atm/common.c
View file @
63e2c2ce
...
...
@@ -145,9 +145,18 @@ EXPORT_SYMBOL(pppoatm_ioctl_set);
#endif
#if defined(CONFIG_ATM_BR2684) || defined(CONFIG_ATM_BR2684_MODULE)
int
(
*
br2684_ioctl_hook
)(
struct
atm_vcc
*
,
unsigned
int
,
unsigned
long
);
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_
hook
);
EXPORT_SYMBOL
(
br2684_ioctl_
set
);
#endif
#endif
...
...
@@ -880,11 +889,12 @@ int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
goto
done
;
#endif
#if defined(CONFIG_ATM_BR2684) || defined(CONFIG_ATM_BR2684_MODULE)
if
(
br2684_ioctl_hook
)
{
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
);
...
...
net/atm/common.h
View file @
63e2c2ce
...
...
@@ -27,6 +27,7 @@ int vcc_getsockopt(struct socket *sock, int level, int optname, char *optval,
void
atm_shutdown_dev
(
struct
atm_dev
*
dev
);
void
pppoatm_ioctl_set
(
int
(
*
hook
)(
struct
atm_vcc
*
,
unsigned
int
,
unsigned
long
));
void
br2684_ioctl_set
(
int
(
*
hook
)(
struct
atm_vcc
*
,
unsigned
int
,
unsigned
long
));
int
atmpvc_init
(
void
);
void
atmpvc_exit
(
void
);
...
...
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