Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57667
b: refs/heads/master
c: aeea0ab
h: refs/heads/master
i:
  57665: 05db0de
  57663: c8974f3
v: v3
  • Loading branch information
Dan Williams authored and John W. Linville committed Jun 11, 2007
1 parent d2c60f7 commit 3d3e726
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 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: ac26f81ccecc23ad5d8c20ebe1dd482fa395298b
refs/heads/master: aeea0ab45ae3d761064ca926863bb41f0ad167ce
8 changes: 6 additions & 2 deletions trunk/drivers/net/wireless/libertas/assoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,25 @@ static int assoc_helper_essid(wlan_private *priv,
wlan_adapter *adapter = priv->adapter;
int ret = 0;
struct bss_descriptor * bss;
int channel = -1;

lbs_deb_enter(LBS_DEB_ASSOC);

/* FIXME: take channel into account when picking SSIDs if a channel
* is set.
*/

if (test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags))
channel = assoc_req->channel;

lbs_deb_assoc("New SSID requested: %s\n", assoc_req->ssid.ssid);
if (assoc_req->mode == IW_MODE_INFRA) {
if (adapter->prescan) {
libertas_send_specific_SSID_scan(priv, &assoc_req->ssid, 0);
}

bss = libertas_find_SSID_in_list(adapter, &assoc_req->ssid,
NULL, IW_MODE_INFRA);
NULL, IW_MODE_INFRA, channel);
if (bss != NULL) {
lbs_deb_assoc("SSID found in scan list, associating\n");
memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor));
Expand All @@ -101,7 +105,7 @@ static int assoc_helper_essid(wlan_private *priv,

/* Search for the requested SSID in the scan table */
bss = libertas_find_SSID_in_list(adapter, &assoc_req->ssid, NULL,
IW_MODE_ADHOC);
IW_MODE_ADHOC, channel);
if (bss != NULL) {
lbs_deb_assoc("SSID found joining\n");
memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor));
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/net/wireless/libertas/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,8 @@ struct bss_descriptor * libertas_find_BSSID_in_list(wlan_adapter * adapter,
* @return index in BSSID list
*/
struct bss_descriptor * libertas_find_SSID_in_list(wlan_adapter * adapter,
struct WLAN_802_11_SSID *ssid, u8 * bssid, u8 mode)
struct WLAN_802_11_SSID *ssid, u8 * bssid, u8 mode,
int channel)
{
u8 bestrssi = 0;
struct bss_descriptor * iter_bss = NULL;
Expand All @@ -1286,6 +1287,8 @@ struct bss_descriptor * libertas_find_SSID_in_list(wlan_adapter * adapter,
continue; /* ssid doesn't match */
if (bssid && compare_ether_addr(iter_bss->bssid, bssid) != 0)
continue; /* bssid doesn't match */
if ((channel > 0) && (iter_bss->channel != channel))
continue; /* channel doesn't match */

switch (mode) {
case IW_MODE_INFRA:
Expand Down Expand Up @@ -1661,7 +1664,7 @@ int libertas_get_scan(struct net_device *dev, struct iw_request_info *info,
wlan_scan_networks(priv, NULL, 0);

/* Update RSSI if current BSS is a locally created ad-hoc BSS */
if ((adapter->inframode == wlan802_11ibss) && adapter->adhoccreate) {
if ((adapter->mode == IW_MODE_ADHOC) && adapter->adhoccreate) {
libertas_prepare_and_send_command(priv, cmd_802_11_rssi, 0,
cmd_option_waitforrsp, 0, NULL);
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/libertas/scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ extern int libertas_SSID_cmp(struct WLAN_802_11_SSID *ssid1,
struct WLAN_802_11_SSID *ssid2);

struct bss_descriptor * libertas_find_SSID_in_list(wlan_adapter * adapter,
struct WLAN_802_11_SSID *ssid, u8 * bssid, u8 mode);
struct WLAN_802_11_SSID *ssid, u8 * bssid, u8 mode,
int channel);

struct bss_descriptor * libertas_find_best_SSID_in_list(wlan_adapter * adapter,
u8 mode);
Expand Down

0 comments on commit 3d3e726

Please sign in to comment.