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
1d84746d
Commit
1d84746d
authored
Sep 22, 2002
by
Arnaldo Carvalho de Melo
Committed by
David S. Miller
Sep 22, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[LLC] use sk->state_change when p_flag is cleared or core state changes
parent
2efc5e41
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
10 deletions
+27
-10
include/net/llc_c_ac.h
include/net/llc_c_ac.h
+2
-0
net/llc/llc_c_ac.c
net/llc/llc_c_ac.c
+17
-6
net/llc/llc_conn.c
net/llc/llc_conn.c
+7
-3
net/llc/llc_main.c
net/llc/llc_main.c
+1
-1
No files found.
include/net/llc_c_ac.h
View file @
1d84746d
...
...
@@ -216,4 +216,6 @@ extern void llc_conn_busy_tmr_cb(unsigned long timeout_data);
extern
void
llc_conn_pf_cycle_tmr_cb
(
unsigned
long
timeout_data
);
extern
void
llc_conn_ack_tmr_cb
(
unsigned
long
timeout_data
);
extern
void
llc_conn_rej_tmr_cb
(
unsigned
long
timeout_data
);
extern
void
llc_conn_set_p_flag
(
struct
sock
*
sk
,
u8
value
);
#endif
/* LLC_C_AC_H */
net/llc/llc_c_ac.c
View file @
1d84746d
...
...
@@ -813,6 +813,16 @@ int llc_conn_ac_send_ack_xxx_x_set_0(struct sock *sk, struct sk_buff *skb)
return
rc
;
}
void
llc_conn_set_p_flag
(
struct
sock
*
sk
,
u8
value
)
{
int
state_changed
=
llc_sk
(
sk
)
->
p_flag
&&
!
value
;
llc_sk
(
sk
)
->
p_flag
=
value
;
if
(
state_changed
)
sk
->
state_change
(
sk
);
}
int
llc_conn_ac_send_sabme_cmd_p_set_x
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
int
rc
=
1
;
...
...
@@ -834,7 +844,8 @@ int llc_conn_ac_send_sabme_cmd_p_set_x(struct sock *sk, struct sk_buff *skb)
rc
=
0
;
llc_conn_send_pdu
(
sk
,
nskb
);
}
llc
->
p_flag
=
p_bit
;
llc_conn_set_p_flag
(
sk
,
p_bit
);
return
rc
;
}
...
...
@@ -897,7 +908,7 @@ int llc_conn_ac_start_p_timer(struct sock *sk, struct sk_buff *skb)
{
struct
llc_opt
*
llc
=
llc_sk
(
sk
);
llc
->
p_flag
=
1
;
llc
_conn_set_p_flag
(
sk
,
1
)
;
mod_timer
(
&
llc
->
pf_cycle_timer
.
timer
,
jiffies
+
llc
->
pf_cycle_timer
.
expire
*
HZ
);
return
0
;
...
...
@@ -1205,7 +1216,7 @@ int llc_conn_ac_stop_p_timer(struct sock *sk, struct sk_buff *skb)
struct
llc_opt
*
llc
=
llc_sk
(
sk
);
del_timer
(
&
llc
->
pf_cycle_timer
.
timer
);
llc
->
p_flag
=
0
;
llc
_conn_set_p_flag
(
sk
,
0
)
;
return
0
;
}
...
...
@@ -1259,7 +1270,7 @@ int llc_conn_ac_upd_p_flag(struct sock *sk, struct sk_buff *skb)
llc_pdu_decode_pf_bit
(
skb
,
&
f_bit
);
if
(
f_bit
)
{
llc_
sk
(
sk
)
->
p_flag
=
0
;
llc_
conn_set_p_flag
(
sk
,
0
)
;
llc_conn_ac_stop_p_timer
(
sk
,
skb
);
}
}
...
...
@@ -1294,13 +1305,13 @@ int llc_conn_ac_set_data_flag_1_if_data_flag_eq_0(struct sock *sk,
int
llc_conn_ac_set_p_flag_0
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
llc_
sk
(
sk
)
->
p_flag
=
0
;
llc_
conn_set_p_flag
(
sk
,
0
)
;
return
0
;
}
int
llc_conn_ac_set_p_flag_1
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
llc_
sk
(
sk
)
->
p_flag
=
1
;
llc_
conn_set_p_flag
(
sk
,
1
)
;
return
0
;
}
...
...
net/llc/llc_conn.c
View file @
1d84746d
...
...
@@ -378,16 +378,20 @@ void llc_conn_free_ev(struct sk_buff *skb)
static
int
llc_conn_service
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
int
rc
=
1
;
struct
llc_opt
*
llc
=
llc_sk
(
sk
);
struct
llc_conn_state_trans
*
trans
;
if
(
llc
_sk
(
sk
)
->
state
>
NBR_CONN_STATES
)
if
(
llc
->
state
>
NBR_CONN_STATES
)
goto
out
;
rc
=
0
;
trans
=
llc_qualify_conn_ev
(
sk
,
skb
);
if
(
trans
)
{
rc
=
llc_exec_conn_trans_actions
(
sk
,
trans
,
skb
);
if
(
!
rc
&&
trans
->
next_state
!=
NO_STATE_CHANGE
)
llc_sk
(
sk
)
->
state
=
trans
->
next_state
;
if
(
!
rc
&&
trans
->
next_state
!=
NO_STATE_CHANGE
)
{
llc
->
state
=
trans
->
next_state
;
if
(
!
llc_data_accept_state
(
llc
->
state
))
sk
->
state_change
(
sk
);
}
}
out:
return
rc
;
...
...
net/llc/llc_main.c
View file @
1d84746d
...
...
@@ -304,7 +304,7 @@ void llc_sk_reset(struct sock *sk)
llc
->
remote_busy_flag
=
0
;
llc
->
cause_flag
=
0
;
llc
->
retry_count
=
0
;
llc
->
p_flag
=
0
;
llc
_conn_set_p_flag
(
sk
,
0
)
;
llc
->
f_flag
=
0
;
llc
->
s_flag
=
0
;
llc
->
ack_pf
=
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