3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-29 22:19:23 +01:00

netdev: Allow both -EOPNOTSUPP and -ENOTSUPP

It seems that the kernel uses -EOPNOTSUPP if the change_station
operation is not implemented by the driver.  However, some drivers do
implement change_station and choose to report -ENOTSUPP instead of
-EOPNOTSUPP.

To add to the confusion, EOPNOTSUPP and -ENOTSUPP are the same on some
systems (e.g. Gentoo).  Be paranoid and allow both errors to be ignored
when sending CMD_SET_STATION.

Fixes: 0238ffb8d9 ("netdev: Use -EOPNOTSUPP instead of -ENOTSUPP")
This commit is contained in:
Denis Kenzior 2019-12-17 16:10:46 -06:00
parent 1f84c3b19a
commit 3607ee0c7e

View File

@ -1082,7 +1082,7 @@ static void netdev_set_station_cb(struct l_genl_msg *msg, void *user_data)
return; return;
err = l_genl_msg_get_error(msg); err = l_genl_msg_get_error(msg);
if (err == -EOPNOTSUPP) if (err == -EOPNOTSUPP || err == -ENOTSUPP)
goto done; goto done;
if (err < 0) { if (err < 0) {