wireless: fix applying wireless devices attributes on hotplug events
authorAndre Heider <a.heider@gmail.com>
Tue, 28 Sep 2021 11:29:27 +0000 (13:29 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 28 Sep 2021 12:10:18 +0000 (14:10 +0200)
Hotplug events pass their own 'ifname' copy, so we need to compare the
strings, not just the pointers.
Additionally, the check condition was accidentally inverted

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
wireless.c

index fbd42ed3faaa02b9567188e18dd28bdbff2464af..4b1fb8e7a2a4f109c576b5b7f990b286f7fe88ce 100644 (file)
@@ -328,7 +328,7 @@ static void wireless_interface_handle_link(struct wireless_interface *vif, const
        if (!ifname)
                ifname = vif->ifname;
 
-       if (up && ifname != vif->ifname) {
+       if (up && !strcmp(ifname, vif->ifname)) {
                struct device *dev = device_get(ifname, 2);
                if (dev) {
                        dev->wireless_isolate = vif->isolate;