diff options
Diffstat (limited to 'net/core/dev_mcast.c')
-rw-r--r-- | net/core/dev_mcast.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c index b22648d04d..bfcbdf73a2 100644 --- a/net/core/dev_mcast.c +++ b/net/core/dev_mcast.c | |||
@@ -1,12 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * Linux NET3: Multicast List maintenance. | 2 | * Linux NET3: Multicast List maintenance. |
3 | * | 3 | * |
4 | * Authors: | 4 | * Authors: |
5 | * Tim Kordas <tjk@nostromo.eeap.cwru.edu> | 5 | * Tim Kordas <tjk@nostromo.eeap.cwru.edu> |
6 | * Richard Underwood <richard@wuzz.demon.co.uk> | 6 | * Richard Underwood <richard@wuzz.demon.co.uk> |
7 | * | 7 | * |
8 | * Stir fried together from the IP multicast and CAP patches above | 8 | * Stir fried together from the IP multicast and CAP patches above |
9 | * Alan Cox <Alan.Cox@linux.org> | 9 | * Alan Cox <Alan.Cox@linux.org> |
10 | * | 10 | * |
11 | * Fixes: | 11 | * Fixes: |
12 | * Alan Cox : Update the device on a real delete | 12 | * Alan Cox : Update the device on a real delete |
@@ -50,11 +50,11 @@ | |||
50 | 50 | ||
51 | 51 | ||
52 | /* | 52 | /* |
53 | * Device multicast list maintenance. | 53 | * Device multicast list maintenance. |
54 | * | 54 | * |
55 | * This is used both by IP and by the user level maintenance functions. | 55 | * This is used both by IP and by the user level maintenance functions. |
56 | * Unlike BSD we maintain a usage count on a given multicast address so | 56 | * Unlike BSD we maintain a usage count on a given multicast address so |
57 | * that a casual user application can add/delete multicasts used by | 57 | * that a casual user application can add/delete multicasts used by |
58 | * protocols without doing damage to the protocols when it deletes the | 58 | * protocols without doing damage to the protocols when it deletes the |
59 | * entries. It also helps IP as it tracks overlapping maps. | 59 | * entries. It also helps IP as it tracks overlapping maps. |
60 | * | 60 | * |
@@ -67,7 +67,7 @@ | |||
67 | /* | 67 | /* |
68 | * Update the multicast list into the physical NIC controller. | 68 | * Update the multicast list into the physical NIC controller. |
69 | */ | 69 | */ |
70 | 70 | ||
71 | static void __dev_mc_upload(struct net_device *dev) | 71 | static void __dev_mc_upload(struct net_device *dev) |
72 | { | 72 | { |
73 | /* Don't do anything till we up the interface | 73 | /* Don't do anything till we up the interface |
@@ -100,7 +100,7 @@ void dev_mc_upload(struct net_device *dev) | |||
100 | /* | 100 | /* |
101 | * Delete a device level multicast | 101 | * Delete a device level multicast |
102 | */ | 102 | */ |
103 | 103 | ||
104 | int dev_mc_delete(struct net_device *dev, void *addr, int alen, int glbl) | 104 | int dev_mc_delete(struct net_device *dev, void *addr, int alen, int glbl) |
105 | { | 105 | { |
106 | int err = 0; | 106 | int err = 0; |
@@ -137,7 +137,7 @@ int dev_mc_delete(struct net_device *dev, void *addr, int alen, int glbl) | |||
137 | * loaded filter is now wrong. Fix it | 137 | * loaded filter is now wrong. Fix it |
138 | */ | 138 | */ |
139 | __dev_mc_upload(dev); | 139 | __dev_mc_upload(dev); |
140 | 140 | ||
141 | netif_tx_unlock_bh(dev); | 141 | netif_tx_unlock_bh(dev); |
142 | return 0; | 142 | return 0; |
143 | } | 143 | } |
@@ -151,7 +151,7 @@ done: | |||
151 | /* | 151 | /* |
152 | * Add a device level multicast | 152 | * Add a device level multicast |
153 | */ | 153 | */ |
154 | 154 | ||
155 | int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl) | 155 | int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl) |
156 | { | 156 | { |
157 | int err = 0; | 157 | int err = 0; |
@@ -187,7 +187,7 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl) | |||
187 | dev->mc_count++; | 187 | dev->mc_count++; |
188 | 188 | ||
189 | __dev_mc_upload(dev); | 189 | __dev_mc_upload(dev); |
190 | 190 | ||
191 | netif_tx_unlock_bh(dev); | 191 | netif_tx_unlock_bh(dev); |
192 | return 0; | 192 | return 0; |
193 | 193 | ||
@@ -204,7 +204,7 @@ done: | |||
204 | void dev_mc_discard(struct net_device *dev) | 204 | void dev_mc_discard(struct net_device *dev) |
205 | { | 205 | { |
206 | netif_tx_lock_bh(dev); | 206 | netif_tx_lock_bh(dev); |
207 | 207 | ||
208 | while (dev->mc_list != NULL) { | 208 | while (dev->mc_list != NULL) { |
209 | struct dev_mc_list *tmp = dev->mc_list; | 209 | struct dev_mc_list *tmp = dev->mc_list; |
210 | dev->mc_list = tmp->next; | 210 | dev->mc_list = tmp->next; |
@@ -225,7 +225,7 @@ static void *dev_mc_seq_start(struct seq_file *seq, loff_t *pos) | |||
225 | 225 | ||
226 | read_lock(&dev_base_lock); | 226 | read_lock(&dev_base_lock); |
227 | for (dev = dev_base; dev; dev = dev->next) { | 227 | for (dev = dev_base; dev; dev = dev->next) { |
228 | if (off++ == *pos) | 228 | if (off++ == *pos) |
229 | return dev; | 229 | return dev; |
230 | } | 230 | } |
231 | return NULL; | 231 | return NULL; |