Commit 42e11855 authored by Ralf Bächle's avatar Ralf Bächle

Reformat.

parent 74705a6e
...@@ -222,7 +222,8 @@ static void ax25_kill_by_device(struct net_device *dev) ...@@ -222,7 +222,8 @@ static void ax25_kill_by_device(struct net_device *dev)
/* /*
* Handle device status changes. * Handle device status changes.
*/ */
static int ax25_device_event(struct notifier_block *this,unsigned long event, void *ptr) static int ax25_device_event(struct notifier_block *this,unsigned long event,
void *ptr)
{ {
struct net_device *dev = (struct net_device *)ptr; struct net_device *dev = (struct net_device *)ptr;
...@@ -263,7 +264,8 @@ void ax25_insert_socket(ax25_cb *ax25) ...@@ -263,7 +264,8 @@ void ax25_insert_socket(ax25_cb *ax25)
* Find a socket that wants to accept the SABM we have just * Find a socket that wants to accept the SABM we have just
* received. * received.
*/ */
struct sock *ax25_find_listener(ax25_address *addr, int digi, struct net_device *dev, int type) struct sock *ax25_find_listener(ax25_address *addr, int digi,
struct net_device *dev, int type)
{ {
unsigned long flags; unsigned long flags;
ax25_cb *s; ax25_cb *s;
...@@ -289,7 +291,8 @@ struct sock *ax25_find_listener(ax25_address *addr, int digi, struct net_device ...@@ -289,7 +291,8 @@ struct sock *ax25_find_listener(ax25_address *addr, int digi, struct net_device
/* /*
* Find an AX.25 socket given both ends. * Find an AX.25 socket given both ends.
*/ */
struct sock *ax25_find_socket(ax25_address *my_addr, ax25_address *dest_addr, int type) struct sock *ax25_find_socket(ax25_address *my_addr, ax25_address *dest_addr,
int type)
{ {
ax25_cb *s; ax25_cb *s;
unsigned long flags; unsigned long flags;
...@@ -311,7 +314,8 @@ struct sock *ax25_find_socket(ax25_address *my_addr, ax25_address *dest_addr, in ...@@ -311,7 +314,8 @@ struct sock *ax25_find_socket(ax25_address *my_addr, ax25_address *dest_addr, in
* Find an AX.25 control block given both ends. It will only pick up * Find an AX.25 control block given both ends. It will only pick up
* floating AX.25 control blocks or non Raw socket bound control blocks. * floating AX.25 control blocks or non Raw socket bound control blocks.
*/ */
ax25_cb *ax25_find_cb(ax25_address *src_addr, ax25_address *dest_addr, ax25_digi *digi, struct net_device *dev) ax25_cb *ax25_find_cb(ax25_address *src_addr, ax25_address *dest_addr,
ax25_digi *digi, struct net_device *dev)
{ {
ax25_cb *s; ax25_cb *s;
unsigned long flags; unsigned long flags;
...@@ -395,12 +399,12 @@ static void ax25_destroy_timer(unsigned long data) ...@@ -395,12 +399,12 @@ static void ax25_destroy_timer(unsigned long data)
} }
/* /*
* This is called from user mode and the timers. Thus it protects itself against * This is called from user mode and the timers. Thus it protects itself
* interrupt users but doesn't worry about being called during work. * against interrupt users but doesn't worry about being called during
* Once it is removed from the queue no interrupt or bottom half will * work. Once it is removed from the queue no interrupt or bottom half
* touch it and we are (fairly 8-) ) safe. * will touch it and we are (fairly 8-) ) safe.
*/ */
void ax25_destroy_socket(ax25_cb *ax25) /* Not static as it's used by the timer */ void ax25_destroy_socket(ax25_cb *ax25)
{ {
struct sk_buff *skb; struct sk_buff *skb;
unsigned long flags; unsigned long flags;
...@@ -626,7 +630,8 @@ ax25_cb *ax25_create_cb(void) ...@@ -626,7 +630,8 @@ ax25_cb *ax25_create_cb(void)
* AX25 socket object * AX25 socket object
*/ */
static int ax25_setsockopt(struct socket *sock, int level, int optname, char *optval, int optlen) static int ax25_setsockopt(struct socket *sock, int level, int optname,
char *optval, int optlen)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
ax25_cb *ax25; ax25_cb *ax25;
...@@ -763,7 +768,8 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname, char *op ...@@ -763,7 +768,8 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname, char *op
return res; return res;
} }
static int ax25_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen) static int ax25_getsockopt(struct socket *sock, int level, int optname,
char *optval, int *optlen)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
ax25_cb *ax25; ax25_cb *ax25;
...@@ -1177,7 +1183,8 @@ static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) ...@@ -1177,7 +1183,8 @@ static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
/* /*
* FIXME: nonblock behaviour looks like it may have a bug. * FIXME: nonblock behaviour looks like it may have a bug.
*/ */
static int ax25_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags) static int ax25_connect(struct socket *sock, struct sockaddr *uaddr,
int addr_len, int flags)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
ax25_cb *ax25 = ax25_sk(sk); ax25_cb *ax25 = ax25_sk(sk);
...@@ -1440,7 +1447,8 @@ static int ax25_accept(struct socket *sock, struct socket *newsock, int flags) ...@@ -1440,7 +1447,8 @@ static int ax25_accept(struct socket *sock, struct socket *newsock, int flags)
return 0; return 0;
} }
static int ax25_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, int peer) static int ax25_getname(struct socket *sock, struct sockaddr *uaddr,
int *uaddr_len, int peer)
{ {
struct sock *sk; struct sock *sk;
ax25_cb *ax25; ax25_cb *ax25;
...@@ -1485,7 +1493,8 @@ static int ax25_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_ ...@@ -1485,7 +1493,8 @@ static int ax25_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_
return 0; return 0;
} }
static int ax25_sendmsg(struct socket *sock, struct msghdr *msg, int len, struct scm_cookie *scm) static int ax25_sendmsg(struct socket *sock, struct msghdr *msg, int len,
struct scm_cookie *scm)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
ax25_cb *ax25; ax25_cb *ax25;
...@@ -1661,7 +1670,8 @@ static int ax25_sendmsg(struct socket *sock, struct msghdr *msg, int len, struct ...@@ -1661,7 +1670,8 @@ static int ax25_sendmsg(struct socket *sock, struct msghdr *msg, int len, struct
} }
} }
static int ax25_recvmsg(struct socket *sock, struct msghdr *msg, int size, int flags, struct scm_cookie *scm) static int ax25_recvmsg(struct socket *sock, struct msghdr *msg, int size,
int flags, struct scm_cookie *scm)
{ {
struct sock *sk; struct sock *sk;
int copied; int copied;
......
...@@ -59,7 +59,8 @@ static void ax25_ds_add_timer(ax25_dev *ax25_dev) ...@@ -59,7 +59,8 @@ static void ax25_ds_add_timer(ax25_dev *ax25_dev)
void ax25_ds_del_timer(ax25_dev *ax25_dev) void ax25_ds_del_timer(ax25_dev *ax25_dev)
{ {
if (ax25_dev) del_timer(&ax25_dev->dama.slave_timer); if (ax25_dev)
del_timer(&ax25_dev->dama.slave_timer);
} }
void ax25_ds_set_timer(ax25_dev *ax25_dev) void ax25_ds_set_timer(ax25_dev *ax25_dev)
......
...@@ -56,7 +56,8 @@ static struct listen_struct { ...@@ -56,7 +56,8 @@ static struct listen_struct {
} *listen_list; } *listen_list;
static spinlock_t listen_lock = SPIN_LOCK_UNLOCKED; static spinlock_t listen_lock = SPIN_LOCK_UNLOCKED;
int ax25_protocol_register(unsigned int pid, int (*func)(struct sk_buff *, ax25_cb *)) int ax25_protocol_register(unsigned int pid,
int (*func)(struct sk_buff *, ax25_cb *))
{ {
struct protocol_struct *protocol; struct protocol_struct *protocol;
......
...@@ -217,7 +217,8 @@ static int ax25_process_rx_frame(ax25_cb *ax25, struct sk_buff *skb, int type, i ...@@ -217,7 +217,8 @@ static int ax25_process_rx_frame(ax25_cb *ax25, struct sk_buff *skb, int type, i
return queued; return queued;
} }
static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, ax25_address *dev_addr, struct packet_type *ptype) static int ax25_rcv(struct sk_buff *skb, struct net_device *dev,
ax25_address *dev_addr, struct packet_type *ptype)
{ {
struct sock *make; struct sock *make;
struct sock *sk; struct sock *sk;
...@@ -486,4 +487,3 @@ int ax25_kiss_rcv(struct sk_buff *skb, struct net_device *dev, ...@@ -486,4 +487,3 @@ int ax25_kiss_rcv(struct sk_buff *skb, struct net_device *dev,
return ax25_rcv(skb, dev, (ax25_address *)dev->dev_addr, ptype); return ax25_rcv(skb, dev, (ax25_address *)dev->dev_addr, ptype);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment