3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-20 12:39:25 +01:00

netdev: Allow ERFKILL during initial bring up

If initial bring up returns ERFKILL proceed and the inteface can be
explicitly brought up by the client once rfkill is disabled.

Also fix the error number returned to netdev_set_powered callback to be
negative as expected by netdev_initial_up_cb.
This commit is contained in:
Andrew Zaborowski 2016-07-26 14:42:20 +02:00 committed by Denis Kenzior
parent 50b5234976
commit 3863f6d2bb

View File

@ -199,7 +199,7 @@ static void netdev_set_powered_result(int error, uint16_t type,
if (!cb_data)
return;
cb_data->callback(cb_data->netdev, error, cb_data->user_data);
cb_data->callback(cb_data->netdev, -error, cb_data->user_data);
}
static void netdev_set_powered_destroy(void *user_data)
@ -1263,7 +1263,8 @@ static void netdev_initial_up_cb(struct netdev *netdev, int result,
l_error("Error bringing interface %i up: %s", netdev->index,
strerror(-result));
return;
if (result != -ERFKILL)
return;
}
netdev_set_linkmode_and_operstate(netdev->index, 1,