Skip to content

Commit 842f01e

Browse files
committed
Revert "net: check vlan filter feature in vlan_vids_add_by_dev() and vlan_vids_del_by_dev()"
This reverts commit 53a85c3. This patch was not backported correctly and introduced the following warning: net/8021q/vlan_core.c:332:61: warning: passing argument 2 of 'vlan_hw_filter_capable' makes pointer from integer without a cast [-Wint-conversion] The problem is that commit 9daae9b ("net: Call add/kill vid ndo on vlan filter feature toggling") from v4.17 changed the signature of vlan_hw_filter_capable(): -static bool vlan_hw_filter_capable(const struct net_device *dev, - const struct vlan_vid_info *vid_info) +bool vlan_hw_filter_capable(const struct net_device *dev, __be16 proto) { Revert this change so we can apply a correct backport. Signed-off-by: Vegard Nossum <[email protected]>
1 parent 5a1a8ad commit 842f01e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

net/8021q/vlan_core.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,6 @@ int vlan_vids_add_by_dev(struct net_device *dev,
329329
return 0;
330330

331331
list_for_each_entry(vid_info, &vlan_info->vid_list, list) {
332-
if (!vlan_hw_filter_capable(by_dev, vid_info->proto))
333-
continue;
334332
err = vlan_vid_add(dev, vid_info->proto, vid_info->vid);
335333
if (err)
336334
goto unwind;
@@ -341,8 +339,6 @@ int vlan_vids_add_by_dev(struct net_device *dev,
341339
list_for_each_entry_continue_reverse(vid_info,
342340
&vlan_info->vid_list,
343341
list) {
344-
if (!vlan_hw_filter_capable(by_dev, vid_info->proto))
345-
continue;
346342
vlan_vid_del(dev, vid_info->proto, vid_info->vid);
347343
}
348344

@@ -362,11 +358,8 @@ void vlan_vids_del_by_dev(struct net_device *dev,
362358
if (!vlan_info)
363359
return;
364360

365-
list_for_each_entry(vid_info, &vlan_info->vid_list, list) {
366-
if (!vlan_hw_filter_capable(by_dev, vid_info->proto))
367-
continue;
361+
list_for_each_entry(vid_info, &vlan_info->vid_list, list)
368362
vlan_vid_del(dev, vid_info->proto, vid_info->vid);
369-
}
370363
}
371364
EXPORT_SYMBOL(vlan_vids_del_by_dev);
372365

0 commit comments

Comments
 (0)