mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +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/util.h"
|
||||
|
||||
#ifndef ENOTSUPP
|
||||
#define ENOTSUPP 524
|
||||
#endif
|
||||
|
||||
struct netdev {
|
||||
uint32_t index;
|
||||
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)
|
||||
{
|
||||
struct netdev *netdev = user_data;
|
||||
int err;
|
||||
|
||||
if (!netdev->connected)
|
||||
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);
|
||||
netdev_setting_keys_failed(netdev,
|
||||
MPDU_REASON_CODE_UNSPECIFIED);
|
||||
return;
|
||||
}
|
||||
|
||||
done:
|
||||
netdev_connect_ok(netdev);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user