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
1 changed files with 1 additions and 1 deletions

View File

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