aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragx <agx>2006-08-04 19:36:12 +0000
committeragx <agx>2006-08-04 19:36:12 +0000
commit7d7d60ea1472799f066d832deeef69f521075b51 (patch)
tree64b7e6a245453b1f93accfcbc4a48955077556c2
parent192da7cc167617d1c4b6de2a657a04915dc788c1 (diff)
- Fix scanning
this fixes the case where no AP to associate to is available it almost certainly breaks international roaming but we can fix this later or revert if it causes to much trouble
-rw-r--r--at76c503.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/at76c503.c b/at76c503.c
index 1ddd0c4..cd20a2b 100644
--- a/at76c503.c
+++ b/at76c503.c
@@ -2490,15 +2490,15 @@ end_join:
clear_bit(KEVENT_SCAN, &dev->kevent_flags);
LOCK_ISTATE()
assert(dev->istate == SCANNING);
+
+ /* only clear the bss list when a scan is actively initiated,
+ * otherwise simply rely on bss_list_timeout */
+ if( dev->site_survey_state == SITE_SURVEY_IN_PROGRESS)
+ free_bss_list(dev);
UNLOCK_ISTATE()
- /* empty the driver's bss list */
- free_bss_list(dev);
-
- /* jal: a hack: we have an additional scan run for
- international roaming with use_essid == 1 */
- dev->scan_runs = dev->international_roaming ? 1 : 2;
- if ((ret=start_scan(dev, dev->international_roaming ?
- 1 : 0, 0)) < 0) {
+
+ dev->scan_runs=3;
+ if ((ret=start_scan(dev, 0, 1)) < 0) {
err("%s: %s: start_scan failed with %d",
dev->netdev->name, __FUNCTION__, ret);
} else {