Commit f740f4c5 authored by Adrian Bunk's avatar Adrian Bunk Committed by Thomas Graf

[X25]: Staticize, and remove unused global functions.

Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0cad0800
......@@ -162,7 +162,6 @@ extern int x25_addr_ntoa(unsigned char *, struct x25_address *,
struct x25_address *);
extern int x25_addr_aton(unsigned char *, struct x25_address *,
struct x25_address *);
extern unsigned int x25_new_lci(struct x25_neigh *);
extern struct sock *x25_find_socket(unsigned int, struct x25_neigh *);
extern void x25_destroy_socket(struct sock *);
extern int x25_rx_call_request(struct sk_buff *, struct x25_neigh *, unsigned int);
......@@ -171,7 +170,6 @@ extern void x25_kill_by_neigh(struct x25_neigh *);
/* x25_dev.c */
extern void x25_send_frame(struct sk_buff *, struct x25_neigh *);
extern int x25_lapb_receive_frame(struct sk_buff *, struct net_device *, struct packet_type *);
extern int x25_llc_receive_frame(struct sk_buff *, struct net_device *, struct packet_type *);
extern void x25_establish_link(struct x25_neigh *);
extern void x25_terminate_link(struct x25_neigh *);
......@@ -191,9 +189,6 @@ extern void x25_link_device_up(struct net_device *);
extern void x25_link_device_down(struct net_device *);
extern void x25_link_established(struct x25_neigh *);
extern void x25_link_terminated(struct x25_neigh *);
extern void x25_transmit_restart_request(struct x25_neigh *);
extern void x25_transmit_restart_confirmation(struct x25_neigh *);
extern void x25_transmit_diagnostic(struct x25_neigh *, unsigned char);
extern void x25_transmit_clear_request(struct x25_neigh *, unsigned int, unsigned char);
extern void x25_transmit_link(struct sk_buff *, struct x25_neigh *);
extern int x25_subscr_ioctl(unsigned int, void __user *);
......
......@@ -261,7 +261,7 @@ static struct sock *x25_find_listener(struct x25_address *addr, struct x25_callu
/*
* Find a connected X.25 socket given my LCI and neighbour.
*/
struct sock *__x25_find_socket(unsigned int lci, struct x25_neigh *nb)
static struct sock *__x25_find_socket(unsigned int lci, struct x25_neigh *nb)
{
struct sock *s;
struct hlist_node *node;
......@@ -289,7 +289,7 @@ struct sock *x25_find_socket(unsigned int lci, struct x25_neigh *nb)
/*
* Find a unique LCI for a given device.
*/
unsigned int x25_new_lci(struct x25_neigh *nb)
static unsigned int x25_new_lci(struct x25_neigh *nb)
{
unsigned int lci = 1;
struct sock *sk;
......@@ -1336,7 +1336,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
return rc;
}
struct net_proto_family x25_family_ops = {
static struct net_proto_family x25_family_ops = {
.family = AF_X25,
.create = x25_create,
.owner = THIS_MODULE,
......@@ -1371,7 +1371,7 @@ static struct packet_type x25_packet_type = {
.func = x25_lapb_receive_frame,
};
struct notifier_block x25_dev_notifier = {
static struct notifier_block x25_dev_notifier = {
.notifier_call = x25_device_event,
};
......
......@@ -123,29 +123,6 @@ int x25_lapb_receive_frame(struct sk_buff *skb, struct net_device *dev,
return 0;
}
int x25_llc_receive_frame(struct sk_buff *skb, struct net_device *dev,
struct packet_type *ptype)
{
struct x25_neigh *nb;
int rc = 0;
skb->sk = NULL;
/*
* Packet received from unrecognised device, throw it away.
*/
nb = x25_get_neigh(dev);
if (!nb) {
printk(KERN_DEBUG "X.25: unknown_neighbour - %s\n", dev->name);
kfree_skb(skb);
} else {
rc = x25_receive_data(skb, nb);
x25_neigh_put(nb);
}
return rc;
}
void x25_establish_link(struct x25_neigh *nb)
{
struct sk_buff *skb;
......
......@@ -35,6 +35,9 @@ static rwlock_t x25_neigh_list_lock = RW_LOCK_UNLOCKED;
static void x25_t20timer_expiry(unsigned long);
static void x25_transmit_restart_confirmation(struct x25_neigh *nb);
static void x25_transmit_restart_request(struct x25_neigh *nb);
/*
* Linux set/reset timer routines
*/
......@@ -106,7 +109,7 @@ void x25_link_control(struct sk_buff *skb, struct x25_neigh *nb,
/*
* This routine is called when a Restart Request is needed
*/
void x25_transmit_restart_request(struct x25_neigh *nb)
static void x25_transmit_restart_request(struct x25_neigh *nb)
{
unsigned char *dptr;
int len = X25_MAX_L2_LEN + X25_STD_MIN_LEN + 2;
......@@ -133,7 +136,7 @@ void x25_transmit_restart_request(struct x25_neigh *nb)
/*
* This routine is called when a Restart Confirmation is needed
*/
void x25_transmit_restart_confirmation(struct x25_neigh *nb)
static void x25_transmit_restart_confirmation(struct x25_neigh *nb)
{
unsigned char *dptr;
int len = X25_MAX_L2_LEN + X25_STD_MIN_LEN;
......@@ -155,32 +158,6 @@ void x25_transmit_restart_confirmation(struct x25_neigh *nb)
x25_send_frame(skb, nb);
}
/*
* This routine is called when a Diagnostic is required.
*/
void x25_transmit_diagnostic(struct x25_neigh *nb, unsigned char diag)
{
unsigned char *dptr;
int len = X25_MAX_L2_LEN + X25_STD_MIN_LEN + 1;
struct sk_buff *skb = alloc_skb(len, GFP_ATOMIC);
if (!skb)
return;
skb_reserve(skb, X25_MAX_L2_LEN);
dptr = skb_put(skb, X25_STD_MIN_LEN + 1);
*dptr++ = nb->extended ? X25_GFI_EXTSEQ : X25_GFI_STDSEQ;
*dptr++ = 0x00;
*dptr++ = X25_DIAGNOSTIC;
*dptr++ = diag;
skb->sk = NULL;
x25_send_frame(skb, nb);
}
/*
* This routine is called when a Clear Request is needed outside of the context
* of a connected socket.
......
......@@ -166,14 +166,14 @@ static int x25_seq_socket_show(struct seq_file *seq, void *v)
return 0;
}
struct seq_operations x25_seq_route_ops = {
static struct seq_operations x25_seq_route_ops = {
.start = x25_seq_route_start,
.next = x25_seq_route_next,
.stop = x25_seq_route_stop,
.show = x25_seq_route_show,
};
struct seq_operations x25_seq_socket_ops = {
static struct seq_operations x25_seq_socket_ops = {
.start = x25_seq_socket_start,
.next = x25_seq_socket_next,
.stop = x25_seq_socket_stop,
......
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