diff options
author | Dan Williams <dcbw@redhat.com> | 2007-05-25 22:30:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:43 -0400 |
commit | aeea0ab45ae3d761064ca926863bb41f0ad167ce (patch) | |
tree | 014af0acbc6920cb0cea7e3cb9377365f8ade54e /drivers/net/wireless/libertas/assoc.c | |
parent | ac26f81ccecc23ad5d8c20ebe1dd482fa395298b (diff) | |
download | talos-op-linux-aeea0ab45ae3d761064ca926863bb41f0ad167ce.tar.gz talos-op-linux-aeea0ab45ae3d761064ca926863bb41f0ad167ce.zip |
[PATCH] libertas: honor specific channel requests during association
Previously if a fixed channel was specified along with an SSID,
the channel request would be ignored during the association
process. Instead, when searching for an adhoc or infrastructure
network to join, allow filtering results based on channel so
that the driver doesn't pick a BSS on a different channel than
requested.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/assoc.c')
-rw-r--r-- | drivers/net/wireless/libertas/assoc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c index afce32761bfd..4fcc6a653d99 100644 --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c @@ -70,6 +70,7 @@ 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); @@ -77,6 +78,9 @@ static int assoc_helper_essid(wlan_private *priv, * 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) { @@ -84,7 +88,7 @@ static int assoc_helper_essid(wlan_private *priv, } 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)); @@ -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)); |