netifd: fix disabling radio via config if reconf is being used
authorPrasun Maiti <prasunmaiti87@gmail.com>
Thu, 17 Aug 2023 12:17:18 +0000 (17:47 +0530)
committerFelix Fietkau <nbd@nbd.name>
Thu, 17 Aug 2023 15:09:19 +0000 (17:09 +0200)
Do not bypass down/up reconfig codepath if the radio is being disabled,
otherwise it will be left running.

Signed-off-by: Prasun Maiti <prasunmaiti87@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [fix commit description]
wireless.c

index 873c4370ad1b984ad74255df0d2cbae91d5a6d82..898a01220011e41932180c8b0a4e79de50aa2002 100644 (file)
@@ -681,7 +681,7 @@ wdev_set_config_state(struct wireless_device *wdev, enum interface_config_state
                return;
 
        wdev->config_update = false;
-       if (s == IFC_RELOAD && wdev->reconf && wdev->state == IFS_UP) {
+       if (!wdev->disabled && s == IFC_RELOAD && wdev->reconf && wdev->state == IFS_UP) {
                wireless_device_reconf(wdev);
                return;
        }