Commit 7875f697 authored by Adrian Bunk's avatar Adrian Bunk Committed by David S. Miller

[NET]: net/802/: some cleanups

This patch contains the following cleanups:
- make some needlessly global code static
- net/802/hippi.c: remove the unused global function hippi_net_init
- net/8021q/vlan.c: remove the global variable vlan_default_dev_flags
                    that was never changed
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0477d38c
......@@ -18,7 +18,6 @@ static int iph5526_change_mtu(struct net_device *dev, int mtu);
static void rx_net_packet(struct fc_info *fi, u_char *buff_addr, int payload_size);
static void rx_net_mfs_packet(struct fc_info *fi, struct sk_buff *skb);
unsigned short fc_type_trans(struct sk_buff *skb, struct net_device *dev);
static int tx_ip_packet(struct sk_buff *skb, unsigned long len, struct fc_info *fi);
static int tx_arp_packet(char *data, unsigned long len, struct fc_info *fi);
#endif
......
......@@ -27,10 +27,6 @@
#include <linux/if_fc.h>
#ifdef __KERNEL__
extern int fc_header(struct sk_buff *skb, struct net_device *dev,
unsigned short type, void *daddr,
void *saddr, unsigned len);
extern int fc_rebuild_header(struct sk_buff *skb);
extern unsigned short fc_type_trans(struct sk_buff *skb, struct net_device *dev);
extern struct net_device *alloc_fcdev(int sizeof_priv);
......
......@@ -25,13 +25,6 @@
#include <linux/if_fddi.h>
#ifdef __KERNEL__
extern int fddi_header(struct sk_buff *skb,
struct net_device *dev,
unsigned short type,
void *daddr,
void *saddr,
unsigned len);
extern int fddi_rebuild_header(struct sk_buff *skb);
extern unsigned short fddi_type_trans(struct sk_buff *skb,
struct net_device *dev);
extern struct net_device *alloc_fddidev(int sizeof_priv);
......
......@@ -26,30 +26,9 @@
#include <linux/if_hippi.h>
#ifdef __KERNEL__
extern int hippi_header(struct sk_buff *skb,
struct net_device *dev,
unsigned short type,
void *daddr,
void *saddr,
unsigned len);
extern int hippi_rebuild_header(struct sk_buff *skb);
extern unsigned short hippi_type_trans(struct sk_buff *skb,
struct net_device *dev);
extern void hippi_header_cache_bind(struct hh_cache ** hhp,
struct net_device *dev,
unsigned short htype,
__u32 daddr);
extern void hippi_header_cache_update(struct hh_cache *hh,
struct net_device *dev,
unsigned char * haddr);
extern int hippi_header_parse(struct sk_buff *skb, unsigned char *haddr);
extern void hippi_net_init(void);
extern struct net_device *alloc_hippi_dev(int sizeof_priv);
#endif
......
......@@ -28,10 +28,6 @@
#include <linux/if_tr.h>
#ifdef __KERNEL__
extern int tr_header(struct sk_buff *skb, struct net_device *dev,
unsigned short type, void *daddr,
void *saddr, unsigned len);
extern int tr_rebuild_header(struct sk_buff *skb);
extern unsigned short tr_type_trans(struct sk_buff *skb, struct net_device *dev);
extern void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct net_device *dev);
extern struct net_device *alloc_trdev(int sizeof_priv);
......
......@@ -35,8 +35,9 @@
* Put the headers on a Fibre Channel packet.
*/
int fc_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
void *daddr, void *saddr, unsigned len)
static int fc_header(struct sk_buff *skb, struct net_device *dev,
unsigned short type,
void *daddr, void *saddr, unsigned len)
{
struct fch_hdr *fch;
int hdr_len;
......@@ -81,7 +82,7 @@ int fc_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
* can now send the packet.
*/
int fc_rebuild_header(struct sk_buff *skb)
static int fc_rebuild_header(struct sk_buff *skb)
{
struct fch_hdr *fch=(struct fch_hdr *)skb->data;
struct fcllc *fcllc=(struct fcllc *)(skb->data+sizeof(struct fch_hdr));
......
......@@ -52,8 +52,9 @@
* daddr=NULL means leave destination address (eg unresolved arp)
*/
int fddi_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
void *daddr, void *saddr, unsigned len)
static int fddi_header(struct sk_buff *skb, struct net_device *dev,
unsigned short type,
void *daddr, void *saddr, unsigned len)
{
int hl = FDDI_K_SNAP_HLEN;
struct fddihdr *fddi;
......@@ -96,7 +97,7 @@ int fddi_header(struct sk_buff *skb, struct net_device *dev, unsigned short type
* this sk_buff. We now let ARP fill in the other fields.
*/
int fddi_rebuild_header(struct sk_buff *skb)
static int fddi_rebuild_header(struct sk_buff *skb)
{
struct fddihdr *fddi = (struct fddihdr *)skb->data;
......
......@@ -39,17 +39,6 @@
#include <asm/checksum.h>
#include <asm/system.h>
/*
* hippi_net_init()
*
* Do nothing, this is just to pursuade the stupid linker to behave.
*/
void hippi_net_init(void)
{
return;
}
/*
* Create the HIPPI MAC header for an arbitrary protocol layer
*
......@@ -57,9 +46,9 @@ void hippi_net_init(void)
* daddr=NULL means leave destination address (eg unresolved arp)
*/
int hippi_header(struct sk_buff *skb, struct net_device *dev,
unsigned short type, void *daddr, void *saddr,
unsigned len)
static int hippi_header(struct sk_buff *skb, struct net_device *dev,
unsigned short type, void *daddr, void *saddr,
unsigned len)
{
struct hippi_hdr *hip = (struct hippi_hdr *)skb_push(skb, HIPPI_HLEN);
......@@ -107,7 +96,7 @@ int hippi_header(struct sk_buff *skb, struct net_device *dev,
* completed on this sk_buff. We now let ARP fill in the other fields.
*/
int hippi_rebuild_header(struct sk_buff *skb)
static int hippi_rebuild_header(struct sk_buff *skb)
{
struct hippi_hdr *hip = (struct hippi_hdr *)skb->data;
......
......@@ -98,8 +98,9 @@ static inline unsigned long rif_hash(const unsigned char *addr)
* makes this a little more exciting than on ethernet.
*/
int tr_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
void *daddr, void *saddr, unsigned len)
static int tr_header(struct sk_buff *skb, struct net_device *dev,
unsigned short type,
void *daddr, void *saddr, unsigned len)
{
struct trh_hdr *trh;
int hdr_len;
......@@ -153,7 +154,7 @@ int tr_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
* can now send the packet.
*/
int tr_rebuild_header(struct sk_buff *skb)
static int tr_rebuild_header(struct sk_buff *skb)
{
struct trh_hdr *trh=(struct trh_hdr *)skb->data;
struct trllc *trllc=(struct trllc *)(skb->data+sizeof(struct trh_hdr));
......
......@@ -40,7 +40,7 @@
/* Global VLAN variables */
/* Our listing of VLAN group(s) */
struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE];
static struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE];
#define vlan_grp_hashfn(IDX) ((((IDX) >> VLAN_GRP_HASH_SHIFT) ^ (IDX)) & VLAN_GRP_HASH_MASK)
static char vlan_fullname[] = "802.1Q VLAN Support";
......@@ -52,7 +52,7 @@ static int vlan_device_event(struct notifier_block *, unsigned long, void *);
static int vlan_ioctl_handler(void __user *);
static int unregister_vlan_dev(struct net_device *, unsigned short );
struct notifier_block vlan_notifier_block = {
static struct notifier_block vlan_notifier_block = {
.notifier_call = vlan_device_event,
};
......@@ -61,9 +61,6 @@ struct notifier_block vlan_notifier_block = {
/* Determines interface naming scheme. */
unsigned short vlan_name_type = VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD;
/* DO reorder the header by default */
unsigned short vlan_default_dev_flags = 1;
static struct packet_type vlan_packet_type = {
.type = __constant_htons(ETH_P_8021Q),
.func = vlan_skb_recv, /* VLAN receive method */
......@@ -490,7 +487,7 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
VLAN_DEV_INFO(new_dev)->vlan_id = VLAN_ID; /* 1 through VLAN_VID_MASK */
VLAN_DEV_INFO(new_dev)->real_dev = real_dev;
VLAN_DEV_INFO(new_dev)->dent = NULL;
VLAN_DEV_INFO(new_dev)->flags = vlan_default_dev_flags;
VLAN_DEV_INFO(new_dev)->flags = 1;
#ifdef VLAN_DEBUG
printk(VLAN_DBG "About to go find the group for idx: %i\n",
......
......@@ -33,7 +33,6 @@ extern unsigned short vlan_name_type;
#define VLAN_GRP_HASH_SHIFT 5
#define VLAN_GRP_HASH_SIZE (1 << VLAN_GRP_HASH_SHIFT)
#define VLAN_GRP_HASH_MASK (VLAN_GRP_HASH_SIZE - 1)
extern struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE];
/* Find a VLAN device by the MAC address of its Ethernet device, and
* it's VLAN ID. The default configuration is to have VLAN's scope
......
......@@ -239,7 +239,7 @@ int vlan_proc_rem_dev(struct net_device *vlandev)
*/
/* starting at dev, find a VLAN device */
struct net_device *vlan_skip(struct net_device *dev)
static struct net_device *vlan_skip(struct net_device *dev)
{
while (dev && !(dev->priv_flags & IFF_802_1Q_VLAN))
dev = dev->next;
......
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