developer | 559cadd | 2023-08-30 13:23:21 +0800 | [diff] [blame] | 1 | From 4711f74479e213ef86f8792b408b117d40148eb2 Mon Sep 17 00:00:00 2001 |
| 2 | From: Prasun Maiti <prasunmaiti87@gmail.com> |
| 3 | Date: Thu, 17 Aug 2023 17:47:18 +0530 |
| 4 | Subject: [PATCH] netifd: fix disabling radio via config if reconf is being |
| 5 | used |
| 6 | |
| 7 | Do not bypass down/up reconfig codepath if the radio is being disabled, |
| 8 | otherwise it will be left running. |
| 9 | |
| 10 | Signed-off-by: Prasun Maiti <prasunmaiti87@gmail.com> |
| 11 | Signed-off-by: Felix Fietkau <nbd@nbd.name> [fix commit description] |
| 12 | --- |
| 13 | wireless.c | 2 +- |
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 15 | |
| 16 | diff --git a/wireless.c b/wireless.c |
| 17 | index 873c437..898a012 100644 |
| 18 | --- a/wireless.c |
| 19 | +++ b/wireless.c |
| 20 | @@ -681,7 +681,7 @@ wdev_set_config_state(struct wireless_device *wdev, enum interface_config_state |
| 21 | return; |
| 22 | |
| 23 | wdev->config_update = false; |
| 24 | - if (s == IFC_RELOAD && wdev->reconf && wdev->state == IFS_UP) { |
| 25 | + if (!wdev->disabled && s == IFC_RELOAD && wdev->reconf && wdev->state == IFS_UP) { |
| 26 | wireless_device_reconf(wdev); |
| 27 | return; |
| 28 | } |