Search Linux Wireless

[PATCH 3/3] cfg80211: slightly clean up of cfg80211_sme_connect()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wdev->ssid has already been set in cfg80211_connect() and is equal to
connect->ssid, so the assignment here doesn't hurt. Use connect->ssid
instead of wdev->ssid so it will be consistent with following ssid_len
assignment statement.

If bss is found in cfg80211_get_conn_bss(), wdev->conn->state is set
to CFG80211_CONN_AUTHENTICATE_NEXT in there. So it's not needed to set
it manually to CFG80211_CONN_AUTHENTICATE_NEXT if bss is found in that
function.

Signed-off-by: Zhao, Gang <gamerh2o@xxxxxxxxx>
---
 net/wireless/sme.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index acdcb4a8..c259aa6 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -467,7 +467,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev,
 		wdev->conn->auto_auth = false;
 	}
 
-	wdev->conn->params.ssid = wdev->ssid;
+	wdev->conn->params.ssid = connect->ssid;
 	wdev->conn->params.ssid_len = connect->ssid_len;
 
 	/* see if we have the bss already */
@@ -480,7 +480,6 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev,
 
 	/* we're good if we have a matching bss struct */
 	if (bss) {
-		wdev->conn->state = CFG80211_CONN_AUTHENTICATE_NEXT;
 		err = cfg80211_conn_do_work(wdev);
 		cfg80211_put_bss(wdev->wiphy, bss);
 	} else {
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux