]> git.karo-electronics.de Git - linux-beck.git/commitdiff
batman-adv: Update wifi flags on upper link change
authorSven Eckelmann <sven.eckelmann@open-mesh.com>
Fri, 30 Sep 2016 13:21:06 +0000 (15:21 +0200)
committerSimon Wunderlich <sw@simonwunderlich.de>
Tue, 8 Nov 2016 18:02:38 +0000 (19:02 +0100)
Things like VLANs don't have their link set when they are created. Thus
the wifi flags have to be evaluated later to fix their contents for the
link interface.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/hard-interface.c

index ca743a5e56808c552dd696b7d51df79903eb341d..61a431a9772ba96418644b399c9e787cbfd0e743 100644 (file)
@@ -1006,6 +1006,11 @@ static int batadv_hard_if_event(struct notifier_block *this,
                if (hard_iface == primary_if)
                        batadv_primary_if_update_addr(bat_priv, NULL);
                break;
+       case NETDEV_CHANGEUPPER:
+               hard_iface->wifi_flags = batadv_wifi_flags_evaluate(net_dev);
+               if (batadv_is_wifi_hardif(hard_iface))
+                       hard_iface->num_bcasts = BATADV_NUM_BCASTS_WIRELESS;
+               break;
        default:
                break;
        }