about 06_active-scan.dpatch
Pascal DORMEAU
pdormeau at free.fr
Sat Feb 11 21:39:45 UTC 2006
Hi,
Since version 0.9.0+svn1443-1, I noticed that madwifi-ng + wpasupplicant
have been unusable (random to "never happen" association with AP)
except if 06_active-scan.dpatch (related to ticket 275) was re-applied.
Could it be possible to keep it in the debian/patches directory without
writing it down in the debian/patches/00list ?
This way it could be applied as an option.
A warning like in 0.9.0+svn1443-1 changelog could be added in the
dpatch file ("06_active-scan.dpatch fails to compile against kernels
with WE versions less than 17 (module FTBFS on default Sarge kernel).
This patch is currently being improved").
I put in attachment something that worked for me with version
0.9.0+svn1451-1.
Besides I noticed two minor possible bugs about version 0.9.0+svn1451-1:
- the dmesg output gives 0.9.16.16 as the version for HAL (0.9.16.6
announced in http://madwifi.org, maybe an upstream bug ?),
- madwifi-ng-tools still recommends madwifi-ng-base although
madwifi-ng-base does not exist anymore (i don't know if it is on
purpose or a typo)
Pascal
-------------- next part --------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## active-scan.patch by Kel Modderman <kelrin at tpg.com.au>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: http://madwifi.org/ticket/275
## WARNING : apply at your own risk (add 06_active-scan.dpatch at the
## end of debian/patches/00list). Fails to compile against kernels with
## WE versions less than 17 (module FTBFS on default Sarge kernel).
## This patch is currently being improved
@DPATCH@
diff -Nurb madwifi-ng/net80211/ieee80211_wireless.c madwifi-ng-working/net80211/ieee80211_wireless.c
--- madwifi-ng/net80211/ieee80211_wireless.c 2005-12-21 21:49:59.000000000 -0800
+++ madwifi-ng-working/net80211/ieee80211_wireless.c 2006-01-01 16:04:42.000000000 -0800
@@ -1359,6 +1359,39 @@
/* XXX always manual... */
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
"%s: active scan request\n", __func__);
+ /*
+ Cancel any existing active scan, so that any new parameters
+ in this scan ioctl (or the defaults) can be honored.
+ */
+ (void) ieee80211_cancel_scan(vap);
+ mdelay(10);
+#ifdef IW_SCAN_THIS_ESSID
+ if (data && (data->flags & IW_SCAN_THIS_ESSID)) {
+ struct iw_scan_req req;
+ struct ieee80211_scan_ssid ssid;
+ int copyLength;
+ IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
+ "%s: SCAN_THIS_ESSID requested\n", __func__);
+ if (data->length > sizeof req) {
+ copyLength = sizeof req;
+ } else {
+ copyLength = data->length;
+ }
+ memset(&req, 0, sizeof req);
+ if (copy_from_user(&req, data->pointer, copyLength))
+ return -EFAULT;
+ memcpy(&ssid.ssid, req.essid, sizeof ssid.ssid);
+ ssid.len = req.essid_len;
+ IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
+ "%s: requesting scan of essid '%s'\n", __func__, ssid.ssid);
+ (void) ieee80211_start_scan(vap,
+ IEEE80211_SCAN_ACTIVE |
+ IEEE80211_SCAN_NOPICK |
+ IEEE80211_SCAN_ONCE, IEEE80211_SCAN_FOREVER,
+ 1, &ssid);
+ return 0;
+ }
+#endif
(void) ieee80211_start_scan(vap, IEEE80211_SCAN_ACTIVE |
IEEE80211_SCAN_NOPICK | IEEE80211_SCAN_ONCE,
IEEE80211_SCAN_FOREVER,
More information about the Pkg-madwifi-maintainers
mailing list