183int vlan_proc_rem_dev(struct net_device *vlandev)
184{
185 struct vlan_net *vn = net_generic(dev_net(vlandev), vlan_net_id);
186
187
188 if (vlan_dev_info(vlandev)->dent) {
189 remove_proc_entry(vlan_dev_info(vlandev)->dent->name,
190 vn->proc_vlan_dir);
191 vlan_dev_info(vlandev)->dent = NULL;
192 }
193 return 0;
194}
195
196
197
198
199
200
201
202
203static void *vlan_seq_start(struct seq_file *seq, loff_t *pos)
204 __acquires(dev_base_lock)
205{
206 struct net_device *dev;
207 struct net *net = seq_file_net(seq);
208 loff_t i = 1;
209
210 read_lock(&dev_base_lock);
211
212 if (*pos == 0)
213 return SEQ_START_TOKEN;
214
215 for_each_netdev(net, dev) {
216 if (!is_vlan_dev(dev))
217 continue;
218
219 if (i++ == *pos)
220 return dev;
221 }
222
223 return NULL;