Commit 579c83f5 authored by Sukesh Srikakula's avatar Sukesh Srikakula Committed by Greg Kroah-Hartman

staging: brcm80211: brcmfmac: CONNECTING status bit is set at appropriate location

'WL_STATUS_CONNECTING' status bit is  set at appropriate step in bss/ibss
connect requests.
Signed-off-by: default avatarSukesh Srikakula <sukeshs@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 35491d32
...@@ -975,6 +975,8 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, ...@@ -975,6 +975,8 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
set_bit(WL_STATUS_CONNECTING, &wl->status);
if (params->bssid) if (params->bssid)
WL_CONN("BSSID: %02X %02X %02X %02X %02X %02X\n", WL_CONN("BSSID: %02X %02X %02X %02X %02X %02X\n",
params->bssid[0], params->bssid[1], params->bssid[2], params->bssid[0], params->bssid[1], params->bssid[2],
...@@ -1088,9 +1090,9 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, ...@@ -1088,9 +1090,9 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
goto done; goto done;
} }
set_bit(WL_STATUS_CONNECTING, &wl->status);
done: done:
if (err)
clear_bit(WL_STATUS_CONNECTING, &wl->status);
WL_TRACE("Exit\n"); WL_TRACE("Exit\n");
return err; return err;
} }
...@@ -1380,6 +1382,8 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -1380,6 +1382,8 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
set_bit(WL_STATUS_CONNECTING, &wl->status);
if (chan) { if (chan) {
wl->channel = wl->channel =
ieee80211_frequency_to_channel(chan->center_freq); ieee80211_frequency_to_channel(chan->center_freq);
...@@ -1391,24 +1395,34 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -1391,24 +1395,34 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
WL_INFO("ie (%p), ie_len (%zd)\n", sme->ie, sme->ie_len); WL_INFO("ie (%p), ie_len (%zd)\n", sme->ie, sme->ie_len);
err = wl_set_wpa_version(dev, sme); err = wl_set_wpa_version(dev, sme);
if (unlikely(err)) if (err) {
return err; WL_ERR("wl_set_wpa_version failed (%d)\n", err);
goto done;
}
err = wl_set_auth_type(dev, sme); err = wl_set_auth_type(dev, sme);
if (unlikely(err)) if (err) {
return err; WL_ERR("wl_set_auth_type failed (%d)\n", err);
goto done;
}
err = wl_set_set_cipher(dev, sme); err = wl_set_set_cipher(dev, sme);
if (unlikely(err)) if (err) {
return err; WL_ERR("wl_set_set_cipher failed (%d)\n", err);
goto done;
}
err = wl_set_key_mgmt(dev, sme); err = wl_set_key_mgmt(dev, sme);
if (unlikely(err)) if (err) {
return err; WL_ERR("wl_set_key_mgmt failed (%d)\n", err);
goto done;
}
err = wl_set_set_sharedkey(dev, sme); err = wl_set_set_sharedkey(dev, sme);
if (unlikely(err)) if (err) {
return err; WL_ERR("wl_set_set_sharedkey failed (%d)\n", err);
goto done;
}
wl_update_prof(wl, NULL, sme->bssid, WL_PROF_BSSID); wl_update_prof(wl, NULL, sme->bssid, WL_PROF_BSSID);
/* /*
...@@ -1435,12 +1449,12 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -1435,12 +1449,12 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
wl_ch_to_chanspec(wl->channel, &join_params, &join_params_size); wl_ch_to_chanspec(wl->channel, &join_params, &join_params_size);
err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size); err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size);
if (unlikely(err)) { if (err)
WL_ERR("error (%d)\n", err); WL_ERR("WLC_SET_SSID failed (%d)\n", err);
return err;
}
set_bit(WL_STATUS_CONNECTING, &wl->status);
done:
if (err)
clear_bit(WL_STATUS_CONNECTING, &wl->status);
WL_TRACE("Exit\n"); WL_TRACE("Exit\n");
return err; return err;
} }
......
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