Commit 1ebb100c authored by Adrian Bunk's avatar Adrian Bunk Committed by Thomas Graf

[ROSE]: 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 c86ef6ee
......@@ -162,7 +162,6 @@ extern int rose_rx_call_request(struct sk_buff *, struct net_device *, struct r
extern void rose_destroy_socket(struct sock *);
/* rose_dev.c */
extern int rose_rx_ip(struct sk_buff *, struct net_device *);
extern void rose_setup(struct net_device *);
/* rose_in.c */
......@@ -170,15 +169,10 @@ extern int rose_process_rx_frame(struct sock *, struct sk_buff *);
/* rose_link.c */
extern void rose_start_ftimer(struct rose_neigh *);
extern void rose_start_t0timer(struct rose_neigh *);
extern void rose_stop_ftimer(struct rose_neigh *);
extern void rose_stop_t0timer(struct rose_neigh *);
extern int rose_ftimer_running(struct rose_neigh *);
extern int rose_t0timer_running(struct rose_neigh *);
extern void rose_link_rx_restart(struct sk_buff *, struct rose_neigh *, unsigned short);
extern void rose_transmit_restart_request(struct rose_neigh *);
extern void rose_transmit_restart_confirmation(struct rose_neigh *);
extern void rose_transmit_diagnostic(struct rose_neigh *, unsigned char);
extern void rose_transmit_clear_request(struct rose_neigh *, unsigned int, unsigned char, unsigned char);
extern void rose_transmit_link(struct sk_buff *, struct rose_neigh *);
......@@ -205,7 +199,6 @@ extern void rose_link_device_down(struct net_device *);
extern struct net_device *rose_dev_first(void);
extern struct net_device *rose_dev_get(rose_address *);
extern struct rose_route *rose_route_free_lci(unsigned int, struct rose_neigh *);
extern struct net_device *rose_ax25_dev_get(char *);
extern struct rose_neigh *rose_get_neigh(rose_address *, unsigned char *, unsigned char *);
extern int rose_rt_ioctl(unsigned int, void __user *);
extern void rose_link_failed(ax25_cb *, int);
......@@ -220,7 +213,6 @@ extern int rose_validate_nr(struct sock *, unsigned short);
extern void rose_write_internal(struct sock *, int);
extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *);
extern int rose_parse_facilities(unsigned char *, struct rose_facilities_struct *);
extern int rose_create_facilities(unsigned char *, rose_cb *);
extern void rose_disconnect(struct sock *, int, int, int);
/* rose_timer.c */
......
......@@ -59,7 +59,7 @@ int sysctl_rose_maximum_vcs = ROSE_DEFAULT_MAXVC;
int sysctl_rose_window_size = ROSE_DEFAULT_WINDOW_SIZE;
static HLIST_HEAD(rose_list);
spinlock_t rose_list_lock = SPIN_LOCK_UNLOCKED;
static spinlock_t rose_list_lock = SPIN_LOCK_UNLOCKED;
static struct proto_ops rose_proto_ops;
......
......@@ -37,38 +37,6 @@
#include <net/ax25.h>
#include <net/rose.h>
/*
* Only allow IP over ROSE frames through if the netrom device is up.
*/
int rose_rx_ip(struct sk_buff *skb, struct net_device *dev)
{
struct net_device_stats *stats = (struct net_device_stats *)dev->priv;
#ifdef CONFIG_INET
if (!netif_running(dev)) {
stats->rx_errors++;
return 0;
}
stats->rx_packets++;
stats->rx_bytes += skb->len;
skb->protocol = htons(ETH_P_IP);
/* Spoof incoming device */
skb->dev = dev;
skb->h.raw = skb->data;
skb->nh.raw = skb->data;
skb->pkt_type = PACKET_HOST;
ip_rcv(skb, skb->dev, NULL);
#else
kfree_skb(skb);
#endif
return 1;
}
static int rose_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
void *daddr, void *saddr, unsigned len)
{
......
......@@ -31,6 +31,9 @@
static void rose_ftimer_expiry(unsigned long);
static void rose_t0timer_expiry(unsigned long);
static void rose_transmit_restart_confirmation(struct rose_neigh *neigh);
static void rose_transmit_restart_request(struct rose_neigh *neigh);
void rose_start_ftimer(struct rose_neigh *neigh)
{
del_timer(&neigh->ftimer);
......@@ -42,7 +45,7 @@ void rose_start_ftimer(struct rose_neigh *neigh)
add_timer(&neigh->ftimer);
}
void rose_start_t0timer(struct rose_neigh *neigh)
static void rose_start_t0timer(struct rose_neigh *neigh)
{
del_timer(&neigh->t0timer);
......@@ -68,7 +71,7 @@ int rose_ftimer_running(struct rose_neigh *neigh)
return timer_pending(&neigh->ftimer);
}
int rose_t0timer_running(struct rose_neigh *neigh)
static int rose_t0timer_running(struct rose_neigh *neigh)
{
return timer_pending(&neigh->t0timer);
}
......@@ -165,7 +168,7 @@ void rose_link_rx_restart(struct sk_buff *skb, struct rose_neigh *neigh, unsigne
/*
* This routine is called when a Restart Request is needed
*/
void rose_transmit_restart_request(struct rose_neigh *neigh)
static void rose_transmit_restart_request(struct rose_neigh *neigh)
{
struct sk_buff *skb;
unsigned char *dptr;
......@@ -194,7 +197,7 @@ void rose_transmit_restart_request(struct rose_neigh *neigh)
/*
* This routine is called when a Restart Confirmation is needed
*/
void rose_transmit_restart_confirmation(struct rose_neigh *neigh)
static void rose_transmit_restart_confirmation(struct rose_neigh *neigh)
{
struct sk_buff *skb;
unsigned char *dptr;
......@@ -218,34 +221,6 @@ void rose_transmit_restart_confirmation(struct rose_neigh *neigh)
kfree_skb(skb);
}
/*
* This routine is called when a Diagnostic is required.
*/
void rose_transmit_diagnostic(struct rose_neigh *neigh, unsigned char diag)
{
struct sk_buff *skb;
unsigned char *dptr;
int len;
len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN + 2;
if ((skb = alloc_skb(len, GFP_ATOMIC)) == NULL)
return;
skb_reserve(skb, AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN);
dptr = skb_put(skb, ROSE_MIN_LEN + 2);
*dptr++ = AX25_P_ROSE;
*dptr++ = ROSE_GFI;
*dptr++ = 0x00;
*dptr++ = ROSE_DIAGNOSTIC;
*dptr++ = diag;
if (!rose_send_frame(skb, neigh))
kfree_skb(skb);
}
/*
* This routine is called when a Clear Request is needed outside of the context
* of a connected socket.
......
......@@ -41,7 +41,7 @@ static unsigned int rose_neigh_no = 1;
static struct rose_node *rose_node_list;
static spinlock_t rose_node_list_lock = SPIN_LOCK_UNLOCKED;
struct rose_neigh *rose_neigh_list;
static struct rose_neigh *rose_neigh_list;
static spinlock_t rose_neigh_list_lock = SPIN_LOCK_UNLOCKED;
static struct rose_route *rose_route_list;
static spinlock_t rose_route_list_lock = SPIN_LOCK_UNLOCKED;
......@@ -587,7 +587,7 @@ static int rose_clear_routes(void)
/*
* Check that the device given is a valid AX.25 interface that is "up".
*/
struct net_device *rose_ax25_dev_get(char *devname)
static struct net_device *rose_ax25_dev_get(char *devname)
{
struct net_device *dev;
......
......@@ -28,6 +28,8 @@
#include <linux/interrupt.h>
#include <net/rose.h>
static int rose_create_facilities(unsigned char *buffer, rose_cb *rose);
/*
* This routine purges all of the queues of frames.
*/
......@@ -394,7 +396,7 @@ int rose_parse_facilities(unsigned char *p,
return 1;
}
int rose_create_facilities(unsigned char *buffer, rose_cb *rose)
static int rose_create_facilities(unsigned char *buffer, rose_cb *rose)
{
unsigned char *p = buffer + 1;
char *callsign;
......
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