diff options
author | andrew hendry <andrew.hendry@gmail.com> | 2010-05-16 19:00:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-17 20:39:27 -0400 |
commit | b7792e34cba641c49cd436d42fbfd2a632ff39d3 (patch) | |
tree | f880770915e06678b287f1c6c7d16702677c6aef | |
parent | cb863ffd4a04f9f8619f52c01d472a64ccc716bd (diff) |
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>
-rw-r--r-- | include/net/x25.h | 3 | ||||
-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 |
4 files changed, 7 insertions, 4 deletions
diff --git a/include/net/x25.h b/include/net/x25.h index 7b5795e1ceb2..1576e92c6cec 100644 --- a/include/net/x25.h +++ b/include/net/x25.h | |||
@@ -115,6 +115,7 @@ enum { | |||
115 | 115 | ||
116 | /* Bitset in x25_sock->flags for misc flags */ | 116 | /* Bitset in x25_sock->flags for misc flags */ |
117 | #define X25_Q_BIT_FLAG 0 | 117 | #define X25_Q_BIT_FLAG 0 |
118 | #define X25_INTERRUPT_FLAG 1 | ||
118 | 119 | ||
119 | /** | 120 | /** |
120 | * struct x25_route - x25 routing entry | 121 | * struct x25_route - x25 routing entry |
@@ -149,7 +150,7 @@ struct x25_sock { | |||
149 | struct x25_address source_addr, dest_addr; | 150 | struct x25_address source_addr, dest_addr; |
150 | struct x25_neigh *neighbour; | 151 | struct x25_neigh *neighbour; |
151 | unsigned int lci, cudmatchlength; | 152 | unsigned int lci, cudmatchlength; |
152 | unsigned char state, condition, intflag, accptapprv; | 153 | unsigned char state, condition, accptapprv; |
153 | unsigned short vs, vr, va, vl; | 154 | unsigned short vs, vr, va, vl; |
154 | unsigned long t2, t21, t22, t23; | 155 | unsigned long t2, t21, t22, t23; |
155 | unsigned short fraglen; | 156 | unsigned short fraglen; |
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 720534ce1fd9..3d97b8caf0b1 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) | |||
641 | x25->cudmatchlength = ox25->cudmatchlength; | 641 | x25->cudmatchlength = ox25->cudmatchlength; |
642 | x25->accptapprv = ox25->accptapprv; | 642 | x25->accptapprv = ox25->accptapprv; |
643 | 643 | ||
644 | clear_bit(X25_INTERRUPT_FLAG, &x25->flags); | ||
644 | x25_init_timers(sk); | 645 | x25_init_timers(sk); |
645 | out: | 646 | out: |
646 | return sk; | 647 | return sk; |
diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c index 372ac226e648..63178961efac 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 | |||
273 | break; | 273 | break; |
274 | 274 | ||
275 | case X25_INTERRUPT_CONFIRMATION: | 275 | case X25_INTERRUPT_CONFIRMATION: |
276 | x25->intflag = 0; | 276 | clear_bit(X25_INTERRUPT_FLAG, &x25->flags); |
277 | break; | 277 | break; |
278 | 278 | ||
279 | case X25_INTERRUPT: | 279 | case X25_INTERRUPT: |
diff --git a/net/x25/x25_out.c b/net/x25/x25_out.c index 52351a26b6fc..d00649fb251d 100644 --- a/net/x25/x25_out.c +++ b/net/x25/x25_out.c | |||
@@ -148,8 +148,9 @@ void x25_kick(struct sock *sk) | |||
148 | /* | 148 | /* |
149 | * Transmit interrupt data. | 149 | * Transmit interrupt data. |
150 | */ | 150 | */ |
151 | if (!x25->intflag && skb_peek(&x25->interrupt_out_queue) != NULL) { | 151 | if (skb_peek(&x25->interrupt_out_queue) != NULL && |
152 | x25->intflag = 1; | 152 | !test_and_set_bit(X25_INTERRUPT_FLAG, &x25->flags)) { |
153 | |||
153 | skb = skb_dequeue(&x25->interrupt_out_queue); | 154 | skb = skb_dequeue(&x25->interrupt_out_queue); |
154 | x25_transmit_link(skb, x25->neighbour); | 155 | x25_transmit_link(skb, x25->neighbour); |
155 | } | 156 | } |