[pkg-wpa-devel] r1179 - in /wpasupplicant/trunk/debian: changelog patches/52_handle_mac80211_mode_switch.patch patches/53_give_adhoc_assoc_more_time.patch patches/series
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Thu Jun 5 11:21:01 UTC 2008
Author: kelmo-guest
Date: Thu Jun 5 11:21:01 2008
New Revision: 1179
URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1179
Log:
* Add 52_handle_mac80211_mode_switch.patch to enhance handling of mode
switching for mac80211 using interfaces.
* Add 53_give_adhoc_assoc_more_time.patch to give adhoc associations a bit
more time.
Added:
wpasupplicant/trunk/debian/patches/52_handle_mac80211_mode_switch.patch
wpasupplicant/trunk/debian/patches/53_give_adhoc_assoc_more_time.patch
Modified:
wpasupplicant/trunk/debian/changelog
wpasupplicant/trunk/debian/patches/series
Modified: wpasupplicant/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/changelog?rev=1179&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/changelog (original)
+++ wpasupplicant/trunk/debian/changelog Thu Jun 5 11:21:01 2008
@@ -40,8 +40,12 @@
* Simplify debian/rules handling of wpa_supplicant/.config, just cp it in as
needed in build target. Move dh_install into install target. These will
make integration of possible future udeb cleaner.
-
- -- Kel Modderman <kel at otaku42.de> Thu, 05 Jun 2008 09:42:24 +1000
+ * Add 52_handle_mac80211_mode_switch.patch to enhance handling of mode
+ switching for mac80211 using interfaces.
+ * Add 53_give_adhoc_assoc_more_time.patch to give adhoc associations a bit
+ more time.
+
+ -- Kel Modderman <kel at otaku42.de> Thu, 05 Jun 2008 21:19:03 +1000
wpasupplicant (0.6.3-1) unstable; urgency=low
Added: wpasupplicant/trunk/debian/patches/52_handle_mac80211_mode_switch.patch
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/patches/52_handle_mac80211_mode_switch.patch?rev=1179&op=file
==============================================================================
--- wpasupplicant/trunk/debian/patches/52_handle_mac80211_mode_switch.patch (added)
+++ wpasupplicant/trunk/debian/patches/52_handle_mac80211_mode_switch.patch Thu Jun 5 11:21:01 2008
@@ -1,0 +1,74 @@
+From: Dan Williams <dcbw at redhat.com>
+Date: Wed, 4 Jun 2008 17:55:57 +0000 (+0300)
+Subject: wext: handle mode switches correctly for mac80211
+X-Git-Url: http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=59c9707863336c1255936c755d24c8eb1ed8db2f
+
+wext: handle mode switches correctly for mac80211
+
+Since mac80211 requires that the device be !IFF_UP to change the mode
+(and I think the old prism54 fullmac driver does too), do that. This
+shouldn't harm fullmac devices since they can handle mode switches on
+the fly and usually don't care about up/down that much.
+---
+
+--- a/src/drivers/driver_wext.c
++++ b/src/drivers/driver_wext.c
+@@ -2179,17 +2179,54 @@
+ {
+ struct wpa_driver_wext_data *drv = priv;
+ struct iwreq iwr;
+- int ret = 0;
++ int ret = -1, flags;
++ unsigned int new_mode = mode ? IW_MODE_ADHOC : IW_MODE_INFRA;
+
+ os_memset(&iwr, 0, sizeof(iwr));
+ os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
+- iwr.u.mode = mode ? IW_MODE_ADHOC : IW_MODE_INFRA;
++ iwr.u.mode = new_mode;
++ if (ioctl(drv->ioctl_sock, SIOCSIWMODE, &iwr) == 0) {
++ ret = 0;
++ goto done;
++ }
+
+- if (ioctl(drv->ioctl_sock, SIOCSIWMODE, &iwr) < 0) {
++ if (errno != EBUSY) {
+ perror("ioctl[SIOCSIWMODE]");
+- ret = -1;
++ goto done;
++ }
++
++ /* mac80211 doesn't allow mode changes while the device is up, so if
++ * the device isn't in the mode we're about to change to, take device
++ * down, try to set the mode again, and bring it back up.
++ */
++ if (ioctl(drv->ioctl_sock, SIOCGIWMODE, &iwr) < 0) {
++ perror("ioctl[SIOCGIWMODE]");
++ goto done;
++ }
++
++ if (iwr.u.mode == new_mode) {
++ ret = 0;
++ goto done;
++ }
++
++ if (wpa_driver_wext_get_ifflags(drv, &flags) == 0) {
++ (void) wpa_driver_wext_set_ifflags(drv, flags & ~IFF_UP);
++
++ /* Try to set the mode again while the interface is down */
++ iwr.u.mode = new_mode;
++ if (ioctl(drv->ioctl_sock, SIOCSIWMODE, &iwr) < 0)
++ perror("ioctl[SIOCSIWMODE]");
++ else
++ ret = 0;
++
++ /* Ignore return value of get_ifflags to ensure that the device
++ * is always up like it was before this function was called.
++ */
++ (void) wpa_driver_wext_get_ifflags(drv, &flags);
++ (void) wpa_driver_wext_set_ifflags(drv, flags | IFF_UP);
+ }
+
++done:
+ return ret;
+ }
+
Added: wpasupplicant/trunk/debian/patches/53_give_adhoc_assoc_more_time.patch
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/patches/53_give_adhoc_assoc_more_time.patch?rev=1179&op=file
==============================================================================
--- wpasupplicant/trunk/debian/patches/53_give_adhoc_assoc_more_time.patch (added)
+++ wpasupplicant/trunk/debian/patches/53_give_adhoc_assoc_more_time.patch Thu Jun 5 11:21:01 2008
@@ -1,0 +1,39 @@
+From: Dan Williams <dcbw at redhat.com>
+Date: Wed, 4 Jun 2008 18:00:09 +0000 (+0300)
+Subject: Give adhoc associations a bit more time
+X-Git-Url: http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=1d3c75b3b6663ed9f3a9a8dea8d47056cce2680f
+
+Give adhoc associations a bit more time
+
+Depending on how the driver implements IBSS searching and creation, it
+may need to perform one or more scans before successfully completing the
+association operation. Therefore, increase the timeout for IBSS
+association operations so that the supplicant doesn't interrupt the
+driver as much.
+---
+
+--- a/wpa_supplicant/wpa_supplicant.c
++++ b/wpa_supplicant/wpa_supplicant.c
+@@ -1090,13 +1090,15 @@
+ wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
+ } else {
+ /* Timeout for IEEE 802.11 authentication and association */
+- int timeout;
+- if (assoc_failed)
+- timeout = 5;
+- else if (wpa_s->conf->ap_scan == 1)
+- timeout = 10;
+- else
+- timeout = 60;
++ int timeout = 60;
++
++ if (assoc_failed) {
++ /* give IBSS a bit more time */
++ timeout = ssid->mode ? 10 : 5;
++ } else if (wpa_s->conf->ap_scan == 1) {
++ /* give IBSS a bit more time */
++ timeout = ssid->mode ? 20 : 10;
++ }
+ wpa_supplicant_req_auth_timeout(wpa_s, timeout, 0);
+ }
+
Modified: wpasupplicant/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/patches/series?rev=1179&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/patches/series (original)
+++ wpasupplicant/trunk/debian/patches/series Thu Jun 5 11:21:01 2008
@@ -14,3 +14,5 @@
43_remove_w_from_help.patch
50_wext_dont_overwrite_bss_freq.patch
51_dont_reschedule_specific_scans_for_hidden_ssids.patch
+52_handle_mac80211_mode_switch.patch
+53_give_adhoc_assoc_more_time.patch
More information about the Pkg-wpa-devel
mailing list