aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-03-24 10:33:40 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-24 20:35:10 (GMT)
commit00c3c4ac9b00937d4878b75df5da437f1c794a70 (patch)
tree075e83606a45fcb1dfd096b9da2644d4870c9136
parentcbc3d6fe6548ce6add8f86174babbfcbd980d961 (diff)
downloadhostap-00c3c4ac9b00937d4878b75df5da437f1c794a70.zip
hostap-00c3c4ac9b00937d4878b75df5da437f1c794a70.tar.gz
hostap-00c3c4ac9b00937d4878b75df5da437f1c794a70.tar.bz2
nl80211: Add NL80211_ATTR_PREV_BSSID with Connect command
This makes it easier for drivers that use the Connect command instead of separate Auth+Assoc commands to determine when to use reassociation instead of association. Matching changes are still needed in cfg80211 to allow this parameter to be used, but it is safe for wpa_supplicant to start including this attribute now since it will be ignored by older cfg80211 versions. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--src/drivers/driver_nl80211.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 8bd2c24..baa418b 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4841,6 +4841,14 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
return -1;
}
+ if (params->prev_bssid) {
+ wpa_printf(MSG_DEBUG, " * prev_bssid=" MACSTR,
+ MAC2STR(params->prev_bssid));
+ if (nla_put(msg, NL80211_ATTR_PREV_BSSID, ETH_ALEN,
+ params->prev_bssid))
+ return -1;
+ }
+
return 0;
}
@@ -4993,14 +5001,6 @@ static int wpa_driver_nl80211_associate(
if (ret)
goto fail;
- if (params->prev_bssid) {
- wpa_printf(MSG_DEBUG, " * prev_bssid=" MACSTR,
- MAC2STR(params->prev_bssid));
- if (nla_put(msg, NL80211_ATTR_PREV_BSSID, ETH_ALEN,
- params->prev_bssid))
- goto fail;
- }
-
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
msg = NULL;
if (ret) {