Commit 9cb08ff3 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: cfg80211_rtw_connect(): Simplify ssid preparation

Since we just matched sme->{ssid,ssid_len} to
pnetwork->network.Ssid.{ssid,ssid_len} we can simplify the copy and
move it to just before the call to rtw_set_ssid().
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9ab98d42
......@@ -2188,10 +2188,6 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
sme->bssid)) {
DBG_8723A("matched by bssid\n");
memcpy(ssid.ssid, pnetwork->network.Ssid.ssid,
pnetwork->network.Ssid.ssid_len);
ssid.ssid_len = pnetwork->network.Ssid.ssid_len;
matched = true;
break;
}
......@@ -2201,9 +2197,6 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
pnetwork->network.Ssid.ssid_len == sme->ssid_len) {
DBG_8723A("matched by ssid\n");
memcpy(ssid.ssid, sme->ssid, sme->ssid_len);
ssid.ssid_len = sme->ssid_len;
matched = true;
break;
}
......@@ -2322,6 +2315,10 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
/* rtw_set_802_11_encryption_mode(padapter,
padapter->securitypriv.ndisencryptstatus); */
memcpy(ssid.ssid, pnetwork->network.Ssid.ssid,
pnetwork->network.Ssid.ssid_len);
ssid.ssid_len = pnetwork->network.Ssid.ssid_len;
if (rtw_set_ssid(padapter, &ssid) != _SUCCESS) {
ret = -EBUSY;
goto exit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment