Commit 1b699bf3 authored by Tobias Klauser's avatar Tobias Klauser Committed by Steve French

ksmbd: use netif_is_bridge_port

Use netif_is_bridge_port defined in <linux/netdevice.h> instead of
open-coding it.
Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 9c166683
...@@ -476,7 +476,7 @@ static int ksmbd_netdev_event(struct notifier_block *nb, unsigned long event, ...@@ -476,7 +476,7 @@ static int ksmbd_netdev_event(struct notifier_block *nb, unsigned long event,
switch (event) { switch (event) {
case NETDEV_UP: case NETDEV_UP:
if (netdev->priv_flags & IFF_BRIDGE_PORT) if (netif_is_bridge_port(netdev))
return NOTIFY_OK; return NOTIFY_OK;
list_for_each_entry(iface, &iface_list, entry) { list_for_each_entry(iface, &iface_list, entry) {
...@@ -585,7 +585,7 @@ int ksmbd_tcp_set_interfaces(char *ifc_list, int ifc_list_sz) ...@@ -585,7 +585,7 @@ int ksmbd_tcp_set_interfaces(char *ifc_list, int ifc_list_sz)
rtnl_lock(); rtnl_lock();
for_each_netdev(&init_net, netdev) { for_each_netdev(&init_net, netdev) {
if (netdev->priv_flags & IFF_BRIDGE_PORT) if (netif_is_bridge_port(netdev))
continue; continue;
if (!alloc_iface(kstrdup(netdev->name, GFP_KERNEL))) if (!alloc_iface(kstrdup(netdev->name, GFP_KERNEL)))
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment