return -EOPNOTSUPP;
}
+ set_bit(WL_STATUS_CONNECTING, &wl->status);
+
if (params->bssid)
WL_CONN("BSSID: %02X %02X %02X %02X %02X %02X\n",
params->bssid[0], params->bssid[1], params->bssid[2],
goto done;
}
- set_bit(WL_STATUS_CONNECTING, &wl->status);
-
done:
+ if (err)
+ clear_bit(WL_STATUS_CONNECTING, &wl->status);
WL_TRACE("Exit\n");
return err;
}
return -EOPNOTSUPP;
}
+ set_bit(WL_STATUS_CONNECTING, &wl->status);
+
if (chan) {
wl->channel =
ieee80211_frequency_to_channel(chan->center_freq);
WL_INFO("ie (%p), ie_len (%zd)\n", sme->ie, sme->ie_len);
err = wl_set_wpa_version(dev, sme);
- if (unlikely(err))
- return err;
+ if (err) {
+ WL_ERR("wl_set_wpa_version failed (%d)\n", err);
+ goto done;
+ }
err = wl_set_auth_type(dev, sme);
- if (unlikely(err))
- return err;
+ if (err) {
+ WL_ERR("wl_set_auth_type failed (%d)\n", err);
+ goto done;
+ }
err = wl_set_set_cipher(dev, sme);
- if (unlikely(err))
- return err;
+ if (err) {
+ WL_ERR("wl_set_set_cipher failed (%d)\n", err);
+ goto done;
+ }
err = wl_set_key_mgmt(dev, sme);
- if (unlikely(err))
- return err;
+ if (err) {
+ WL_ERR("wl_set_key_mgmt failed (%d)\n", err);
+ goto done;
+ }
err = wl_set_set_sharedkey(dev, sme);
- if (unlikely(err))
- return err;
+ if (err) {
+ WL_ERR("wl_set_set_sharedkey failed (%d)\n", err);
+ goto done;
+ }
wl_update_prof(wl, NULL, sme->bssid, WL_PROF_BSSID);
/*
wl_ch_to_chanspec(wl->channel, &join_params, &join_params_size);
err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size);
- if (unlikely(err)) {
- WL_ERR("error (%d)\n", err);
- return err;
- }
- set_bit(WL_STATUS_CONNECTING, &wl->status);
+ if (err)
+ WL_ERR("WLC_SET_SSID failed (%d)\n", err);
+done:
+ if (err)
+ clear_bit(WL_STATUS_CONNECTING, &wl->status);
WL_TRACE("Exit\n");
return err;
}