aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:24:31 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:19:18 -0500
commit528930b91ee89a05a6264629cf99109652c19ca8 (patch)
treec4355a75eda74ff78ee776d02ec9152cb76405d0
parentf7d57453d20e27de69ecafd121005e9d13a0f427 (diff)
[NET] AX25: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ax25/af_ax25.c114
-rw-r--r--net/ax25/ax25_addr.c6
-rw-r--r--net/ax25/ax25_ip.c94
-rw-r--r--net/ax25/ax25_route.c8
-rw-r--r--net/ax25/ax25_std_timer.c2
-rw-r--r--net/ax25/ax25_subr.c4
-rw-r--r--net/ax25/ax25_uid.c2
7 files changed, 115 insertions, 115 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 42233df2b099..9a0b677d1e7f 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -263,9 +263,9 @@ static void ax25_destroy_timer(unsigned long data)
263{ 263{
264 ax25_cb *ax25=(ax25_cb *)data; 264 ax25_cb *ax25=(ax25_cb *)data;
265 struct sock *sk; 265 struct sock *sk;
266 266
267 sk=ax25->sk; 267 sk=ax25->sk;
268 268
269 bh_lock_sock(sk); 269 bh_lock_sock(sk);
270 sock_hold(sk); 270 sock_hold(sk);
271 ax25_destroy_socket(ax25); 271 ax25_destroy_socket(ax25);
@@ -369,57 +369,57 @@ static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg)
369 ax25_disconnect(ax25, ENETRESET); 369 ax25_disconnect(ax25, ENETRESET);
370 break; 370 break;
371 371
372 case AX25_WINDOW: 372 case AX25_WINDOW:
373 if (ax25->modulus == AX25_MODULUS) { 373 if (ax25->modulus == AX25_MODULUS) {
374 if (ax25_ctl.arg < 1 || ax25_ctl.arg > 7) 374 if (ax25_ctl.arg < 1 || ax25_ctl.arg > 7)
375 return -EINVAL; 375 return -EINVAL;
376 } else { 376 } else {
377 if (ax25_ctl.arg < 1 || ax25_ctl.arg > 63) 377 if (ax25_ctl.arg < 1 || ax25_ctl.arg > 63)
378 return -EINVAL; 378 return -EINVAL;
379 } 379 }
380 ax25->window = ax25_ctl.arg; 380 ax25->window = ax25_ctl.arg;
381 break; 381 break;
382 382
383 case AX25_T1: 383 case AX25_T1:
384 if (ax25_ctl.arg < 1) 384 if (ax25_ctl.arg < 1)
385 return -EINVAL;
386 ax25->rtt = (ax25_ctl.arg * HZ) / 2;
387 ax25->t1 = ax25_ctl.arg * HZ;
388 break;
389
390 case AX25_T2:
391 if (ax25_ctl.arg < 1)
392 return -EINVAL;
393 ax25->t2 = ax25_ctl.arg * HZ;
394 break;
395
396 case AX25_N2:
397 if (ax25_ctl.arg < 1 || ax25_ctl.arg > 31)
398 return -EINVAL; 385 return -EINVAL;
399 ax25->n2count = 0; 386 ax25->rtt = (ax25_ctl.arg * HZ) / 2;
400 ax25->n2 = ax25_ctl.arg; 387 ax25->t1 = ax25_ctl.arg * HZ;
401 break; 388 break;
402 389
403 case AX25_T3: 390 case AX25_T2:
404 if (ax25_ctl.arg < 0) 391 if (ax25_ctl.arg < 1)
405 return -EINVAL; 392 return -EINVAL;
406 ax25->t3 = ax25_ctl.arg * HZ; 393 ax25->t2 = ax25_ctl.arg * HZ;
407 break; 394 break;
408 395
409 case AX25_IDLE: 396 case AX25_N2:
410 if (ax25_ctl.arg < 0) 397 if (ax25_ctl.arg < 1 || ax25_ctl.arg > 31)
411 return -EINVAL; 398 return -EINVAL;
412 ax25->idle = ax25_ctl.arg * 60 * HZ; 399 ax25->n2count = 0;
413 break; 400 ax25->n2 = ax25_ctl.arg;
414 401 break;
415 case AX25_PACLEN: 402
416 if (ax25_ctl.arg < 16 || ax25_ctl.arg > 65535) 403 case AX25_T3:
417 return -EINVAL; 404 if (ax25_ctl.arg < 0)
418 ax25->paclen = ax25_ctl.arg; 405 return -EINVAL;
419 break; 406 ax25->t3 = ax25_ctl.arg * HZ;
420 407 break;
421 default: 408
422 return -EINVAL; 409 case AX25_IDLE:
410 if (ax25_ctl.arg < 0)
411 return -EINVAL;
412 ax25->idle = ax25_ctl.arg * 60 * HZ;
413 break;
414
415 case AX25_PACLEN:
416 if (ax25_ctl.arg < 16 || ax25_ctl.arg > 65535)
417 return -EINVAL;
418 ax25->paclen = ax25_ctl.arg;
419 break;
420
421 default:
422 return -EINVAL;
423 } 423 }
424 424
425 return 0; 425 return 0;
@@ -1209,7 +1209,7 @@ static int __must_check ax25_connect(struct socket *sock,
1209 1209
1210 if (sk->sk_type == SOCK_SEQPACKET && 1210 if (sk->sk_type == SOCK_SEQPACKET &&
1211 (ax25t=ax25_find_cb(&ax25->source_addr, &fsa->fsa_ax25.sax25_call, digi, 1211 (ax25t=ax25_find_cb(&ax25->source_addr, &fsa->fsa_ax25.sax25_call, digi,
1212 ax25->ax25_dev->dev))) { 1212 ax25->ax25_dev->dev))) {
1213 kfree(digi); 1213 kfree(digi);
1214 err = -EADDRINUSE; /* Already such a connection */ 1214 err = -EADDRINUSE; /* Already such a connection */
1215 ax25_cb_put(ax25t); 1215 ax25_cb_put(ax25t);
@@ -1456,7 +1456,7 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
1456 err = -EMSGSIZE; 1456 err = -EMSGSIZE;
1457 goto out; 1457 goto out;
1458 } 1458 }
1459 1459
1460 if (usax != NULL) { 1460 if (usax != NULL) {
1461 if (usax->sax25_family != AF_AX25) { 1461 if (usax->sax25_family != AF_AX25) {
1462 err = -EINVAL; 1462 err = -EINVAL;
@@ -1470,8 +1470,8 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
1470 else if (addr_len != sizeof(struct full_sockaddr_ax25)) { 1470 else if (addr_len != sizeof(struct full_sockaddr_ax25)) {
1471 /* support for old structure may go away some time */ 1471 /* support for old structure may go away some time */
1472 if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) || 1472 if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) ||
1473 (addr_len > sizeof(struct full_sockaddr_ax25))) { 1473 (addr_len > sizeof(struct full_sockaddr_ax25))) {
1474 err = -EINVAL; 1474 err = -EINVAL;
1475 goto out; 1475 goto out;
1476 } 1476 }
1477 1477
@@ -1624,7 +1624,7 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock,
1624 1624
1625 /* Now we can treat all alike */ 1625 /* Now we can treat all alike */
1626 skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, 1626 skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT,
1627 flags & MSG_DONTWAIT, &err); 1627 flags & MSG_DONTWAIT, &err);
1628 if (skb == NULL) 1628 if (skb == NULL)
1629 goto out; 1629 goto out;
1630 1630
@@ -1869,7 +1869,7 @@ static void *ax25_info_next(struct seq_file *seq, void *v, loff_t *pos)
1869 return hlist_entry( ((struct ax25_cb *)v)->ax25_node.next, 1869 return hlist_entry( ((struct ax25_cb *)v)->ax25_node.next,
1870 struct ax25_cb, ax25_node); 1870 struct ax25_cb, ax25_node);
1871} 1871}
1872 1872
1873static void ax25_info_stop(struct seq_file *seq, void *v) 1873static void ax25_info_stop(struct seq_file *seq, void *v)
1874{ 1874{
1875 spin_unlock_bh(&ax25_list_lock); 1875 spin_unlock_bh(&ax25_list_lock);
diff --git a/net/ax25/ax25_addr.c b/net/ax25/ax25_addr.c
index 97a49c79c605..419e7188d5a7 100644
--- a/net/ax25/ax25_addr.c
+++ b/net/ax25/ax25_addr.c
@@ -126,10 +126,10 @@ int ax25cmp(const ax25_address *a, const ax25_address *b)
126 ct++; 126 ct++;
127 } 127 }
128 128
129 if ((a->ax25_call[ct] & 0x1E) == (b->ax25_call[ct] & 0x1E)) /* SSID without control bit */ 129 if ((a->ax25_call[ct] & 0x1E) == (b->ax25_call[ct] & 0x1E)) /* SSID without control bit */
130 return 0; 130 return 0;
131 131
132 return 2; /* Partial match */ 132 return 2; /* Partial match */
133} 133}
134 134
135EXPORT_SYMBOL(ax25cmp); 135EXPORT_SYMBOL(ax25cmp);
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c
index 136c3aefa9de..8d62d8681615 100644
--- a/net/ax25/ax25_ip.c
+++ b/net/ax25/ax25_ip.c
@@ -55,46 +55,46 @@ int ax25_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short
55 if (type == ETH_P_AX25) 55 if (type == ETH_P_AX25)
56 return 0; 56 return 0;
57 57
58 /* header is an AX.25 UI frame from us to them */ 58 /* header is an AX.25 UI frame from us to them */
59 buff = skb_push(skb, AX25_HEADER_LEN); 59 buff = skb_push(skb, AX25_HEADER_LEN);
60 *buff++ = 0x00; /* KISS DATA */ 60 *buff++ = 0x00; /* KISS DATA */
61 61
62 if (daddr != NULL) 62 if (daddr != NULL)
63 memcpy(buff, daddr, dev->addr_len); /* Address specified */ 63 memcpy(buff, daddr, dev->addr_len); /* Address specified */
64 64
65 buff[6] &= ~AX25_CBIT; 65 buff[6] &= ~AX25_CBIT;
66 buff[6] &= ~AX25_EBIT; 66 buff[6] &= ~AX25_EBIT;
67 buff[6] |= AX25_SSSID_SPARE; 67 buff[6] |= AX25_SSSID_SPARE;
68 buff += AX25_ADDR_LEN; 68 buff += AX25_ADDR_LEN;
69 69
70 if (saddr != NULL) 70 if (saddr != NULL)
71 memcpy(buff, saddr, dev->addr_len); 71 memcpy(buff, saddr, dev->addr_len);
72 else 72 else
73 memcpy(buff, dev->dev_addr, dev->addr_len); 73 memcpy(buff, dev->dev_addr, dev->addr_len);
74 74
75 buff[6] &= ~AX25_CBIT; 75 buff[6] &= ~AX25_CBIT;
76 buff[6] |= AX25_EBIT; 76 buff[6] |= AX25_EBIT;
77 buff[6] |= AX25_SSSID_SPARE; 77 buff[6] |= AX25_SSSID_SPARE;
78 buff += AX25_ADDR_LEN; 78 buff += AX25_ADDR_LEN;
79 79
80 *buff++ = AX25_UI; /* UI */ 80 *buff++ = AX25_UI; /* UI */
81 81
82 /* Append a suitable AX.25 PID */ 82 /* Append a suitable AX.25 PID */
83 switch (type) { 83 switch (type) {
84 case ETH_P_IP: 84 case ETH_P_IP:
85 *buff++ = AX25_P_IP; 85 *buff++ = AX25_P_IP;
86 break; 86 break;
87 case ETH_P_ARP: 87 case ETH_P_ARP:
88 *buff++ = AX25_P_ARP; 88 *buff++ = AX25_P_ARP;
89 break; 89 break;
90 default: 90 default:
91 printk(KERN_ERR "AX.25: ax25_hard_header - wrong protocol type 0x%2.2x\n", type); 91 printk(KERN_ERR "AX.25: ax25_hard_header - wrong protocol type 0x%2.2x\n", type);
92 *buff++ = 0; 92 *buff++ = 0;
93 break; 93 break;
94 } 94 }
95 95
96 if (daddr != NULL) 96 if (daddr != NULL)
97 return AX25_HEADER_LEN; 97 return AX25_HEADER_LEN;
98 98
99 return -AX25_HEADER_LEN; /* Unfinished header */ 99 return -AX25_HEADER_LEN; /* Unfinished header */
100} 100}
@@ -114,8 +114,8 @@ int ax25_rebuild_header(struct sk_buff *skb)
114 dst = (ax25_address *)(bp + 1); 114 dst = (ax25_address *)(bp + 1);
115 src = (ax25_address *)(bp + 8); 115 src = (ax25_address *)(bp + 8);
116 116
117 if (arp_find(bp + 1, skb)) 117 if (arp_find(bp + 1, skb))
118 return 1; 118 return 1;
119 119
120 route = ax25_get_route(dst, NULL); 120 route = ax25_get_route(dst, NULL);
121 if (route) { 121 if (route) {
@@ -127,8 +127,8 @@ int ax25_rebuild_header(struct sk_buff *skb)
127 if (dev == NULL) 127 if (dev == NULL)
128 dev = skb->dev; 128 dev = skb->dev;
129 129
130 if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) { 130 if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) {
131 goto put; 131 goto put;
132 } 132 }
133 133
134 if (bp[16] == AX25_P_IP) { 134 if (bp[16] == AX25_P_IP) {
@@ -175,8 +175,8 @@ int ax25_rebuild_header(struct sk_buff *skb)
175 ourskb->nh.raw = ourskb->data; 175 ourskb->nh.raw = ourskb->data;
176 176
177 ax25=ax25_send_frame( 177 ax25=ax25_send_frame(
178 ourskb, 178 ourskb,
179 ax25_dev->values[AX25_VALUES_PACLEN], 179 ax25_dev->values[AX25_VALUES_PACLEN],
180 &src_c, 180 &src_c,
181 &dst_c, digipeat, dev); 181 &dst_c, digipeat, dev);
182 if (ax25) { 182 if (ax25) {
@@ -186,13 +186,13 @@ int ax25_rebuild_header(struct sk_buff *skb)
186 } 186 }
187 } 187 }
188 188
189 bp[7] &= ~AX25_CBIT; 189 bp[7] &= ~AX25_CBIT;
190 bp[7] &= ~AX25_EBIT; 190 bp[7] &= ~AX25_EBIT;
191 bp[7] |= AX25_SSSID_SPARE; 191 bp[7] |= AX25_SSSID_SPARE;
192 192
193 bp[14] &= ~AX25_CBIT; 193 bp[14] &= ~AX25_CBIT;
194 bp[14] |= AX25_EBIT; 194 bp[14] |= AX25_EBIT;
195 bp[14] |= AX25_SSSID_SPARE; 195 bp[14] |= AX25_SSSID_SPARE;
196 196
197 skb_pull(skb, AX25_KISS_HEADER_LEN); 197 skb_pull(skb, AX25_KISS_HEADER_LEN);
198 198
@@ -211,7 +211,7 @@ put:
211 if (route) 211 if (route)
212 ax25_put_route(route); 212 ax25_put_route(route);
213 213
214 return 1; 214 return 1;
215} 215}
216 216
217#else /* INET */ 217#else /* INET */
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c
index 0a0381622b1c..7078861a7385 100644
--- a/net/ax25/ax25_route.c
+++ b/net/ax25/ax25_route.c
@@ -87,7 +87,7 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)
87 ax25_rt = ax25_route_list; 87 ax25_rt = ax25_route_list;
88 while (ax25_rt != NULL) { 88 while (ax25_rt != NULL) {
89 if (ax25cmp(&ax25_rt->callsign, &route->dest_addr) == 0 && 89 if (ax25cmp(&ax25_rt->callsign, &route->dest_addr) == 0 &&
90 ax25_rt->dev == ax25_dev->dev) { 90 ax25_rt->dev == ax25_dev->dev) {
91 kfree(ax25_rt->digipeat); 91 kfree(ax25_rt->digipeat);
92 ax25_rt->digipeat = NULL; 92 ax25_rt->digipeat = NULL;
93 if (route->digi_count != 0) { 93 if (route->digi_count != 0) {
@@ -252,8 +252,8 @@ static void *ax25_rt_seq_start(struct seq_file *seq, loff_t *pos)
252{ 252{
253 struct ax25_route *ax25_rt; 253 struct ax25_route *ax25_rt;
254 int i = 1; 254 int i = 1;
255 255
256 read_lock(&ax25_route_lock); 256 read_lock(&ax25_route_lock);
257 if (*pos == 0) 257 if (*pos == 0)
258 return SEQ_START_TOKEN; 258 return SEQ_START_TOKEN;
259 259
@@ -269,7 +269,7 @@ static void *ax25_rt_seq_start(struct seq_file *seq, loff_t *pos)
269static void *ax25_rt_seq_next(struct seq_file *seq, void *v, loff_t *pos) 269static void *ax25_rt_seq_next(struct seq_file *seq, void *v, loff_t *pos)
270{ 270{
271 ++*pos; 271 ++*pos;
272 return (v == SEQ_START_TOKEN) ? ax25_route_list : 272 return (v == SEQ_START_TOKEN) ? ax25_route_list :
273 ((struct ax25_route *) v)->next; 273 ((struct ax25_route *) v)->next;
274} 274}
275 275
diff --git a/net/ax25/ax25_std_timer.c b/net/ax25/ax25_std_timer.c
index a29c480a4dc1..e3528b1a7802 100644
--- a/net/ax25/ax25_std_timer.c
+++ b/net/ax25/ax25_std_timer.c
@@ -34,7 +34,7 @@
34void ax25_std_heartbeat_expiry(ax25_cb *ax25) 34void ax25_std_heartbeat_expiry(ax25_cb *ax25)
35{ 35{
36 struct sock *sk=ax25->sk; 36 struct sock *sk=ax25->sk;
37 37
38 if (sk) 38 if (sk)
39 bh_lock_sock(sk); 39 bh_lock_sock(sk);
40 40
diff --git a/net/ax25/ax25_subr.c b/net/ax25/ax25_subr.c
index c41dbe5fadee..85c58c49b4d0 100644
--- a/net/ax25/ax25_subr.c
+++ b/net/ax25/ax25_subr.c
@@ -56,7 +56,7 @@ void ax25_frames_acked(ax25_cb *ax25, unsigned short nr)
56 */ 56 */
57 if (ax25->va != nr) { 57 if (ax25->va != nr) {
58 while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) { 58 while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) {
59 skb = skb_dequeue(&ax25->ack_queue); 59 skb = skb_dequeue(&ax25->ack_queue);
60 kfree_skb(skb); 60 kfree_skb(skb);
61 ax25->va = (ax25->va + 1) % ax25->modulus; 61 ax25->va = (ax25->va + 1) % ax25->modulus;
62 } 62 }
@@ -65,7 +65,7 @@ void ax25_frames_acked(ax25_cb *ax25, unsigned short nr)
65 65
66void ax25_requeue_frames(ax25_cb *ax25) 66void ax25_requeue_frames(ax25_cb *ax25)
67{ 67{
68 struct sk_buff *skb, *skb_prev = NULL; 68 struct sk_buff *skb, *skb_prev = NULL;
69 69
70 /* 70 /*
71 * Requeue all the un-ack-ed frames on the output queue to be picked 71 * Requeue all the un-ack-ed frames on the output queue to be picked
diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c
index 5e9a81e8b214..7f4c294b36f1 100644
--- a/net/ax25/ax25_uid.c
+++ b/net/ax25/ax25_uid.c
@@ -164,7 +164,7 @@ static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos)
164 ++*pos; 164 ++*pos;
165 165
166 return hlist_entry(((ax25_uid_assoc *)v)->uid_node.next, 166 return hlist_entry(((ax25_uid_assoc *)v)->uid_node.next,
167 ax25_uid_assoc, uid_node); 167 ax25_uid_assoc, uid_node);
168} 168}
169 169
170static void ax25_uid_seq_stop(struct seq_file *seq, void *v) 170static void ax25_uid_seq_stop(struct seq_file *seq, void *v)