summaryrefslogtreecommitdiff
path: root/net/atm/lec.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/atm/lec.c')
-rw-r--r--net/atm/lec.c88
1 files changed, 46 insertions, 42 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c
index e2a81b1ed071..a0752487026d 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -37,11 +37,8 @@
#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
#include <linux/if_bridge.h>
#include "../bridge/br_private.h"
-static unsigned char bridge_ula_lec[] = {0x01, 0x80, 0xc2, 0x00, 0x00};
-extern struct net_bridge_fdb_entry *(*br_fdb_get_hook)(struct net_bridge *br,
- unsigned char *addr);
-extern void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent);
+static unsigned char bridge_ula_lec[] = {0x01, 0x80, 0xc2, 0x00, 0x00};
#endif
/* Modular too */
@@ -83,6 +80,29 @@ static int lane2_resolve(struct net_device *dev, u8 *dst_mac, int force,
static int lane2_associate_req (struct net_device *dev, u8 *lan_dst,
u8 *tlvs, u32 sizeoftlvs);
+static int lec_addr_delete(struct lec_priv *priv, unsigned char *atm_addr,
+ unsigned long permanent);
+static void lec_arp_check_empties(struct lec_priv *priv,
+ struct atm_vcc *vcc, struct sk_buff *skb);
+static void lec_arp_destroy(struct lec_priv *priv);
+static void lec_arp_init(struct lec_priv *priv);
+static struct atm_vcc* lec_arp_resolve(struct lec_priv *priv,
+ unsigned char *mac_to_find,
+ int is_rdesc,
+ struct lec_arp_table **ret_entry);
+static void lec_arp_update(struct lec_priv *priv, unsigned char *mac_addr,
+ unsigned char *atm_addr, unsigned long remoteflag,
+ unsigned int targetless_le_arp);
+static void lec_flush_complete(struct lec_priv *priv, unsigned long tran_id);
+static int lec_mcast_make(struct lec_priv *priv, struct atm_vcc *vcc);
+static void lec_set_flush_tran_id(struct lec_priv *priv,
+ unsigned char *atm_addr,
+ unsigned long tran_id);
+static void lec_vcc_added(struct lec_priv *priv, struct atmlec_ioc *ioc_data,
+ struct atm_vcc *vcc,
+ void (*old_push)(struct atm_vcc *vcc, struct sk_buff *skb));
+static void lec_vcc_close(struct lec_priv *priv, struct atm_vcc *vcc);
+
static struct lane2_ops lane2_ops = {
lane2_resolve, /* resolve, spec 3.1.3 */
lane2_associate_req, /* associate_req, spec 3.1.4 */
@@ -94,21 +114,6 @@ static unsigned char bus_mac[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
/* Device structures */
static struct net_device *dev_lec[MAX_LEC_ITF];
-/* This will be called from proc.c via function pointer */
-struct net_device *get_dev_lec(int itf)
-{
- struct net_device *dev;
-
- if (itf >= MAX_LEC_ITF)
- return NULL;
- rtnl_lock();
- dev = dev_lec[itf];
- if (dev)
- dev_hold(dev);
- rtnl_unlock();
- return dev;
-}
-
#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
static void lec_handle_bridge(struct sk_buff *skb, struct net_device *dev)
{
@@ -155,7 +160,7 @@ static void lec_handle_bridge(struct sk_buff *skb, struct net_device *dev)
* and returns NULL.
*/
#ifdef CONFIG_TR
-unsigned char *get_tr_dst(unsigned char *packet, unsigned char *rdesc)
+static unsigned char *get_tr_dst(unsigned char *packet, unsigned char *rdesc)
{
struct trh_hdr *trh;
int riflen, num_rdsc;
@@ -599,7 +604,7 @@ static struct atm_dev lecatm_dev = {
* LANE2: new argument struct sk_buff *data contains
* the LE_ARP based TLVs introduced in the LANE2 spec
*/
-int
+static int
send_to_lecd(struct lec_priv *priv, atmlec_msg_type type,
unsigned char *mac_addr, unsigned char *atm_addr,
struct sk_buff *data)
@@ -681,7 +686,7 @@ static unsigned char lec_ctrl_magic[] = {
0x01,
0x01 };
-void
+static void
lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
{
struct net_device *dev = (struct net_device *)vcc->proto_data;
@@ -764,7 +769,7 @@ lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
}
}
-void
+static void
lec_pop(struct atm_vcc *vcc, struct sk_buff *skb)
{
struct lec_vcc_priv *vpriv = LEC_VCC_PRIV(vcc);
@@ -784,7 +789,7 @@ lec_pop(struct atm_vcc *vcc, struct sk_buff *skb)
}
}
-int
+static int
lec_vcc_attach(struct atm_vcc *vcc, void __user *arg)
{
struct lec_vcc_priv *vpriv;
@@ -813,7 +818,7 @@ lec_vcc_attach(struct atm_vcc *vcc, void __user *arg)
return 0;
}
-int
+static int
lec_mcast_attach(struct atm_vcc *vcc, int arg)
{
if (arg <0 || arg >= MAX_LEC_ITF || !dev_lec[arg])
@@ -823,7 +828,7 @@ lec_mcast_attach(struct atm_vcc *vcc, int arg)
}
/* Initialize device. */
-int
+static int
lecd_attach(struct atm_vcc *vcc, int arg)
{
int i;
@@ -1383,7 +1388,6 @@ static void lane2_associate_ind (struct net_device *dev, u8 *mac_addr,
static void lec_arp_check_expire(unsigned long data);
static void lec_arp_expire_arp(unsigned long data);
-void dump_arp_table(struct lec_priv *priv);
/*
* Arp table funcs
@@ -1394,7 +1398,7 @@ void dump_arp_table(struct lec_priv *priv);
/*
* Initialization of arp-cache
*/
-void
+static void
lec_arp_init(struct lec_priv *priv)
{
unsigned short i;
@@ -1410,7 +1414,7 @@ lec_arp_init(struct lec_priv *priv)
add_timer(&priv->lec_arp_timer);
}
-void
+static void
lec_arp_clear_vccs(struct lec_arp_table *entry)
{
if (entry->vcc) {
@@ -1539,7 +1543,7 @@ get_status_string(unsigned char st)
}
#endif
-void
+static void
dump_arp_table(struct lec_priv *priv)
{
#if DEBUG_ARP_TABLE
@@ -1691,7 +1695,7 @@ dump_arp_table(struct lec_priv *priv)
/*
* Destruction of arp-cache
*/
-void
+static void
lec_arp_destroy(struct lec_priv *priv)
{
unsigned long flags;
@@ -1953,9 +1957,9 @@ lec_arp_check_expire(unsigned long data)
* Try to find vcc where mac_address is attached.
*
*/
-struct atm_vcc*
-lec_arp_resolve(struct lec_priv *priv, unsigned char *mac_to_find, int is_rdesc,
- struct lec_arp_table **ret_entry)
+static struct atm_vcc*
+lec_arp_resolve(struct lec_priv *priv, unsigned char *mac_to_find,
+ int is_rdesc, struct lec_arp_table **ret_entry)
{
unsigned long flags;
struct lec_arp_table *entry;
@@ -2034,7 +2038,7 @@ out:
return found;
}
-int
+static int
lec_addr_delete(struct lec_priv *priv, unsigned char *atm_addr,
unsigned long permanent)
{
@@ -2064,7 +2068,7 @@ lec_addr_delete(struct lec_priv *priv, unsigned char *atm_addr,
/*
* Notifies: Response to arp_request (atm_addr != NULL)
*/
-void
+static void
lec_arp_update(struct lec_priv *priv, unsigned char *mac_addr,
unsigned char *atm_addr, unsigned long remoteflag,
unsigned int targetless_le_arp)
@@ -2176,7 +2180,7 @@ out:
/*
* Notifies: Vcc setup ready
*/
-void
+static void
lec_vcc_added(struct lec_priv *priv, struct atmlec_ioc *ioc_data,
struct atm_vcc *vcc,
void (*old_push)(struct atm_vcc *vcc, struct sk_buff *skb))
@@ -2320,7 +2324,7 @@ out:
spin_unlock_irqrestore(&priv->lec_arp_lock, flags);
}
-void
+static void
lec_flush_complete(struct lec_priv *priv, unsigned long tran_id)
{
unsigned long flags;
@@ -2346,7 +2350,7 @@ lec_flush_complete(struct lec_priv *priv, unsigned long tran_id)
dump_arp_table(priv);
}
-void
+static void
lec_set_flush_tran_id(struct lec_priv *priv,
unsigned char *atm_addr, unsigned long tran_id)
{
@@ -2364,7 +2368,7 @@ lec_set_flush_tran_id(struct lec_priv *priv,
spin_unlock_irqrestore(&priv->lec_arp_lock, flags);
}
-int
+static int
lec_mcast_make(struct lec_priv *priv, struct atm_vcc *vcc)
{
unsigned long flags;
@@ -2401,7 +2405,7 @@ out:
return err;
}
-void
+static void
lec_vcc_close(struct lec_priv *priv, struct atm_vcc *vcc)
{
unsigned long flags;
@@ -2476,7 +2480,7 @@ lec_vcc_close(struct lec_priv *priv, struct atm_vcc *vcc)
dump_arp_table(priv);
}
-void
+static void
lec_arp_check_empties(struct lec_priv *priv,
struct atm_vcc *vcc, struct sk_buff *skb)
{