Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
7201d1b2
Commit
7201d1b2
authored
Apr 08, 2003
by
Stephen Hemminger
Committed by
David S. Miller
Apr 08, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[VLAN]: Update to new module semantics, use synchronize_net.
parent
6963351e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
net/8021q/vlan.c
net/8021q/vlan.c
+11
-7
net/8021q/vlan_dev.c
net/8021q/vlan_dev.c
+0
-1
No files found.
net/8021q/vlan.c
View file @
7201d1b2
...
...
@@ -29,7 +29,6 @@
#include <net/p8022.h>
#include <net/arp.h>
#include <linux/rtnetlink.h>
#include <linux/brlock.h>
#include <linux/notifier.h>
#include <linux/if_vlan.h>
...
...
@@ -68,7 +67,6 @@ static struct packet_type vlan_packet_type = {
.
dev
=
NULL
,
.
func
=
vlan_skb_recv
,
/* VLAN receive method */
.
data
=
(
void
*
)(
-
1
),
/* Set here '(void *)1' when this code can SHARE SKBs */
.
next
=
NULL
};
/* End of global variables definitions. */
...
...
@@ -231,9 +229,8 @@ static int unregister_vlan_dev(struct net_device *real_dev,
real_dev
->
vlan_rx_kill_vid
(
real_dev
,
vlan_id
);
}
br_write_lock
(
BR_NETPROTO_LOCK
);
grp
->
vlan_devices
[
vlan_id
]
=
NULL
;
br_write_unlock
(
BR_NETPROTO_LOCK
);
synchronize_net
(
);
/* Caller unregisters (and if necessary, puts)
...
...
@@ -266,7 +263,7 @@ static int unregister_vlan_dev(struct net_device *real_dev,
ret
=
1
;
}
MOD_DEC_USE_COUNT
;
module_put
(
THIS_MODULE
)
;
}
}
...
...
@@ -433,6 +430,7 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
/* set up method calls */
new_dev
->
init
=
vlan_dev_init
;
new_dev
->
destructor
=
vlan_dev_destruct
;
new_dev
->
owner
=
THIS_MODULE
;
/* new_dev->ifindex = 0; it will be set when added to
* the global list.
...
...
@@ -540,16 +538,22 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
register_netdevice
(
new_dev
);
rtnl_unlock
();
/* NOTE: We have a reference to the real device,
* so hold on to the reference.
*/
MOD_INC_USE_COUNT
;
/* Add was a success!! */
if
(
!
try_module_get
(
THIS_MODULE
))
goto
out_module_dying
;
#ifdef VLAN_DEBUG
printk
(
VLAN_DBG
"Allocated new device successfully, returning.
\n
"
);
#endif
return
new_dev
;
out_module_dying:
rtnl_lock
();
unregister_netdevice
(
new_dev
);
out_free_newdev_priv:
kfree
(
new_dev
->
priv
);
...
...
net/8021q/vlan_dev.c
View file @
7201d1b2
...
...
@@ -31,7 +31,6 @@
#include <net/datalink.h>
#include <net/p8022.h>
#include <net/arp.h>
#include <linux/brlock.h>
#include "vlan.h"
#include "vlanproc.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment