From c4439687392c33378e666d8fa64e523dcbe66c87d5d22aa4451b40e1574b4c2e Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 13 Oct 2008 15:01:12 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/wpa_supplicant?expand=0&rev=16 --- ...icant-dont_report_empty_initial_scan.patch | 39 +++++ wpa_supplicant-fix_set_mode.patch | 149 +++++++++++++++++ ...plicant-restore_scan_request_setting.patch | 25 +++ wpa_supplicant-roaming.patch | 158 ++++++++++++++---- wpa_supplicant.changes | 16 ++ wpa_supplicant.spec | 18 +- 6 files changed, 367 insertions(+), 38 deletions(-) create mode 100644 wpa_supplicant-dont_report_empty_initial_scan.patch create mode 100644 wpa_supplicant-fix_set_mode.patch create mode 100644 wpa_supplicant-restore_scan_request_setting.patch diff --git a/wpa_supplicant-dont_report_empty_initial_scan.patch b/wpa_supplicant-dont_report_empty_initial_scan.patch new file mode 100644 index 0000000..ff1a27f --- /dev/null +++ b/wpa_supplicant-dont_report_empty_initial_scan.patch @@ -0,0 +1,39 @@ +From: Dan Nicholson +Date: Wed, 24 Sep 2008 09:51:08 +0000 (+0300) +Subject: Don't post scan results when initial scan is emtpy +X-Git-Url: http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=23e072374ea500002b8beec5d0e87f9fc6a7609c;hp=2064c2f98515016c376f3b69bfe161c85639e764 + +Don't post scan results when initial scan is emtpy + +When the initial scan is made, just the cached results from the driver +are used. If this is empty, it's useless to post the results since +another scan is being scheduled immediately. This just causes extra +processing from listeners for no gain. +--- + +diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c +index 0f9b338..04e3152 100644 +--- a/wpa_supplicant/events.c ++++ b/wpa_supplicant/events.c +@@ -551,9 +551,18 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s) + goto req_scan; + } + +- wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS); +- +- wpa_supplicant_dbus_notify_scan_results(wpa_s); ++ /* ++ * Don't post the results if this was the initial cached ++ * and there were no results. ++ */ ++ if (wpa_s->scan_res_tried == 1 && wpa_s->conf->ap_scan == 1 && ++ wpa_s->scan_res->num == 0) { ++ wpa_msg(wpa_s, MSG_DEBUG, "Cached scan results are " ++ "empty - not posting"); ++ } else { ++ wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS); ++ wpa_supplicant_dbus_notify_scan_results(wpa_s); ++ } + + if (wpa_s->conf->ap_scan == 2 || wpa_s->disconnected) + return; diff --git a/wpa_supplicant-fix_set_mode.patch b/wpa_supplicant-fix_set_mode.patch new file mode 100644 index 0000000..5b5e83a --- /dev/null +++ b/wpa_supplicant-fix_set_mode.patch @@ -0,0 +1,149 @@ +From: Dan Williams +Date: Mon, 29 Sep 2008 13:45:49 +0000 (+0300) +Subject: Add an optional set_mode() driver_ops handler for setting mode before keys +X-Git-Url: http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=ec5f180a24cd31ba9d3d7f2abc9dc557fd16602f;hp=1a647aaa691d91c4a5ffccce09291592c4340062 + +Add an optional set_mode() driver_ops handler for setting mode before keys + +A bug just got reported as a result of this for mac80211 drivers. + +https://bugzilla.redhat.com/show_bug.cgi?id=459399 + +The basic problem is that since taking the device down clears the keys +from the driver on many mac80211-based cards, and since the mode gets +set _after_ the keys have been set in the driver, the keys get cleared +on a mode switch and the resulting association is wrong. The report is +about ad-hoc mode specifically, but this could happen when switching +from adhoc back to managed mode. +--- + +diff --git a/src/drivers/driver.h b/src/drivers/driver.h +index 70dc075..77a2ceb 100644 +--- a/src/drivers/driver.h ++++ b/src/drivers/driver.h +@@ -929,6 +929,20 @@ struct wpa_driver_ops { + * Returns: 0 on success, -1 on failure + */ + int (*set_probe_req_ie)(void *, const u8 *ies, size_t ies_len); ++ ++ /** ++ * set_mode - Request driver to set the operating mode ++ * @priv: private driver interface data ++ * @mode: Operation mode (infra/ibss) IEEE80211_MODE_* ++ * ++ * This handler will be called before any key configuration and call to ++ * associate() handler in order to allow the operation mode to be ++ * configured as early as possible. This information is also available ++ * in associate() params and as such, some driver wrappers may not need ++ * to implement set_mode() handler. ++ * Returns: 0 on success, -1 on failure ++ */ ++ int (*set_mode)(void *priv, int mode); + }; + + /** +diff --git a/src/drivers/driver_ndis.c b/src/drivers/driver_ndis.c +index da4f90f..f55bd2e 100644 +--- a/src/drivers/driver_ndis.c ++++ b/src/drivers/driver_ndis.c +@@ -2829,5 +2829,7 @@ const struct wpa_driver_ops wpa_driver_ndis_ops = { + NULL /* mlme_remove_sta */, + NULL /* update_ft_ies */, + NULL /* send_ft_action */, +- wpa_driver_ndis_get_scan_results ++ wpa_driver_ndis_get_scan_results, ++ NULL /* set_probe_req_ie */, ++ NULL /* set_mode */ + }; +diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c +index 98dddd6..a207363 100644 +--- a/src/drivers/driver_nl80211.c ++++ b/src/drivers/driver_nl80211.c +@@ -2226,8 +2226,6 @@ static int wpa_driver_nl80211_associate( + wpa_driver_nl80211_set_bssid(drv, NULL) < 0) + ret = -1; + +- if (wpa_driver_nl80211_set_mode(drv, params->mode) < 0) +- ret = -1; + /* TODO: should consider getting wpa version and cipher/key_mgmt suites + * from configuration, not from here, where only the selected suite is + * available */ +@@ -2859,6 +2857,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = { + .get_scan_results2 = wpa_driver_nl80211_get_scan_results, + .deauthenticate = wpa_driver_nl80211_deauthenticate, + .disassociate = wpa_driver_nl80211_disassociate, ++ .set_mode = wpa_driver_nl80211_set_mode, + .associate = wpa_driver_nl80211_associate, + .set_auth_alg = wpa_driver_nl80211_set_auth_alg, + .init = wpa_driver_nl80211_init, +diff --git a/src/drivers/driver_test.c b/src/drivers/driver_test.c +index 5c6e6f1..7f7f129 100644 +--- a/src/drivers/driver_test.c ++++ b/src/drivers/driver_test.c +@@ -982,5 +982,6 @@ const struct wpa_driver_ops wpa_driver_test_ops = { + NULL /* update_ft_ies */, + NULL /* send_ft_action */, + wpa_driver_test_get_scan_results2, +- NULL /* set_probe_req_ie */ ++ NULL /* set_probe_req_ie */, ++ NULL /* set_mode */ + }; +diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c +index 6b7f1a7..a618a74 100644 +--- a/src/drivers/driver_wext.c ++++ b/src/drivers/driver_wext.c +@@ -2206,11 +2206,6 @@ int wpa_driver_wext_associate(void *priv, + wpa_driver_wext_set_bssid(drv, NULL) < 0) + ret = -1; + +- if (wpa_driver_wext_set_mode(drv, params->mode) < 0) +-{ +-wpa_printf(MSG_DEBUG, "%s: assoc failed because set_mode failed", __FUNCTION__); +- ret = -1; +-} + /* TODO: should consider getting wpa version and cipher/key_mgmt suites + * from configuration, not from here, where only the selected suite is + * available */ +@@ -2782,6 +2780,7 @@ const struct wpa_driver_ops wpa_driver_wext_ops = { + .get_scan_results2 = wpa_driver_wext_get_scan_results, + .deauthenticate = wpa_driver_wext_deauthenticate, + .disassociate = wpa_driver_wext_disassociate, ++ .set_mode = wpa_driver_wext_set_mode, + .associate = wpa_driver_wext_associate, + .set_auth_alg = wpa_driver_wext_set_auth_alg, + .init = wpa_driver_wext_init, +diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c +index 4c9482f..a36c65b 100644 +--- a/wpa_supplicant/wpa_supplicant.c ++++ b/wpa_supplicant/wpa_supplicant.c +@@ -937,6 +937,11 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, + * previous association. */ + wpa_sm_set_assoc_wpa_ie(wpa_s->wpa, NULL, 0); + ++ if (wpa_drv_set_mode(wpa_s, ssid->mode)) { ++ wpa_printf(MSG_WARNING, "Failed to set operating mode"); ++ assoc_failed = 1; ++ } ++ + #ifdef IEEE8021X_EAPOL + if (ssid->key_mgmt & WPA_KEY_MGMT_IEEE8021X_NO_WPA) { + if (ssid->leap) { +diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h +index a2e3dd5..9afae2a 100644 +--- a/wpa_supplicant/wpa_supplicant_i.h ++++ b/wpa_supplicant/wpa_supplicant_i.h +@@ -448,6 +448,14 @@ static inline int wpa_drv_set_wpa(struct wpa_supplicant *wpa_s, int enabled) + return 0; + } + ++static inline int wpa_drv_set_mode(struct wpa_supplicant *wpa_s, int mode) ++{ ++ if (wpa_s->driver->set_mode) { ++ return wpa_s->driver->set_mode(wpa_s->drv_priv, mode); ++ } ++ return 0; ++} ++ + static inline int wpa_drv_associate(struct wpa_supplicant *wpa_s, + struct wpa_driver_associate_params *params) + { diff --git a/wpa_supplicant-restore_scan_request_setting.patch b/wpa_supplicant-restore_scan_request_setting.patch new file mode 100644 index 0000000..123ed98 --- /dev/null +++ b/wpa_supplicant-restore_scan_request_setting.patch @@ -0,0 +1,25 @@ +From: Dan Nicholson +Date: Wed, 24 Sep 2008 09:48:33 +0000 (+0300) +Subject: Restore scan request settings if initial association failed +X-Git-Url: http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=2064c2f98515016c376f3b69bfe161c85639e764;hp=76dca8929507feca772a35e830329934ae685444 + +Restore scan request settings if initial association failed + +The scan path to initiate another scan if the initial association failed +was broken due to wpa_s->scan_req being zeroed earlier in +wpa_supplicant_scan(). This caused the second scan to bail out early +since it thought this was not a requested scan. +--- + +diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c +index c2549e2..8767109 100644 +--- a/wpa_supplicant/scan.c ++++ b/wpa_supplicant/scan.c +@@ -137,6 +137,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx) + if (wpa_s->scan_res_tried == 0 && wpa_s->conf->ap_scan == 1 && + !wpa_s->use_client_mlme) { + wpa_s->scan_res_tried++; ++ wpa_s->scan_req = scan_req; + wpa_printf(MSG_DEBUG, "Trying to get current scan results " + "first without requesting a new scan to speed up " + "initial association"); diff --git a/wpa_supplicant-roaming.patch b/wpa_supplicant-roaming.patch index 65b53c1..ca26f68 100644 --- a/wpa_supplicant-roaming.patch +++ b/wpa_supplicant-roaming.patch @@ -1,7 +1,16 @@ -diff -ur wpa_supplicant-0.6.4/src/drivers/driver.h wpa_supplicant-0.6.4_us//src/drivers/driver.h +diff -ur wpa_supplicant-0.6.4/src/drivers/driver.h wpa_supplicant-0.6.4_us/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_us//src/drivers/driver.h 2008-09-24 10:02:00.000000000 +0200 -@@ -1052,7 +1052,13 @@ ++++ wpa_supplicant-0.6.4_us/src/drivers/driver.h 2008-10-13 13:50:55.000000000 +0200 +@@ -929,6 +929,8 @@ + * Returns: 0 on success, -1 on failure + */ + int (*set_mode)(void *priv, int mode); ++ ++ int (*get_default_roaming)(void *priv); + }; + + /** +@@ -1052,7 +1054,13 @@ * FT authentication sequence from the AP. The FT IEs are included in * the extra information in union wpa_event_data::ft_ies. */ @@ -16,13 +25,9 @@ diff -ur wpa_supplicant-0.6.4/src/drivers/driver.h wpa_supplicant-0.6.4_us//src/ } wpa_event_type; -Nur in wpa_supplicant-0.6.4_us//src/drivers: driver_hostap.d. -Nur in wpa_supplicant-0.6.4_us//src/drivers: driver_hostap.o. -Nur in wpa_supplicant-0.6.4_us//src/drivers: drivers.d. -Nur in wpa_supplicant-0.6.4_us//src/drivers: drivers.o. -diff -ur wpa_supplicant-0.6.4/src/drivers/driver_wext.c wpa_supplicant-0.6.4_us//src/drivers/driver_wext.c +diff -ur wpa_supplicant-0.6.4/src/drivers/driver_wext.c wpa_supplicant-0.6.4_us/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_us//src/drivers/driver_wext.c 2008-09-29 13:08:54.000000000 +0200 ++++ wpa_supplicant-0.6.4_us/src/drivers/driver_wext.c 2008-10-13 14:54:03.000000000 +0200 @@ -643,10 +642,18 @@ drv->assoc_req_ies = NULL; os_free(drv->assoc_resp_ies); @@ -42,7 +47,56 @@ diff -ur wpa_supplicant-0.6.4/src/drivers/driver_wext.c wpa_supplicant-0.6.4_us/ wpa_driver_wext_event_assoc_ies(drv); wpa_supplicant_event(ctx, EVENT_ASSOC, NULL); } -@@ -1206,6 +1213,60 @@ +@@ -1027,6 +1034,30 @@ + return wpa_driver_wext_set_ifflags_ifname(drv, drv->ifname, flags); + } + ++void wpa_driver_wext_set_default_roaming(struct wpa_driver_wext_data *drv) ++{ ++ /* ugly hack to enable roaming only for the iwlwifi driver */ ++ char buf[256]; ++ char line[256]; ++ FILE* f; ++ ++ /* the driver we want roaming enabled for */ ++ char* driver = "DRIVER=iwlagn"; ++ ++ /* lookup this interface in sysfs */ ++ snprintf(buf, sizeof(buf),"/sys/class/net/%s/device/uevent", drv->ifname); ++ if ( (f = fopen(buf, "r")) ) { ++ while (fgets(line, sizeof(line), f)) { ++ if (strstr (line, driver)) { ++ /* iwlwifi found -> enable roaming */ ++ drv->default_roaming = 1; ++ break; ++ } ++ } ++ fclose(f); ++ f = NULL; ++ } ++} + + /** + * wpa_driver_wext_init - Initialize WE driver interface +@@ -1078,6 +1109,9 @@ + + drv->mlme_sock = -1; + ++ drv->default_roaming = 0; ++ wpa_driver_wext_set_default_roaming(drv); ++ + wpa_driver_wext_finish_drv_init(drv); + + return drv; +@@ -1153,6 +1187,7 @@ + int flags; + + eloop_cancel_timeout(wpa_driver_wext_scan_timeout, drv, drv->ctx); ++ eloop_cancel_timeout(wpa_driver_wext_monitor_quality, drv, drv->ctx); + + /* + * Clear possibly configured driver parameters in order to make it +@@ -1206,6 +1241,69 @@ wpa_supplicant_event(timeout_ctx, EVENT_SCAN_RESULTS, NULL); } @@ -99,11 +153,20 @@ diff -ur wpa_supplicant-0.6.4/src/drivers/driver_wext.c wpa_supplicant-0.6.4_us/ + timeout_sec = 10; + + eloop_register_timeout(timeout_sec, 0, wpa_driver_wext_monitor_quality, drv, drv->ctx); ++} ++ ++/** ++ * wpa_driver_get_default_roaming - Enable/Disable roaming per default ++ */ ++int wpa_driver_get_default_roaming(void *priv) ++{ ++ struct wpa_driver_wext_data *drv = priv; ++ return drv->default_roaming; +} /** * wpa_driver_wext_scan - Request the driver to initiate scan -@@ -1753,6 +1813,7 @@ +@@ -1753,6 +1850,7 @@ if (range->enc_capa & IW_ENC_CAPA_4WAY_HANDSHAKE) drv->capa.flags |= WPA_DRIVER_FLAGS_4WAY_HANDSHAKE; @@ -111,20 +174,28 @@ diff -ur wpa_supplicant-0.6.4/src/drivers/driver_wext.c wpa_supplicant-0.6.4_us/ wpa_printf(MSG_DEBUG, " capabilities: key_mgmt 0x%x enc 0x%x " "flags 0x%x", drv->capa.key_mgmt, drv->capa.enc, drv->capa.flags); -Nur in wpa_supplicant-0.6.4_us//src/drivers: driver_wext.d. -diff -ur wpa_supplicant-0.6.4/src/drivers/driver_wext.h wpa_supplicant-0.6.4_us//src/drivers/driver_wext.h +@@ -2766,6 +2865,7 @@ + .flush_pmkid = wpa_driver_wext_flush_pmkid, + .get_capa = wpa_driver_wext_get_capa, + .set_operstate = wpa_driver_wext_set_operstate, ++ .get_default_roaming = wpa_driver_get_default_roaming, + #ifdef CONFIG_CLIENT_MLME + .get_hw_feature_data = wpa_driver_wext_get_hw_feature_data, + .set_channel = wpa_driver_wext_set_channel, +diff -ur wpa_supplicant-0.6.4/src/drivers/driver_wext.h wpa_supplicant-0.6.4_us/src/drivers/driver_wext.h --- wpa_supplicant-0.6.4/src/drivers/driver_wext.h 2008-08-10 19:33:12.000000000 +0200 -+++ wpa_supplicant-0.6.4_us//src/drivers/driver_wext.h 2008-09-24 10:52:23.000000000 +0200 -@@ -43,6 +43,8 @@ ++++ wpa_supplicant-0.6.4_us/src/drivers/driver_wext.h 2008-10-13 14:08:22.000000000 +0200 +@@ -43,6 +43,9 @@ char mlmedev[IFNAMSIZ + 1]; int scan_complete_events; + int low_signal_count; + int max_qual; ++ int default_roaming; }; int wpa_driver_wext_get_ifflags(struct wpa_driver_wext_data *drv, int *flags); -@@ -61,6 +63,7 @@ +@@ -61,6 +64,7 @@ struct wpa_scan_results * wpa_driver_wext_get_scan_results(void *priv); void wpa_driver_wext_scan_timeout(void *eloop_ctx, void *timeout_ctx); @@ -132,9 +203,9 @@ diff -ur wpa_supplicant-0.6.4/src/drivers/driver_wext.h wpa_supplicant-0.6.4_us/ int wpa_driver_wext_alternative_ifindex(struct wpa_driver_wext_data *drv, const char *ifname); -diff -ur wpa_supplicant-0.6.4/wpa_supplicant/config.c wpa_supplicant-0.6.4_us//wpa_supplicant/config.c +diff -ur wpa_supplicant-0.6.4/wpa_supplicant/config.c wpa_supplicant-0.6.4_us/wpa_supplicant/config.c --- wpa_supplicant-0.6.4/wpa_supplicant/config.c 2008-08-10 19:33:12.000000000 +0200 -+++ wpa_supplicant-0.6.4_us//wpa_supplicant/config.c 2008-09-29 13:13:31.000000000 +0200 ++++ wpa_supplicant-0.6.4_us/wpa_supplicant/config.c 2008-09-29 13:13:31.000000000 +0200 @@ -1883,6 +1883,7 @@ config->eapol_version = DEFAULT_EAPOL_VERSION; config->ap_scan = DEFAULT_AP_SCAN; @@ -143,10 +214,9 @@ diff -ur wpa_supplicant-0.6.4/wpa_supplicant/config.c wpa_supplicant-0.6.4_us//w if (ctrl_interface) config->ctrl_interface = os_strdup(ctrl_interface); -Nur in wpa_supplicant-0.6.4_us//wpa_supplicant: config.d. -diff -ur wpa_supplicant-0.6.4/wpa_supplicant/config_file.c wpa_supplicant-0.6.4_us//wpa_supplicant/config_file.c +diff -ur wpa_supplicant-0.6.4/wpa_supplicant/config_file.c wpa_supplicant-0.6.4_us/wpa_supplicant/config_file.c --- wpa_supplicant-0.6.4/wpa_supplicant/config_file.c 2008-08-10 19:33:12.000000000 +0200 -+++ wpa_supplicant-0.6.4_us//wpa_supplicant/config_file.c 2008-09-29 13:20:10.000000000 +0200 ++++ wpa_supplicant-0.6.4_us/wpa_supplicant/config_file.c 2008-09-29 13:20:10.000000000 +0200 @@ -312,6 +312,12 @@ return 0; } @@ -170,16 +240,14 @@ diff -ur wpa_supplicant-0.6.4/wpa_supplicant/config_file.c wpa_supplicant-0.6.4_ if (os_strncmp(pos, "fast_reauth=", 12) == 0) return wpa_config_process_fast_reauth(config, pos + 12); -Nur in wpa_supplicant-0.6.4_us//wpa_supplicant: config_file.d. -Nur in wpa_supplicant-0.6.4_us//wpa_supplicant: config_file.o. -diff -ur wpa_supplicant-0.6.4/wpa_supplicant/config.h wpa_supplicant-0.6.4_us//wpa_supplicant/config.h +diff -ur wpa_supplicant-0.6.4/wpa_supplicant/config.h wpa_supplicant-0.6.4_us/wpa_supplicant/config.h --- wpa_supplicant-0.6.4/wpa_supplicant/config.h 2008-08-10 19:33:12.000000000 +0200 -+++ wpa_supplicant-0.6.4_us//wpa_supplicant/config.h 2008-09-29 13:13:49.000000000 +0200 ++++ wpa_supplicant-0.6.4_us/wpa_supplicant/config.h 2008-10-13 13:42:01.000000000 +0200 @@ -22,6 +22,7 @@ #define DEFAULT_AP_SCAN 1 #endif /* CONFIG_NO_SCAN_PROCESSING */ #define DEFAULT_FAST_REAUTH 1 -+#define DEFAULT_ROAMING 0 ++#define DEFAULT_ROAMING -1 #include "config_ssid.h" @@ -195,27 +263,32 @@ diff -ur wpa_supplicant-0.6.4/wpa_supplicant/config.h wpa_supplicant-0.6.4_us//w * blobs - Configuration blobs */ struct wpa_config_blob *blobs; -Nur in wpa_supplicant-0.6.4_us//wpa_supplicant: config.o. -Nur in wpa_supplicant-0.6.4_us//wpa_supplicant: ctrl_iface.d. -Nur in wpa_supplicant-0.6.4_us//wpa_supplicant: ctrl_iface.o. -Nur in wpa_supplicant-0.6.4_us//wpa_supplicant: ctrl_iface_unix.d. -Nur in wpa_supplicant-0.6.4_us//wpa_supplicant: ctrl_iface_unix.o. -diff -ur wpa_supplicant-0.6.4/wpa_supplicant/events.c wpa_supplicant-0.6.4_us//wpa_supplicant/events.c +diff -ur wpa_supplicant-0.6.4/wpa_supplicant/events.c wpa_supplicant-0.6.4_us/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_us//wpa_supplicant/events.c 2008-09-29 13:16:12.000000000 +0200 -@@ -613,6 +613,11 @@ ++++ wpa_supplicant-0.6.4_us/wpa_supplicant/events.c 2008-10-13 13:53:52.000000000 +0200 +@@ -613,6 +613,21 @@ } #endif /* CONFIG_NO_SCAN_PROCESSING */ +static void wpa_supplicant_event_roaming_threshold(struct wpa_supplicant *wpa_s) +{ -+ if (wpa_s->conf->roaming > 0) -+ wpa_supplicant_req_scan(wpa_s, 0, 0); ++ struct os_time t1, t2; ++ os_get_time(&t1); ++ os_time_sub(&t1, &(wpa_s->last_roaming_attempt), &t2); ++ if (wpa_s->conf->roaming > 0 ++ || (wpa_s->conf->roaming == -1 ++ && wpa_s->driver->get_default_roaming ++ && wpa_s->driver->get_default_roaming(wpa_s->drv_priv))) ++ /* limit the scan triggering to one every 20 seconds */ ++ if (t2.sec > 20) { ++ wpa_supplicant_req_scan(wpa_s, 0, 0); ++ os_get_time(&(wpa_s->last_roaming_attempt)); ++ } +} static void wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s, union wpa_event_data *data) -@@ -955,6 +960,9 @@ +@@ -955,6 +970,9 @@ wpa_supplicant_event_ft_response(wpa_s, data); break; #endif /* CONFIG_IEEE80211R */ @@ -225,3 +298,14 @@ diff -ur wpa_supplicant-0.6.4/wpa_supplicant/events.c wpa_supplicant-0.6.4_us//w default: wpa_printf(MSG_INFO, "Unknown event %d", event); break; +diff -ur wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant_i.h wpa_supplicant-0.6.4_us/wpa_supplicant/wpa_supplicant_i.h +--- wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant_i.h 2008-08-10 19:33:12.000000000 +0200 ++++ wpa_supplicant-0.6.4_us/wpa_supplicant/wpa_supplicant_i.h 2008-10-13 13:53:43.000000000 +0200 +@@ -334,6 +334,7 @@ + struct wpa_client_mlme mlme; + int use_client_mlme; + int driver_4way_handshake; ++ struct os_time last_roaming_attempt; + }; + + diff --git a/wpa_supplicant.changes b/wpa_supplicant.changes index ada4c0f..0d462c3 100644 --- a/wpa_supplicant.changes +++ b/wpa_supplicant.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Mon Oct 13 15:11:54 CEST 2008 - hschaa@gmail.com + +- update wpa_supplicant-roaming.patch which enables roaming by + default for some cards + +------------------------------------------------------------------- +Thu Oct 9 14:42:36 CEST 2008 - hschaa@suse.de + +- add patches wpa_supplicant-dont_report_empty_initial_scan.patch + and wpa_supplicant-restore_scan_request_setting.patch which + speed up the initial association with a network when NM is used +- Add patch wpa_supplicant-fix_set_mode.patch which fixes an + association bug that was triggered when changing the interface + mode + ------------------------------------------------------------------- Mon Sep 29 13:40:18 CEST 2008 - hschaa@suse.de diff --git a/wpa_supplicant.spec b/wpa_supplicant.spec index c339618..4e9673c 100644 --- a/wpa_supplicant.spec +++ b/wpa_supplicant.spec @@ -22,7 +22,7 @@ Name: wpa_supplicant BuildRequires: dbus-1-devel libqt4 libqt4-devel openssl-devel pkg-config readline-devel Url: http://hostap.epitest.fi/wpa_supplicant/ Version: 0.6.4 -Release: 13 +Release: 14 License: BSD 3-Clause; GPL v2 or later Group: Productivity/Networking/Other Summary: WPA supplicant implementation @@ -36,6 +36,9 @@ Patch2: wpa_supplicant-sigusr1-changes-debuglevel.patch Patch3: wpa_supplicant-dbus-iface-segfault-fix.patch Patch4: wpa_supplicant-errormsg.patch Patch5: wpa_supplicant-roaming.patch +Patch6: wpa_supplicant-restore_scan_request_setting.patch +Patch7: wpa_supplicant-dont_report_empty_initial_scan.patch +Patch8: wpa_supplicant-fix_set_mode.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -74,6 +77,9 @@ cp %{SOURCE1} wpa_supplicant/.config %patch2 -p2 %patch3 -p2 %patch4 -p2 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 %patch5 -p1 %build @@ -119,6 +125,16 @@ install -m 755 wpa_supplicant/wpa_gui-qt4/wpa_gui %{buildroot}%{_sbindir} /usr/sbin/wpa_gui %changelog +* Mon Oct 13 2008 hschaa@gmail.com +- update wpa_supplicant-roaming.patch which enables roaming by + default for some cards +* Thu Oct 09 2008 hschaa@suse.de +- add patches wpa_supplicant-dont_report_empty_initial_scan.patch + and wpa_supplicant-restore_scan_request_setting.patch which + speed up the initial association with a network when NM is used +- Add patch wpa_supplicant-fix_set_mode.patch which fixes an + association bug that was triggered when changing the interface + mode * Mon Sep 29 2008 hschaa@suse.de - add roaming capability (FATE 303806) * Wed Sep 24 2008 ro@suse.de