File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1169,6 +1169,11 @@ static int adin1110_port_bridge_leave(struct adin1110_port_priv *port_priv,
11691169 return ret ;
11701170}
11711171
1172+ static bool adin1110_port_dev_check (const struct net_device * dev )
1173+ {
1174+ return dev -> netdev_ops == & adin1110_netdev_ops ;
1175+ }
1176+
11721177static int adin1110_netdevice_event (struct notifier_block * unused ,
11731178 unsigned long event , void * ptr )
11741179{
@@ -1177,6 +1182,9 @@ static int adin1110_netdevice_event(struct notifier_block *unused,
11771182 struct netdev_notifier_changeupper_info * info = ptr ;
11781183 int ret = 0 ;
11791184
1185+ if (!adin1110_port_dev_check (dev ))
1186+ return NOTIFY_DONE ;
1187+
11801188 switch (event ) {
11811189 case NETDEV_CHANGEUPPER :
11821190 if (netif_is_bridge_master (info -> upper_dev )) {
@@ -1202,11 +1210,6 @@ static void adin1110_disconnect_phy(void *data)
12021210 phy_disconnect (data );
12031211}
12041212
1205- static bool adin1110_port_dev_check (const struct net_device * dev )
1206- {
1207- return dev -> netdev_ops == & adin1110_netdev_ops ;
1208- }
1209-
12101213static int adin1110_port_set_forwarding_state (struct adin1110_port_priv * port_priv )
12111214{
12121215 struct adin1110_priv * priv = port_priv -> priv ;
You can’t perform that action at this time.
0 commit comments