Skip to content

Commit

Permalink
cfg80211: slightly clean up of cfg80211_sme_connect()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
zhao-gang authored and jmberg-intel committed Apr 9, 2014
1 parent 0c2bef4 commit babd3a2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/wireless/sme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 {
Expand Down

0 comments on commit babd3a2

Please sign in to comment.