aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 723512b48f2e..44c520c264fc 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -71,6 +71,7 @@ static struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] __read_mostly = {
71 [NL80211_ATTR_IFNAME] = { .type = NLA_NUL_STRING, .len = IFNAMSIZ-1 }, 71 [NL80211_ATTR_IFNAME] = { .type = NLA_NUL_STRING, .len = IFNAMSIZ-1 },
72 72
73 [NL80211_ATTR_MAC] = { .type = NLA_BINARY, .len = ETH_ALEN }, 73 [NL80211_ATTR_MAC] = { .type = NLA_BINARY, .len = ETH_ALEN },
74 [NL80211_ATTR_PREV_BSSID] = { .type = NLA_BINARY, .len = ETH_ALEN },
74 75
75 [NL80211_ATTR_KEY_DATA] = { .type = NLA_BINARY, 76 [NL80211_ATTR_KEY_DATA] = { .type = NLA_BINARY,
76 .len = WLAN_MAX_KEY_LEN }, 77 .len = WLAN_MAX_KEY_LEN },
@@ -3187,7 +3188,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
3187 struct net_device *dev; 3188 struct net_device *dev;
3188 struct cfg80211_crypto_settings crypto; 3189 struct cfg80211_crypto_settings crypto;
3189 struct ieee80211_channel *chan; 3190 struct ieee80211_channel *chan;
3190 const u8 *bssid, *ssid, *ie = NULL; 3191 const u8 *bssid, *ssid, *ie = NULL, *prev_bssid = NULL;
3191 int err, ssid_len, ie_len = 0; 3192 int err, ssid_len, ie_len = 0;
3192 bool use_mfp = false; 3193 bool use_mfp = false;
3193 3194
@@ -3248,10 +3249,13 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
3248 } 3249 }
3249 } 3250 }
3250 3251
3252 if (info->attrs[NL80211_ATTR_PREV_BSSID])
3253 prev_bssid = nla_data(info->attrs[NL80211_ATTR_PREV_BSSID]);
3254
3251 err = nl80211_crypto_settings(info, &crypto, 1); 3255 err = nl80211_crypto_settings(info, &crypto, 1);
3252 if (!err) 3256 if (!err)
3253 err = cfg80211_mlme_assoc(rdev, dev, chan, bssid, ssid, 3257 err = cfg80211_mlme_assoc(rdev, dev, chan, bssid, prev_bssid,
3254 ssid_len, ie, ie_len, use_mfp, 3258 ssid, ssid_len, ie, ie_len, use_mfp,
3255 &crypto); 3259 &crypto);
3256 3260
3257out: 3261out: