From: Helmut Schaa <hschaa@suse.de>
To: linux-wireless@vger.kernel.org
Subject: [RFC] wpa_supplicant: trigger a scan if signal quality is low
Date: Mon, 15 Sep 2008 14:41:50 +0200 [thread overview]
Message-ID: <200809151441.50699.hschaa@suse.de> (raw)
In-Reply-To: <200809151416.07552.hschaa@suse.de>
Here is the appropriate wpa_supplicant patch for reference.
It simply triggers a new scan once a "low signal notification" was received.
diff -ur wpa_supplicant-0.6.4/src/common/wireless_copy.h wpa_supplicant-0.6.4_2//src/common/wireless_copy.h
--- wpa_supplicant-0.6.4/src/common/wireless_copy.h 2008-08-10 19:33:12.000000000 +0200
+++ wpa_supplicant-0.6.4_2//src/common/wireless_copy.h 2008-09-15 11:38:14.000000000 +0200
@@ -396,6 +396,8 @@
* pre-authentication
* (struct iw_pmkid_cand) */
+#define IWEVROAM 0x8C0A /* roaming threshold exceeded */
+
#define IWEVFIRST 0x8C00
#define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST)
diff -ur wpa_supplicant-0.6.4/src/drivers/driver.h wpa_supplicant-0.6.4_2//src/drivers/driver.h
--- wpa_supplicant-0.6.4/src/drivers/driver.h 2008-08-10 19:33:12.000000000 +0200
+++ wpa_supplicant-0.6.4_2//src/drivers/driver.h 2008-09-15 11:30:50.000000000 +0200
@@ -1052,7 +1052,13 @@
* FT authentication sequence from the AP. The FT IEs are included in
* the extra information in union wpa_event_data::ft_ies.
*/
- EVENT_FT_RESPONSE
+ EVENT_FT_RESPONSE,
+
+ /**
+ * EVENT_ROAMING_THRESHOLD - Roaming threshold exceeded
+ */
+ EVENT_ROAMING_THRESHOLD
+
} wpa_event_type;
diff -ur wpa_supplicant-0.6.4/src/drivers/driver_wext.c wpa_supplicant-0.6.4_2//src/drivers/driver_wext.c
--- wpa_supplicant-0.6.4/src/drivers/driver_wext.c 2008-08-10 19:33:12.000000000 +0200
+++ wpa_supplicant-0.6.4_2//src/drivers/driver_wext.c 2008-09-15 11:40:50.000000000 +0200
@@ -497,8 +497,7 @@
return 0;
}
-
-
+
static int wpa_driver_wext_event_wireless_pmkidcand(
struct wpa_driver_wext_data *drv, const char *ev, size_t len)
{
@@ -684,6 +683,9 @@
wpa_driver_wext_event_wireless_pmkidcand(
drv, custom, iwe->u.data.length);
break;
+ case IWEVROAM:
+ wpa_supplicant_event(ctx, EVENT_ROAMING_THRESHOLD, NULL);
+ break;
}
pos += iwe->len;
diff -ur wpa_supplicant-0.6.4/wpa_supplicant/events.c wpa_supplicant-0.6.4_2//wpa_supplicant/events.c
--- wpa_supplicant-0.6.4/wpa_supplicant/events.c 2008-08-10 19:33:12.000000000 +0200
+++ wpa_supplicant-0.6.4_2//wpa_supplicant/events.c 2008-09-15 12:14:13.000000000 +0200
@@ -613,6 +613,10 @@
}
#endif /* CONFIG_NO_SCAN_PROCESSING */
+static void wpa_supplicant_event_roaming_threshold(struct wpa_supplicant *wpa_s)
+{
+ wpa_supplicant_req_scan(wpa_s, 0, 0);
+}
static void wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
union wpa_event_data *data)
@@ -955,6 +959,9 @@
wpa_supplicant_event_ft_response(wpa_s, data);
break;
#endif /* CONFIG_IEEE80211R */
+ case EVENT_ROAMING_THRESHOLD:
+ wpa_supplicant_event_roaming_threshold(wpa_s);
+ break;
default:
wpa_printf(MSG_INFO, "Unknown event %d", event);
break;
next prev parent reply other threads:[~2008-09-15 12:41 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-15 12:16 More thoughts about roaming Helmut Schaa
2008-09-15 12:29 ` [RFC] Implement basic background scanning Helmut Schaa
2008-09-15 14:32 ` Michael Buesch
2008-09-15 14:40 ` Helmut Schaa
2008-09-15 15:59 ` Johannes Berg
2008-09-15 16:35 ` Helmut Schaa
2008-09-16 8:43 ` Kalle Valo
2008-09-16 9:10 ` Johannes Berg
2008-09-16 9:20 ` Helmut Schaa
2008-09-16 11:06 ` Johannes Berg
2008-09-16 9:15 ` Tomas Winkler
2008-09-15 12:35 ` [RFC] mac80211: notify the user space about low signal quality Helmut Schaa
2008-09-15 14:07 ` Dan Williams
2008-09-15 14:34 ` Helmut Schaa
2008-09-15 15:28 ` Dan Williams
2008-09-15 16:45 ` Helmut Schaa
2008-09-16 1:21 ` Luis R. Rodriguez
2008-09-16 7:41 ` Helmut Schaa
2008-09-16 8:07 ` Kalle Valo
2008-09-16 8:12 ` Johannes Berg
2008-09-16 8:55 ` Kalle Valo
2008-09-23 18:21 ` John W. Linville
2008-09-16 8:00 ` Kalle Valo
2008-09-16 7:57 ` Kalle Valo
2008-09-15 15:10 ` Holger Schurig
2008-09-15 15:19 ` Dan Williams
2008-09-16 8:25 ` Kalle Valo
2008-09-16 8:50 ` Holger Schurig
2008-09-16 9:25 ` Helmut Schaa
2008-09-16 9:32 ` Helmut Schaa
2008-09-16 10:23 ` Holger Schurig
2008-09-15 15:17 ` Holger Schurig
2008-09-16 7:53 ` Kalle Valo
2008-09-15 12:41 ` Helmut Schaa [this message]
2008-09-15 13:59 ` More thoughts about roaming Dan Williams
2008-09-15 14:18 ` Helmut Schaa
2008-09-15 14:45 ` Dan Williams
2008-09-16 7:09 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200809151441.50699.hschaa@suse.de \
--to=hschaa@suse.de \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).