diff options
Diffstat (limited to 'net/x25/x25_link.c')
-rw-r--r-- | net/x25/x25_link.c | 87 |
1 files changed, 43 insertions, 44 deletions
diff --git a/net/x25/x25_link.c b/net/x25/x25_link.c index 21306928d47f..037958ff8eed 100644 --- a/net/x25/x25_link.c +++ b/net/x25/x25_link.c | |||
@@ -76,30 +76,29 @@ void x25_link_control(struct sk_buff *skb, struct x25_neigh *nb, | |||
76 | int confirm; | 76 | int confirm; |
77 | 77 | ||
78 | switch (frametype) { | 78 | switch (frametype) { |
79 | case X25_RESTART_REQUEST: | 79 | case X25_RESTART_REQUEST: |
80 | confirm = !x25_t20timer_pending(nb); | 80 | confirm = !x25_t20timer_pending(nb); |
81 | x25_stop_t20timer(nb); | 81 | x25_stop_t20timer(nb); |
82 | nb->state = X25_LINK_STATE_3; | 82 | nb->state = X25_LINK_STATE_3; |
83 | if (confirm) | 83 | if (confirm) |
84 | x25_transmit_restart_confirmation(nb); | 84 | x25_transmit_restart_confirmation(nb); |
85 | break; | 85 | break; |
86 | 86 | ||
87 | case X25_RESTART_CONFIRMATION: | 87 | case X25_RESTART_CONFIRMATION: |
88 | x25_stop_t20timer(nb); | 88 | x25_stop_t20timer(nb); |
89 | nb->state = X25_LINK_STATE_3; | 89 | nb->state = X25_LINK_STATE_3; |
90 | break; | 90 | break; |
91 | 91 | ||
92 | case X25_DIAGNOSTIC: | 92 | case X25_DIAGNOSTIC: |
93 | printk(KERN_WARNING "x25: diagnostic #%d - " | 93 | printk(KERN_WARNING "x25: diagnostic #%d - %02X %02X %02X\n", |
94 | "%02X %02X %02X\n", | 94 | skb->data[3], skb->data[4], |
95 | skb->data[3], skb->data[4], | 95 | skb->data[5], skb->data[6]); |
96 | skb->data[5], skb->data[6]); | 96 | break; |
97 | break; | 97 | |
98 | 98 | default: | |
99 | default: | 99 | printk(KERN_WARNING "x25: received unknown %02X with LCI 000\n", |
100 | printk(KERN_WARNING "x25: received unknown %02X " | 100 | frametype); |
101 | "with LCI 000\n", frametype); | 101 | break; |
102 | break; | ||
103 | } | 102 | } |
104 | 103 | ||
105 | if (nb->state == X25_LINK_STATE_3) | 104 | if (nb->state == X25_LINK_STATE_3) |
@@ -193,18 +192,18 @@ void x25_transmit_clear_request(struct x25_neigh *nb, unsigned int lci, | |||
193 | void x25_transmit_link(struct sk_buff *skb, struct x25_neigh *nb) | 192 | void x25_transmit_link(struct sk_buff *skb, struct x25_neigh *nb) |
194 | { | 193 | { |
195 | switch (nb->state) { | 194 | switch (nb->state) { |
196 | case X25_LINK_STATE_0: | 195 | case X25_LINK_STATE_0: |
197 | skb_queue_tail(&nb->queue, skb); | 196 | skb_queue_tail(&nb->queue, skb); |
198 | nb->state = X25_LINK_STATE_1; | 197 | nb->state = X25_LINK_STATE_1; |
199 | x25_establish_link(nb); | 198 | x25_establish_link(nb); |
200 | break; | 199 | break; |
201 | case X25_LINK_STATE_1: | 200 | case X25_LINK_STATE_1: |
202 | case X25_LINK_STATE_2: | 201 | case X25_LINK_STATE_2: |
203 | skb_queue_tail(&nb->queue, skb); | 202 | skb_queue_tail(&nb->queue, skb); |
204 | break; | 203 | break; |
205 | case X25_LINK_STATE_3: | 204 | case X25_LINK_STATE_3: |
206 | x25_send_frame(skb, nb); | 205 | x25_send_frame(skb, nb); |
207 | break; | 206 | break; |
208 | } | 207 | } |
209 | } | 208 | } |
210 | 209 | ||
@@ -214,14 +213,14 @@ void x25_transmit_link(struct sk_buff *skb, struct x25_neigh *nb) | |||
214 | void x25_link_established(struct x25_neigh *nb) | 213 | void x25_link_established(struct x25_neigh *nb) |
215 | { | 214 | { |
216 | switch (nb->state) { | 215 | switch (nb->state) { |
217 | case X25_LINK_STATE_0: | 216 | case X25_LINK_STATE_0: |
218 | nb->state = X25_LINK_STATE_2; | 217 | nb->state = X25_LINK_STATE_2; |
219 | break; | 218 | break; |
220 | case X25_LINK_STATE_1: | 219 | case X25_LINK_STATE_1: |
221 | x25_transmit_restart_request(nb); | 220 | x25_transmit_restart_request(nb); |
222 | nb->state = X25_LINK_STATE_2; | 221 | nb->state = X25_LINK_STATE_2; |
223 | x25_start_t20timer(nb); | 222 | x25_start_t20timer(nb); |
224 | break; | 223 | break; |
225 | } | 224 | } |
226 | } | 225 | } |
227 | 226 | ||