mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
netdev: Ignore CMD_SET_STATION errors
Certain WiFi drivers do not support using CMD_SET_STATION (e.g. mwifiex). It is not completely clear how such drivers handle the AUTHORIZED state, but they don't seem to take it into account. So for such drivers, ignore the -ENOTSUPP error return from CMD_SET_STATION.
This commit is contained in:
parent
55ecda31f3
commit
f5decb274d
12
src/netdev.c
12
src/netdev.c
@ -52,6 +52,10 @@
|
|||||||
#include "src/ftutil.h"
|
#include "src/ftutil.h"
|
||||||
#include "src/util.h"
|
#include "src/util.h"
|
||||||
|
|
||||||
|
#ifndef ENOTSUPP
|
||||||
|
#define ENOTSUPP 524
|
||||||
|
#endif
|
||||||
|
|
||||||
struct netdev {
|
struct netdev {
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
char name[IFNAMSIZ];
|
char name[IFNAMSIZ];
|
||||||
@ -766,17 +770,23 @@ static void netdev_setting_keys_failed(struct netdev *netdev,
|
|||||||
static void netdev_set_station_cb(struct l_genl_msg *msg, void *user_data)
|
static void netdev_set_station_cb(struct l_genl_msg *msg, void *user_data)
|
||||||
{
|
{
|
||||||
struct netdev *netdev = user_data;
|
struct netdev *netdev = user_data;
|
||||||
|
int err;
|
||||||
|
|
||||||
if (!netdev->connected)
|
if (!netdev->connected)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (l_genl_msg_get_error(msg) < 0) {
|
err = l_genl_msg_get_error(msg);
|
||||||
|
if (err == -ENOTSUPP)
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
if (err < 0) {
|
||||||
l_error("Set Station failed for ifindex %d", netdev->index);
|
l_error("Set Station failed for ifindex %d", netdev->index);
|
||||||
netdev_setting_keys_failed(netdev,
|
netdev_setting_keys_failed(netdev,
|
||||||
MPDU_REASON_CODE_UNSPECIFIED);
|
MPDU_REASON_CODE_UNSPECIFIED);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done:
|
||||||
netdev_connect_ok(netdev);
|
netdev_connect_ok(netdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user