3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 04:32:37 +01:00

wiphy: Use network_get_ssid

This commit is contained in:
Denis Kenzior 2016-05-11 22:01:44 -05:00
parent 9e4200f2f3
commit 0847e31542

View File

@ -310,6 +310,7 @@ static struct scan_bss *network_select_bss(struct wiphy *wiphy,
static int mlme_authenticate_cmd(struct network *network, struct scan_bss *bss) static int mlme_authenticate_cmd(struct network *network, struct scan_bss *bss)
{ {
struct netdev *netdev = network->netdev; struct netdev *netdev = network->netdev;
const char *ssid = network_get_ssid(network);
uint32_t auth_type = NL80211_AUTHTYPE_OPEN_SYSTEM; uint32_t auth_type = NL80211_AUTHTYPE_OPEN_SYSTEM;
struct l_genl_msg *msg; struct l_genl_msg *msg;
@ -317,8 +318,7 @@ static int mlme_authenticate_cmd(struct network *network, struct scan_bss *bss)
msg_append_attr(msg, NL80211_ATTR_IFINDEX, 4, &netdev->index); msg_append_attr(msg, NL80211_ATTR_IFINDEX, 4, &netdev->index);
msg_append_attr(msg, NL80211_ATTR_WIPHY_FREQ, 4, &bss->frequency); msg_append_attr(msg, NL80211_ATTR_WIPHY_FREQ, 4, &bss->frequency);
msg_append_attr(msg, NL80211_ATTR_MAC, ETH_ALEN, bss->addr); msg_append_attr(msg, NL80211_ATTR_MAC, ETH_ALEN, bss->addr);
msg_append_attr(msg, NL80211_ATTR_SSID, strlen(network->ssid), msg_append_attr(msg, NL80211_ATTR_SSID, strlen(ssid), ssid);
network->ssid);
msg_append_attr(msg, NL80211_ATTR_AUTH_TYPE, 4, &auth_type); msg_append_attr(msg, NL80211_ATTR_AUTH_TYPE, 4, &auth_type);
l_genl_family_send(nl80211, msg, genl_connect_cb, netdev, NULL); l_genl_family_send(nl80211, msg, genl_connect_cb, netdev, NULL);