Silence SIOCSIWAUTH ioctl failure message.
These are expected in most cases and there is no need to confuse users with the messages in stderr (perror was used here). These are now only shown in debug output and EOPNOTSUPP errors are silently ignored.
This commit is contained in:
parent
dc366e8e85
commit
6076f6ce08
1 changed files with 5 additions and 3 deletions
|
@ -251,9 +251,11 @@ static int wpa_driver_wext_set_auth_param(struct wpa_driver_wext_data *drv,
|
||||||
iwr.u.param.value = value;
|
iwr.u.param.value = value;
|
||||||
|
|
||||||
if (ioctl(drv->ioctl_sock, SIOCSIWAUTH, &iwr) < 0) {
|
if (ioctl(drv->ioctl_sock, SIOCSIWAUTH, &iwr) < 0) {
|
||||||
perror("ioctl[SIOCSIWAUTH]");
|
if (errno != EOPNOTSUPP) {
|
||||||
fprintf(stderr, "WEXT auth param %d value 0x%x - ",
|
wpa_printf(MSG_DEBUG, "WEXT: SIOCSIWAUTH(param %d "
|
||||||
idx, value);
|
"value 0x%x) failed: %s)",
|
||||||
|
idx, value, strerror(errno));
|
||||||
|
}
|
||||||
ret = errno == EOPNOTSUPP ? -2 : -1;
|
ret = errno == EOPNOTSUPP ? -2 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue