/* Clean BSSID */
bzero(&bssid, sizeof(bssid));
wl_update_prof(wl, dev, NULL, (void *)&bssid, WL_PROF_BSSID);
+ wl_update_prof(wl, dev, NULL, params->bssid, WL_PROF_PENDING_BSSID);
if (params->ssid)
WL_INFO(("SSID: %s\n", params->ssid));
/* Clean BSSID */
bzero(&bssid, sizeof(bssid));
wl_update_prof(wl, dev, NULL, (void *)&bssid, WL_PROF_BSSID);
+ wl_update_prof(wl, dev, NULL, sme->bssid, WL_PROF_PENDING_BSSID);
if (IS_P2P_SSID(sme->ssid) && (dev != wl_to_prmry_ndev(wl))) {
/* we only allow to connect using virtual interface in case of P2P */
WL_DBG(("wl_ibss_join_done succeeded\n"));
} else {
if (!wl_get_drv_status(wl, DISCONNECTING, ndev)) {
- printk("wl_bss_connect_done succeeded\n");
+ printk("wl_bss_connect_done succeeded with " MACDBG "\n",
+ MAC2STRDBG((u8*)(&e->addr)));
wl_bss_connect_done(wl, ndev, e, data, true);
WL_DBG(("joined in BSS network \"%s\"\n",
((struct wlc_ssid *)
wl_clr_drv_status(wl, DISCONNECTING, ndev);
} else if (wl_is_nonetwork(wl, e)) {
- printk("connect failed event=%d e->status 0x%x\n",
- event, (int)ntoh32(e->status));
+ printk("connect failed event=%d e->status %d e->reason %d\n",
+ event, (int)ntoh32(e->status), (int)ntoh32(e->reason));
/* Clean up any pending scan request */
if (wl->scan_request) {
if (wl->escan_on) {
u8 *curbssid = wl_read_prof(wl, ndev, WL_PROF_BSSID);
WL_DBG((" enter\n"));
+
if (wl->scan_request) {
wl_notify_escan_complete(wl, ndev, true, true);
}
+ if (is_zero_ether_addr(curbssid)) {
+ curbssid = wl_read_prof(wl, ndev, WL_PROF_PENDING_BSSID);
+ if (is_zero_ether_addr(curbssid)) {
+ WL_ERR(("Invalid BSSID\n"));
+ curbssid = NULL;
+ }
+ }
if (wl_get_drv_status(wl, CONNECTING, ndev)) {
wl_clr_drv_status(wl, CONNECTING, ndev);
if (completed) {
conn_info->req_ie_len,
conn_info->resp_ie,
conn_info->resp_ie_len,
- completed ? WLAN_STATUS_SUCCESS : e->reason,
+ completed ? WLAN_STATUS_SUCCESS :
+ (e->reason) ? ntoh32(e->reason) :
+ WLAN_STATUS_UNSPECIFIED_FAILURE,
GFP_KERNEL);
if (completed)
WL_INFO(("Report connect result - connection succeeded\n"));
case WL_PROF_BSSID:
rptr = profile->bssid;
break;
+ case WL_PROF_PENDING_BSSID:
+ rptr = profile->pending_bssid;
+ break;
case WL_PROF_SSID:
rptr = &profile->ssid;
break;
else
memset(profile->bssid, 0, ETHER_ADDR_LEN);
break;
+ case WL_PROF_PENDING_BSSID:
+ if (data)
+ memcpy(profile->pending_bssid, data, ETHER_ADDR_LEN);
+ else
+ memset(profile->pending_bssid, 0, ETHER_ADDR_LEN);
+ break;
case WL_PROF_SEC:
memcpy(&profile->sec, data, sizeof(profile->sec));
break;