initial import
[libicd-wpa] / patches / wpasupplicant-0.6.4.patch
1 diff -rup wpasupplicant-0.6.4.orig/debian/changelog wpasupplicant-0.6.4/debian/changelog
2 --- wpasupplicant-0.6.4.orig/debian/changelog   2009-03-02 14:03:10.000000000 +0100
3 +++ wpasupplicant-0.6.4/debian/changelog        2009-02-20 12:31:12.000000000 +0100
4 @@ -1,3 +1,9 @@
5 +wpasupplicant (0.6.4-3+n810) unstable; urgency=low
6 +
7 +  * Some hacks for cx3110x support. 
8 +
9 + -- Reinhard Tartler <siretart@tauware.de>  Fri, 20 Feb 2009 12:30:44 +0100
10 +
11  wpasupplicant (0.6.4-3) unstable; urgency=low
12  
13    * Bugfix: "Missing -d in testing for a directory in init script". 
14 diff -rup wpasupplicant-0.6.4.orig/debian/compat wpasupplicant-0.6.4/debian/compat
15 --- wpasupplicant-0.6.4.orig/debian/compat      2009-03-02 14:03:10.000000000 +0100
16 +++ wpasupplicant-0.6.4/debian/compat   2009-02-16 20:50:34.000000000 +0100
17 @@ -1 +1 @@
18 -6
19 +5
20 diff -rup wpasupplicant-0.6.4.orig/debian/config/linux wpasupplicant-0.6.4/debian/config/linux
21 --- wpasupplicant-0.6.4.orig/debian/config/linux        2009-03-02 14:03:10.000000000 +0100
22 +++ wpasupplicant-0.6.4/debian/config/linux     2009-02-22 14:11:17.000000000 +0100
23 @@ -27,7 +27,7 @@
24  #CONFIG_DRIVER_NDISWRAPPER=y
25  
26  # Driver interface for Atmel driver
27 -CONFIG_DRIVER_ATMEL=y
28 +#CONFIG_DRIVER_ATMEL=y
29  
30  # Driver interface for Broadcom driver
31  # XXX: Non-GPL header required
32 @@ -108,7 +108,7 @@ CONFIG_EAP_GTC=y
33  CONFIG_EAP_OTP=y
34  
35  # EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used)
36 -CONFIG_EAP_SIM=y
37 +#CONFIG_EAP_SIM=y
38  
39  # EAP-PSK (experimental; this is _not_ needed for WPA-PSK)
40  CONFIG_EAP_PSK=y
41 @@ -120,7 +120,7 @@ CONFIG_EAP_PAX=y
42  CONFIG_EAP_LEAP=y
43  
44  # EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used)
45 -CONFIG_EAP_AKA=y
46 +#CONFIG_EAP_AKA=y
47  
48  # EAP-SAKE
49  #CONFIG_EAP_SAKE=y
50 @@ -145,11 +145,11 @@ CONFIG_PKCS12=y
51  
52  # Smartcard support (i.e., private key on a smartcard), e.g., with openssl
53  # engine.
54 -CONFIG_SMARTCARD=y
55 +#CONFIG_SMARTCARD=y
56  
57  # PC/SC interface for smartcards (USIM, GSM SIM)
58  # Enable this if EAP-SIM or EAP-AKA is included
59 -CONFIG_PCSC=y
60 +#CONFIG_PCSC=y
61  
62  # Development testing
63  #CONFIG_EAPOL_TEST=y
64 @@ -251,7 +251,7 @@ CONFIG_PEERKEY=y
65  # This version is an experimental implementation based on IEEE 802.11w/D1.0
66  # draft and is subject to change since the standard has not yet been finalized.
67  # Driver support is also needed for IEEE 802.11w.
68 -CONFIG_IEEE80211W=y
69 +#CONFIG_IEEE80211W=y
70  
71  # Select TLS implementation
72  # openssl = OpenSSL (default)
73 diff -rup wpasupplicant-0.6.4.orig/debian/control wpasupplicant-0.6.4/debian/control
74 --- wpasupplicant-0.6.4.orig/debian/control     2009-03-02 14:03:10.000000000 +0100
75 +++ wpasupplicant-0.6.4/debian/control  2009-02-16 20:58:44.000000000 +0100
76 @@ -1,21 +1,14 @@
77  Source: wpasupplicant
78  Section: net
79  Priority: optional
80 -Maintainer: Debian/Ubuntu wpasupplicant Maintainers <pkg-wpa-devel@lists.alioth.debian.org>
81 -Uploaders: Kyle McMartin <kyle@debian.org>, Reinhard Tartler <siretart@tauware.de>, Kel Modderman <kel@otaku42.de>
82 -Build-Depends: debhelper (>= 6),
83 +Maintainer: javispedro
84 +Build-Depends: debhelper,
85   quilt,
86   libdbus-glib-1-dev,
87   libssl-dev,
88 - libpcsclite-dev,
89 - libreadline5-dev,
90 - libqt4-dev,
91 + libreadline4-dev,
92   libdbus-1-dev,
93 - docbook,
94 - docbook-utils,
95   pkg-config,
96 - libpcap-dev [kfreebsd-i386 kfreebsd-amd64],
97 - libbsd [kfreebsd-i386 kfreebsd-amd64]
98  Standards-Version: 3.8.0
99  Vcs-Svn: svn://svn.debian.org/pkg-wpa/wpasupplicant/trunk
100  Vcs-Browser: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/
101 @@ -23,19 +16,11 @@ Homepage: http://w1.fi/wpa_supplicant/
102  
103  Package: wpasupplicant
104  Architecture: any
105 -Depends: ${shlibs:Depends}, lsb-base (>= 3.0-6), adduser
106 +Depends: ${shlibs:Depends}, lsb-base (>= 3.0-6)
107  Suggests: wpagui, libengine-pkcs11-openssl
108  Description: Client support for WPA and WPA2 (IEEE 802.11i)
109   WPA and WPA2 are methods for securing wireless networks, the former
110   using IEEE 802.1X, and the latter using IEEE 802.11i. This software
111   provides key negotiation with the WPA Authenticator, and controls
112   association with IEEE 802.11i networks.
113 -
114 -Package: wpagui
115 -Architecture: any
116 -Depends: ${shlibs:Depends}, wpasupplicant (= ${binary:Version})
117 -Description: GUI for wpa_supplicant
118 - wpagui provides a Qt interface for choosing which configured network
119 - to connect to. It also provides a method for browsing 802.11 SSID scan
120 - results, an event history log of messages generated by wpa_supplicant,
121 - and a method to add or edit wpa_supplicant networks.
122
123 diff -rup wpasupplicant-0.6.4.orig/debian/patches/series wpasupplicant-0.6.4/debian/patches/series
124 --- wpasupplicant-0.6.4.orig/debian/patches/series      2009-03-02 14:03:10.000000000 +0100
125 +++ wpasupplicant-0.6.4/debian/patches/series   2009-02-16 20:59:36.000000000 +0100
126 @@ -1,6 +1,3 @@
127 -01_use_pkg-config_for_pcsc-lite_module.patch
128  02_dbus_group_policy.patch
129 -03_dbus_service_activation_logfile.patch
130  04_append_mmd_to_default_cflags.patch
131 -05_qmake_version_makefile.patch
132  06_fix_segfault_32bit_compat_ioctls.patch
133 diff -rup wpasupplicant-0.6.4.orig/debian/rules wpasupplicant-0.6.4/debian/rules
134 --- wpasupplicant-0.6.4.orig/debian/rules       2009-03-02 14:03:10.000000000 +0100
135 +++ wpasupplicant-0.6.4/debian/rules    2009-02-17 01:59:20.000000000 +0100
136 @@ -1,12 +1,10 @@
137  #!/usr/bin/make -f
138  
139  # Uncomment this to turn on verbose mode.
140 -#export DH_VERBOSE=1
141 +export DH_VERBOSE=1
142  
143  include /usr/share/quilt/quilt.make
144  
145 -WPAGUI = wpa_gui-qt4
146 -
147  CFLAGS = -Wall -g
148  LDFLAGS = -Wl,--as-needed
149  
150 @@ -18,12 +16,7 @@ endif
151  
152  DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
153  
154 -ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
155 -       CONFIG := debian/config/kfreebsd
156 -else
157 -       CONFIG := debian/config/linux
158 -endif
159 -
160 +CONFIG := debian/config/linux
161  
162  build: build-stamp
163  build-stamp: $(QUILT_STAMPFN)
164 @@ -33,12 +26,6 @@ build-stamp: $(QUILT_STAMPFN)
165         cp -v $(CONFIG) wpa_supplicant/.config
166         CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) -C wpa_supplicant all
167         
168 -       # wpa_gui
169 -       $(MAKE) -C wpa_supplicant $(WPAGUI)
170 -       
171 -       # manpages
172 -       $(MAKE) -C wpa_supplicant/doc/docbook man
173 -       
174         touch $@
175  
176  clean: unpatch
177 @@ -46,12 +33,6 @@ clean: unpatch
178         
179         $(MAKE) -C wpa_supplicant clean
180         
181 -       if [ -f wpa_supplicant/$(WPAGUI)/Makefile ]; then \
182 -               $(MAKE) -C wpa_supplicant/$(WPAGUI) distclean ; \
183 -       fi
184 -       
185 -       $(MAKE) -C wpa_supplicant/doc/docbook clean
186 -       
187         dh_clean wpa_supplicant/.config build-stamp install-stamp
188  
189  install: build
190 @@ -61,15 +42,6 @@ install: build
191         dh_installdirs
192         dh_install
193         
194 -       # wpa_gui
195 -       dh_install --package=wpagui wpa_supplicant/$(WPAGUI)/wpa_gui usr/sbin/
196 -       
197 -       # ifupdown
198 -       install --mode=755 -D debian/ifupdown/ifupdown.sh \
199 -               debian/wpasupplicant/etc/wpa_supplicant/ifupdown.sh
200 -       install --mode=755 -D debian/ifupdown/functions.sh \
201 -               debian/wpasupplicant/etc/wpa_supplicant/functions.sh
202 -       
203         # wpa_action
204         install --mode=755 -D debian/ifupdown/wpa_action.sh \
205                 debian/wpasupplicant/sbin/wpa_action
206 @@ -84,6 +56,12 @@ install: build
207         mkdir -p debian/wpasupplicant/usr/share/doc/wpasupplicant
208         sed 's/^\([^#]\+=.*\|}\)/#\1/' < wpa_supplicant/wpa_supplicant.conf \
209                 > debian/wpasupplicant/usr/share/doc/wpasupplicant/README.wpa_supplicant.conf
210 +       
211 +       # Clean output a little
212 +       rm -rf debian/wpasupplicant/etc/network/if*
213 +       rm -rf debian/wpasupplicant/usr/share/doc
214 +       rm -rf debian/wpasupplicant/etc/init.d
215 +       
216  
217  # Build architecture-independent files here.
218  binary-indep: install
219 @@ -92,13 +70,6 @@ binary-indep: install
220  binary-arch: install
221         dh_testdir
222         dh_testroot
223 -       dh_installchangelogs wpa_supplicant/ChangeLog
224 -       dh_installdocs
225 -       dh_installexamples
226 -       dh_installlogrotate --package=wpasupplicant --name=wpa_action
227 -       dh_installlogrotate --package=wpasupplicant --name=wpa_supplicant
228 -       dh_installinit --package=wpasupplicant --name=wpa-ifupdown --no-start -- start 15 0 6 .
229 -       dh_installman
230         dh_link
231         dh_strip
232         dh_compress
233 diff -rup wpasupplicant-0.6.4.orig/debian/wpasupplicant.links wpasupplicant-0.6.4/debian/wpasupplicant.links
234 --- wpasupplicant-0.6.4.orig/debian/wpasupplicant.links 2009-03-02 14:03:10.000000000 +0100
235 +++ wpasupplicant-0.6.4/debian/wpasupplicant.links      2009-02-17 01:54:34.000000000 +0100
236 @@ -1,5 +1 @@
237 -etc/wpa_supplicant/ifupdown.sh etc/network/if-pre-up.d/wpasupplicant
238 -etc/wpa_supplicant/ifupdown.sh etc/network/if-up.d/wpasupplicant
239 -etc/wpa_supplicant/ifupdown.sh etc/network/if-down.d/wpasupplicant
240 -etc/wpa_supplicant/ifupdown.sh etc/network/if-post-down.d/wpasupplicant
241 -usr/share/doc/wpasupplicant/README.Debian usr/share/doc/wpasupplicant/README.modes
242 +
243 diff -rup wpasupplicant-0.6.4.orig/debian/wpasupplicant.postinst wpasupplicant-0.6.4/debian/wpasupplicant.postinst
244 --- wpasupplicant-0.6.4.orig/debian/wpasupplicant.postinst      2009-03-02 14:03:10.000000000 +0100
245 +++ wpasupplicant-0.6.4/debian/wpasupplicant.postinst   2009-02-16 21:09:26.000000000 +0100
246 @@ -17,10 +17,7 @@
247  
248  case "$1" in
249         configure)
250 -               # Add the netdev group unless it's already there
251 -               if ! getent group netdev >/dev/null; then
252 -                       addgroup --quiet --system netdev || true
253 -               fi
254 +
255                 ;;
256         abort-upgrade|abort-deconfigure|abort-remove)
257                 ;;
258 diff -rup wpasupplicant-0.6.4.orig/src/drivers/driver_wext.c wpasupplicant-0.6.4/src/drivers/driver_wext.c
259 --- wpasupplicant-0.6.4.orig/src/drivers/driver_wext.c  2008-08-10 19:33:12.000000000 +0200
260 +++ wpasupplicant-0.6.4/src/drivers/driver_wext.c       2009-03-02 14:04:11.000000000 +0100
261 @@ -628,6 +628,22 @@ static void wpa_driver_wext_event_wirele
262                         os_memcpy(&iwe_buf, pos, sizeof(struct iw_event));
263                         custom += IW_EV_POINT_OFF;
264                 }
265 +               
266 +               if (iwe->cmd == IWEVASSOCREQIE || 
267 +                   iwe->cmd == IWEVASSOCRESPIE) {
268 +                       // Find and ignore bssid: put by the driver
269 +                       while (iwe->u.data.length > 0 && *custom != ':')
270 +                       {
271 +                               custom++;
272 +                               iwe->u.data.length--;
273 +                       }
274 +                       
275 +                       if (iwe->u.data.length > 0)
276 +                       {
277 +                               custom++;
278 +                               iwe->u.data.length--;
279 +                       }
280 +               }
281  
282                 switch (iwe->cmd) {
283                 case SIOCGIWAP:
284 @@ -1221,7 +1237,6 @@ int wpa_driver_wext_scan(void *priv, con
285         struct wpa_driver_wext_data *drv = priv;
286         struct iwreq iwr;
287         int ret = 0, timeout;
288 -       struct iw_scan_req req;
289  
290         if (ssid_len > IW_ESSID_MAX_SIZE) {
291                 wpa_printf(MSG_DEBUG, "%s: too long SSID (%lu)",
292 @@ -1233,14 +1248,13 @@ int wpa_driver_wext_scan(void *priv, con
293         os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
294  
295         if (ssid && ssid_len) {
296 -               os_memset(&req, 0, sizeof(req));
297 -               req.essid_len = ssid_len;
298 -               req.bssid.sa_family = ARPHRD_ETHER;
299 -               os_memset(req.bssid.sa_data, 0xff, ETH_ALEN);
300 -               os_memcpy(req.essid, ssid, ssid_len);
301 -               iwr.u.data.pointer = (caddr_t) &req;
302 -               iwr.u.data.length = sizeof(req);
303 -               iwr.u.data.flags = IW_SCAN_THIS_ESSID;
304 +               wpa_printf(MSG_DEBUG, "Scan requested (ret=%d) - scan timeout %d "
305 +                  "seconds", ret, timeout);
306 +               iwr.u.essid.pointer = (caddr_t) ssid;
307 +               iwr.u.essid.length = ssid_len;
308 +               iwr.u.essid.flags = IW_SCAN_THIS_ESSID;
309 +       } else {
310 +               iwr.u.essid.flags = IW_SCAN_ALL_ESSID;
311         }
312  
313         if (ioctl(drv->ioctl_sock, SIOCSIWSCAN, &iwr) < 0) {
314 diff -rup wpasupplicant-0.6.4.orig/wpa_supplicant/scan.c wpasupplicant-0.6.4/wpa_supplicant/scan.c
315 --- wpasupplicant-0.6.4.orig/wpa_supplicant/scan.c      2008-08-10 19:33:12.000000000 +0200
316 +++ wpasupplicant-0.6.4/wpa_supplicant/scan.c   2009-02-20 13:25:51.000000000 +0100
317 @@ -140,6 +140,7 @@ static void wpa_supplicant_scan(void *el
318                 wpa_printf(MSG_DEBUG, "Trying to get current scan results "
319                            "first without requesting a new scan to speed up "
320                            "initial association");
321 +               wpa_s->prev_scan_ssid = BROADCAST_SSID_SCAN;
322                 wpa_supplicant_event(wpa_s, EVENT_SCAN_RESULTS, NULL);
323                 return;
324         }