@@ -263,9 +263,9 @@ static void ax25_destroy_timer(unsigned long data)
263263{
264264 ax25_cb * ax25 = (ax25_cb * )data ;
265265 struct sock * sk ;
266-
266+
267267 sk = ax25 -> sk ;
268-
268+
269269 bh_lock_sock (sk );
270270 sock_hold (sk );
271271 ax25_destroy_socket (ax25 );
@@ -369,57 +369,57 @@ static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg)
369369 ax25_disconnect (ax25 , ENETRESET );
370370 break ;
371371
372- case AX25_WINDOW :
373- if (ax25 -> modulus == AX25_MODULUS ) {
374- if (ax25_ctl .arg < 1 || ax25_ctl .arg > 7 )
375- return - EINVAL ;
376- } else {
377- if (ax25_ctl .arg < 1 || ax25_ctl .arg > 63 )
378- return - EINVAL ;
379- }
380- ax25 -> window = ax25_ctl .arg ;
381- break ;
382-
383- case AX25_T1 :
372+ case AX25_WINDOW :
373+ if (ax25 -> modulus == AX25_MODULUS ) {
374+ if (ax25_ctl .arg < 1 || ax25_ctl .arg > 7 )
375+ return - EINVAL ;
376+ } else {
377+ if (ax25_ctl .arg < 1 || ax25_ctl .arg > 63 )
378+ return - EINVAL ;
379+ }
380+ ax25 -> window = ax25_ctl .arg ;
381+ break ;
382+
383+ case AX25_T1 :
384384 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 )
398385 return - EINVAL ;
399- ax25 -> n2count = 0 ;
400- ax25 -> n2 = ax25_ctl .arg ;
401- break ;
402-
403- case AX25_T3 :
404- if (ax25_ctl .arg < 0 )
405- return - EINVAL ;
406- ax25 -> t3 = ax25_ctl .arg * HZ ;
407- break ;
408-
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 ;
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 ;
399+ ax25 -> n2count = 0 ;
400+ ax25 -> n2 = ax25_ctl .arg ;
401+ break ;
402+
403+ case AX25_T3 :
404+ if (ax25_ctl .arg < 0 )
405+ return - EINVAL ;
406+ ax25 -> t3 = ax25_ctl .arg * HZ ;
407+ break ;
408+
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 ;
423423 }
424424
425425 return 0 ;
@@ -1209,7 +1209,7 @@ static int __must_check ax25_connect(struct socket *sock,
12091209
12101210 if (sk -> sk_type == SOCK_SEQPACKET &&
12111211 (ax25t = ax25_find_cb (& ax25 -> source_addr , & fsa -> fsa_ax25 .sax25_call , digi ,
1212- ax25 -> ax25_dev -> dev ))) {
1212+ ax25 -> ax25_dev -> dev ))) {
12131213 kfree (digi );
12141214 err = - EADDRINUSE ; /* Already such a connection */
12151215 ax25_cb_put (ax25t );
@@ -1456,7 +1456,7 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
14561456 err = - EMSGSIZE ;
14571457 goto out ;
14581458 }
1459-
1459+
14601460 if (usax != NULL ) {
14611461 if (usax -> sax25_family != AF_AX25 ) {
14621462 err = - EINVAL ;
@@ -1470,8 +1470,8 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
14701470 else if (addr_len != sizeof (struct full_sockaddr_ax25 )) {
14711471 /* support for old structure may go away some time */
14721472 if ((addr_len < sizeof (struct sockaddr_ax25 ) + sizeof (ax25_address ) * 6 ) ||
1473- (addr_len > sizeof (struct full_sockaddr_ax25 ))) {
1474- err = - EINVAL ;
1473+ (addr_len > sizeof (struct full_sockaddr_ax25 ))) {
1474+ err = - EINVAL ;
14751475 goto out ;
14761476 }
14771477
@@ -1624,7 +1624,7 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock,
16241624
16251625 /* Now we can treat all alike */
16261626 skb = skb_recv_datagram (sk , flags & ~MSG_DONTWAIT ,
1627- flags & MSG_DONTWAIT , & err );
1627+ flags & MSG_DONTWAIT , & err );
16281628 if (skb == NULL )
16291629 goto out ;
16301630
@@ -1869,7 +1869,7 @@ static void *ax25_info_next(struct seq_file *seq, void *v, loff_t *pos)
18691869 return hlist_entry ( ((struct ax25_cb * )v )-> ax25_node .next ,
18701870 struct ax25_cb , ax25_node );
18711871}
1872-
1872+
18731873static void ax25_info_stop (struct seq_file * seq , void * v )
18741874{
18751875 spin_unlock_bh (& ax25_list_lock );
0 commit comments