diff --git a/src/netdev.c b/src/netdev.c index c14509e9..2edf86a3 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -2745,16 +2745,16 @@ static struct l_genl_msg *netdev_build_cmd_connect(struct netdev *netdev, l_genl_msg_append_attr(msg, NL80211_ATTR_CONTROL_PORT, 0, NULL); - if (netdev->pae_over_nl80211) - l_genl_msg_append_attr(msg, - NL80211_ATTR_CONTROL_PORT_OVER_NL80211, - 0, NULL); - iov[iov_elems].iov_base = (void *) hs->supplicant_ie; iov[iov_elems].iov_len = hs->supplicant_ie[1] + 2; iov_elems += 1; } + if (netdev->pae_over_nl80211) + l_genl_msg_append_attr(msg, + NL80211_ATTR_CONTROL_PORT_OVER_NL80211, + 0, NULL); + if (hs->mde) { iov[iov_elems].iov_base = (void *) hs->mde; iov[iov_elems].iov_len = hs->mde[1] + 2;