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
999fdfc4
Commit
999fdfc4
authored
Jul 15, 2003
by
Chas Williams
Committed by
Hideaki Yoshifuji
Jul 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: Use sk_state_change() and eliminate vcc->callback().
parent
6d012ae2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
17 deletions
+12
-17
include/linux/atmdev.h
include/linux/atmdev.h
+0
-1
net/atm/common.c
net/atm/common.c
+9
-1
net/atm/signaling.c
net/atm/signaling.c
+3
-6
net/atm/svc.c
net/atm/svc.c
+0
-9
No files found.
include/linux/atmdev.h
View file @
999fdfc4
...
...
@@ -297,7 +297,6 @@ struct atm_vcc {
short
itf
;
/* interface number */
struct
sockaddr_atmsvc
local
;
struct
sockaddr_atmsvc
remote
;
void
(
*
callback
)(
struct
atm_vcc
*
vcc
);
int
reply
;
/* also used by ATMTCP */
/* Multipoint part ------------------------------------------------- */
struct
atm_vcc
*
session
;
/* session VCC descriptor */
...
...
net/atm/common.c
View file @
999fdfc4
...
...
@@ -235,6 +235,14 @@ static void vcc_sock_destruct(struct sock *sk)
kfree
(
sk
->
sk_protinfo
);
}
static
void
vcc_def_wakeup
(
struct
sock
*
sk
)
{
read_lock
(
&
sk
->
sk_callback_lock
);
if
(
sk
->
sk_sleep
&&
waitqueue_active
(
sk
->
sk_sleep
))
wake_up
(
sk
->
sk_sleep
);
read_unlock
(
&
sk
->
sk_callback_lock
);
}
int
vcc_create
(
struct
socket
*
sock
,
int
protocol
,
int
family
)
{
...
...
@@ -248,6 +256,7 @@ int vcc_create(struct socket *sock, int protocol, int family)
if
(
!
sk
)
return
-
ENOMEM
;
sock_init_data
(
NULL
,
sk
);
sk
->
sk_state_change
=
vcc_def_wakeup
;
vcc
=
atm_sk
(
sk
)
=
kmalloc
(
sizeof
(
*
vcc
),
GFP_KERNEL
);
if
(
!
vcc
)
{
...
...
@@ -258,7 +267,6 @@ int vcc_create(struct socket *sock, int protocol, int family)
memset
(
vcc
,
0
,
sizeof
(
*
vcc
));
vcc
->
sk
=
sk
;
vcc
->
dev
=
NULL
;
vcc
->
callback
=
NULL
;
memset
(
&
vcc
->
local
,
0
,
sizeof
(
struct
sockaddr_atmsvc
));
memset
(
&
vcc
->
remote
,
0
,
sizeof
(
struct
sockaddr_atmsvc
));
vcc
->
qos
.
txtp
.
max_sdu
=
1
<<
16
;
/* for meta VCs */
...
...
net/atm/signaling.c
View file @
999fdfc4
...
...
@@ -137,11 +137,8 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
}
vcc
->
sk
->
sk_ack_backlog
++
;
skb_queue_tail
(
&
vcc
->
sk
->
sk_receive_queue
,
skb
);
if
(
vcc
->
callback
)
{
DPRINTK
(
"waking vcc->sleep 0x%p
\n
"
,
&
vcc
->
sleep
);
vcc
->
callback
(
vcc
);
}
DPRINTK
(
"waking vcc->sleep 0x%p
\n
"
,
&
vcc
->
sleep
);
vcc
->
sk
->
sk_state_change
(
vcc
->
sk
);
as_indicate_complete:
release_sock
(
vcc
->
sk
);
return
0
;
...
...
@@ -159,7 +156,7 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
(
int
)
msg
->
type
);
return
-
EINVAL
;
}
if
(
vcc
->
callback
)
vcc
->
callback
(
vcc
);
vcc
->
sk
->
sk_state_change
(
vcc
->
sk
);
dev_kfree_skb
(
skb
);
return
0
;
}
...
...
net/atm/svc.c
View file @
999fdfc4
...
...
@@ -43,14 +43,6 @@ static int svc_create(struct socket *sock,int protocol);
*/
void
svc_callback
(
struct
atm_vcc
*
vcc
)
{
wake_up
(
&
vcc
->
sleep
);
}
static
int
svc_shutdown
(
struct
socket
*
sock
,
int
how
)
{
return
0
;
...
...
@@ -547,7 +539,6 @@ static int svc_create(struct socket *sock,int protocol)
sock
->
ops
=
&
svc_proto_ops
;
error
=
vcc_create
(
sock
,
protocol
,
AF_ATMSVC
);
if
(
error
)
return
error
;
ATM_SD
(
sock
)
->
callback
=
svc_callback
;
ATM_SD
(
sock
)
->
local
.
sas_family
=
AF_ATMSVC
;
ATM_SD
(
sock
)
->
remote
.
sas_family
=
AF_ATMSVC
;
return
0
;
...
...
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