mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 06:02:37 +01:00
wiphy: Use network_get_security()
This commit is contained in:
parent
b166285f44
commit
0c7504b5fb
@ -782,6 +782,7 @@ static struct l_dbus_message *device_disconnect(struct l_dbus *dbus,
|
|||||||
struct netdev *netdev = user_data;
|
struct netdev *netdev = user_data;
|
||||||
struct l_genl_msg *msg;
|
struct l_genl_msg *msg;
|
||||||
uint16_t reason_code = MPDU_REASON_CODE_DEAUTH_LEAVING;
|
uint16_t reason_code = MPDU_REASON_CODE_DEAUTH_LEAVING;
|
||||||
|
enum security security;
|
||||||
|
|
||||||
l_debug("");
|
l_debug("");
|
||||||
|
|
||||||
@ -792,8 +793,8 @@ static struct l_dbus_message *device_disconnect(struct l_dbus *dbus,
|
|||||||
if (!netdev->connected_bss)
|
if (!netdev->connected_bss)
|
||||||
return dbus_error_not_connected(message);
|
return dbus_error_not_connected(message);
|
||||||
|
|
||||||
if (netdev->connected_network->security == SECURITY_PSK ||
|
security = network_get_security(netdev->connected_network);
|
||||||
netdev->connected_network->security == SECURITY_8021X)
|
if (security == SECURITY_PSK || security == SECURITY_8021X)
|
||||||
eapol_cancel(netdev->index);
|
eapol_cancel(netdev->index);
|
||||||
|
|
||||||
msg = l_genl_msg_new_sized(NL80211_CMD_DEAUTHENTICATE, 512);
|
msg = l_genl_msg_new_sized(NL80211_CMD_DEAUTHENTICATE, 512);
|
||||||
@ -917,7 +918,7 @@ static bool netdev_try_autoconnect(struct netdev *netdev,
|
|||||||
{
|
{
|
||||||
struct wiphy *wiphy = netdev->wiphy;
|
struct wiphy *wiphy = netdev->wiphy;
|
||||||
|
|
||||||
switch (network->security) {
|
switch (network_get_security(network)) {
|
||||||
case SECURITY_NONE:
|
case SECURITY_NONE:
|
||||||
break;
|
break;
|
||||||
case SECURITY_PSK:
|
case SECURITY_PSK:
|
||||||
|
Loading…
Reference in New Issue
Block a user