OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [net/] [bridge/] [br.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 *      Generic parts
3
 *      Linux ethernet bridge
4
 *
5
 *      Authors:
6
 *      Lennert Buytenhek               <buytenh@gnu.org>
7
 *
8
 *      $Id: br.c,v 1.1.1.1 2004-04-15 01:16:25 phoenix Exp $
9
 *
10
 *      This program is free software; you can redistribute it and/or
11
 *      modify it under the terms of the GNU General Public License
12
 *      as published by the Free Software Foundation; either version
13
 *      2 of the License, or (at your option) any later version.
14
 */
15
 
16
#include <linux/config.h>
17
#include <linux/module.h>
18
#include <linux/kernel.h>
19
#include <linux/miscdevice.h>
20
#include <linux/netdevice.h>
21
#include <linux/etherdevice.h>
22
#include <linux/init.h>
23
#include <linux/if_bridge.h>
24
#include <linux/brlock.h>
25
#include <asm/uaccess.h>
26
#include "br_private.h"
27
 
28
#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
29
#include "../atm/lec.h"
30
#endif
31
 
32
void br_dec_use_count()
33
{
34
        MOD_DEC_USE_COUNT;
35
}
36
 
37
void br_inc_use_count()
38
{
39
        MOD_INC_USE_COUNT;
40
}
41
 
42
static int __init br_init(void)
43
{
44
        printk(KERN_INFO "NET4: Ethernet Bridge 008 for NET4.0\n");
45
 
46
        br_handle_frame_hook = br_handle_frame;
47
        br_ioctl_hook = br_ioctl_deviceless_stub;
48
#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
49
        br_fdb_get_hook = br_fdb_get;
50
        br_fdb_put_hook = br_fdb_put;
51
#endif
52
        register_netdevice_notifier(&br_device_notifier);
53
 
54
        return 0;
55
}
56
 
57
static void __br_clear_ioctl_hook(void)
58
{
59
        br_ioctl_hook = NULL;
60
}
61
 
62
static void __exit br_deinit(void)
63
{
64
        unregister_netdevice_notifier(&br_device_notifier);
65
        br_call_ioctl_atomic(__br_clear_ioctl_hook);
66
 
67
        br_write_lock_bh(BR_NETPROTO_LOCK);
68
        br_handle_frame_hook = NULL;
69
        br_write_unlock_bh(BR_NETPROTO_LOCK);
70
 
71
#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
72
        br_fdb_get_hook = NULL;
73
        br_fdb_put_hook = NULL;
74
#endif
75
}
76
 
77
EXPORT_NO_SYMBOLS;
78
 
79
module_init(br_init)
80
module_exit(br_deinit)
81
MODULE_LICENSE("GPL");

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.