Message ID | ab90c7d3201a2a7dac6deb52e15a1d67b7049f96.1395240451.git.gamerh2o@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Wed, 2014-03-19 at 23:02 +0800, Zhao, Gang wrote: > Wdev->ssid_len has already been set in cfg80211_connect() and is equal > to connect->ssid_len. Use wdev->ssid_len instead of connect->ssid_len > so it will be consistent with previous ssid 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. Applied. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index acdcb4a8..998674f 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -468,7 +468,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev, } wdev->conn->params.ssid = wdev->ssid; - wdev->conn->params.ssid_len = connect->ssid_len; + wdev->conn->params.ssid_len = wdev->ssid_len; /* see if we have the bss already */ bss = cfg80211_get_conn_bss(wdev); @@ -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 {
Wdev->ssid_len has already been set in cfg80211_connect() and is equal to connect->ssid_len. Use wdev->ssid_len instead of connect->ssid_len so it will be consistent with previous ssid 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@gmail.com> --- v2: change the assignment of ssid_len, instead of ssid before. net/wireless/sme.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)