diff options
author | andrew hendry <andrew.hendry@gmail.com> | 2010-05-16 23:00:02 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-17 17:39:27 -0700 |
commit | b7792e34cba641c49cd436d42fbfd2a632ff39d3 (patch) | |
tree | f880770915e06678b287f1c6c7d16702677c6aef /net/x25 | |
parent | cb863ffd4a04f9f8619f52c01d472a64ccc716bd (diff) | |
download | kernel_samsung_smdk4412-b7792e34cba641c49cd436d42fbfd2a632ff39d3.zip kernel_samsung_smdk4412-b7792e34cba641c49cd436d42fbfd2a632ff39d3.tar.gz kernel_samsung_smdk4412-b7792e34cba641c49cd436d42fbfd2a632ff39d3.tar.bz2 |
X25: Move interrupt flag to bitfield
Moves the x25 interrupt flag from char into bitfield.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/x25')
-rw-r--r-- | net/x25/af_x25.c | 1 | ||||
-rw-r--r-- | net/x25/x25_in.c | 2 | ||||
-rw-r--r-- | net/x25/x25_out.c | 5 |
3 files changed, 5 insertions, 3 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 720534c..3d97b8c 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -641,6 +641,7 @@ static struct sock *x25_make_new(struct sock *osk) x25->cudmatchlength = ox25->cudmatchlength; x25->accptapprv = ox25->accptapprv; + clear_bit(X25_INTERRUPT_FLAG, &x25->flags); x25_init_timers(sk); out: return sk; diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c index 372ac22..6317896 100644 --- a/net/x25/x25_in.c +++ b/net/x25/x25_in.c @@ -273,7 +273,7 @@ static int x25_state3_machine(struct sock *sk, struct sk_buff *skb, int frametyp break; case X25_INTERRUPT_CONFIRMATION: - x25->intflag = 0; + clear_bit(X25_INTERRUPT_FLAG, &x25->flags); break; case X25_INTERRUPT: diff --git a/net/x25/x25_out.c b/net/x25/x25_out.c index 52351a2..d00649f 100644 --- a/net/x25/x25_out.c +++ b/net/x25/x25_out.c @@ -148,8 +148,9 @@ void x25_kick(struct sock *sk) /* * Transmit interrupt data. */ - if (!x25->intflag && skb_peek(&x25->interrupt_out_queue) != NULL) { - x25->intflag = 1; + if (skb_peek(&x25->interrupt_out_queue) != NULL && + !test_and_set_bit(X25_INTERRUPT_FLAG, &x25->flags)) { + skb = skb_dequeue(&x25->interrupt_out_queue); x25_transmit_link(skb, x25->neighbour); } |