|
@@ -393,15 +393,13 @@ static int hard_if_event(struct notifier_block *this,
|
|
|
/* FIXME: each batman_if will be attached to a softif */
|
|
|
struct bat_priv *bat_priv = netdev_priv(soft_device);
|
|
|
|
|
|
- if (!batman_if)
|
|
|
- batman_if = hardif_add_interface(net_dev);
|
|
|
+ if (!batman_if && event == NETDEV_REGISTER)
|
|
|
+ batman_if = hardif_add_interface(net_dev);
|
|
|
|
|
|
if (!batman_if)
|
|
|
goto out;
|
|
|
|
|
|
switch (event) {
|
|
|
- case NETDEV_REGISTER:
|
|
|
- break;
|
|
|
case NETDEV_UP:
|
|
|
hardif_activate_interface(soft_device, bat_priv, batman_if);
|
|
|
break;
|