aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/assoc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/assoc.c')
-rw-r--r--drivers/net/wireless/libertas/assoc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index afce32761bf..4fcc6a653d9 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));