Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66489
b: refs/heads/master
c: 0edef21
h: refs/heads/master
i:
  66487: d6d88cb
v: v3
  • Loading branch information
Dan Williams authored and David S. Miller committed Oct 10, 2007
1 parent e1a9670 commit 8e127e5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9556d2120ceecc158b324fa01e30704ff9f42ae3
refs/heads/master: 0edef215e405fef3c6569511a9aebeeb3f6cd799
24 changes: 18 additions & 6 deletions trunk/drivers/net/wireless/libertas/join.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,26 @@ int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * asso
bss->ssid_len);

/* check if the requested SSID is already joined */
if (adapter->curbssparams.ssid_len
if ( adapter->curbssparams.ssid_len
&& !libertas_ssid_cmp(adapter->curbssparams.ssid,
adapter->curbssparams.ssid_len,
bss->ssid, bss->ssid_len)
&& (adapter->mode == IW_MODE_ADHOC)) {
lbs_deb_join(
"ADHOC_J_CMD: New ad-hoc SSID is the same as current, "
"not attempting to re-join");
return -1;
&& (adapter->mode == IW_MODE_ADHOC)
&& (adapter->connect_status == LIBERTAS_CONNECTED)) {
union iwreq_data wrqu;

lbs_deb_join("ADHOC_J_CMD: New ad-hoc SSID is the same as "
"current, not attempting to re-join");

/* Send the re-association event though, because the association
* request really was successful, even if just a null-op.
*/
memset(&wrqu, 0, sizeof(wrqu));
memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid,
ETH_ALEN);
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
goto out;
}

/* Use shortpreamble only when both creator and card supports
Expand All @@ -242,6 +253,7 @@ int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * asso
0, CMD_OPTION_WAITFORRSP,
OID_802_11_SSID, assoc_req);

out:
return ret;
}

Expand Down

0 comments on commit 8e127e5

Please sign in to comment.