@@ -10799,8 +10799,7 @@ static int nl80211_crypto_settings(struct cfg80211_registered_device *rdev,
10799
10799
10800
10800
static struct cfg80211_bss *nl80211_assoc_bss(struct cfg80211_registered_device *rdev,
10801
10801
const u8 *ssid, int ssid_len,
10802
- struct nlattr **attrs,
10803
- const u8 **bssid_out)
10802
+ struct nlattr **attrs)
10804
10803
{
10805
10804
struct ieee80211_channel *chan;
10806
10805
struct cfg80211_bss *bss;
@@ -10827,7 +10826,6 @@ static struct cfg80211_bss *nl80211_assoc_bss(struct cfg80211_registered_device
10827
10826
if (!bss)
10828
10827
return ERR_PTR(-ENOENT);
10829
10828
10830
- *bssid_out = bssid;
10831
10829
return bss;
10832
10830
}
10833
10831
@@ -10837,7 +10835,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
10837
10835
struct net_device *dev = info->user_ptr[1];
10838
10836
struct cfg80211_assoc_request req = {};
10839
10837
struct nlattr **attrs = NULL;
10840
- const u8 *bssid , *ssid;
10838
+ const u8 *ap_addr , *ssid;
10841
10839
unsigned int link_id;
10842
10840
int err, ssid_len;
10843
10841
@@ -10974,6 +10972,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
10974
10972
return -EINVAL;
10975
10973
10976
10974
req.ap_mld_addr = nla_data(info->attrs[NL80211_ATTR_MLD_ADDR]);
10975
+ ap_addr = req.ap_mld_addr;
10977
10976
10978
10977
attrs = kzalloc(attrsize, GFP_KERNEL);
10979
10978
if (!attrs)
@@ -10999,8 +10998,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
10999
10998
goto free;
11000
10999
}
11001
11000
req.links[link_id].bss =
11002
- nl80211_assoc_bss(rdev, ssid, ssid_len, attrs,
11003
- &bssid);
11001
+ nl80211_assoc_bss(rdev, ssid, ssid_len, attrs);
11004
11002
if (IS_ERR(req.links[link_id].bss)) {
11005
11003
err = PTR_ERR(req.links[link_id].bss);
11006
11004
req.links[link_id].bss = NULL;
@@ -11051,10 +11049,10 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
11051
11049
if (req.link_id >= 0)
11052
11050
return -EINVAL;
11053
11051
11054
- req.bss = nl80211_assoc_bss(rdev, ssid, ssid_len, info->attrs,
11055
- &bssid);
11052
+ req.bss = nl80211_assoc_bss(rdev, ssid, ssid_len, info->attrs);
11056
11053
if (IS_ERR(req.bss))
11057
11054
return PTR_ERR(req.bss);
11055
+ ap_addr = req.bss->bssid;
11058
11056
}
11059
11057
11060
11058
err = nl80211_crypto_settings(rdev, info, &req.crypto, 1);
@@ -11067,7 +11065,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
11067
11065
dev->ieee80211_ptr->conn_owner_nlportid =
11068
11066
info->snd_portid;
11069
11067
memcpy(dev->ieee80211_ptr->disconnect_bssid,
11070
- bssid , ETH_ALEN);
11068
+ ap_addr , ETH_ALEN);
11071
11069
}
11072
11070
11073
11071
wdev_unlock(dev->ieee80211_ptr);
0 commit comments