1 diff -ur kismet-2007-01-R1b/config.h.in temp/config.h.in
2 --- kismet-2007-01-R1b/config.h.in 2006-10-13 16:50:32.000000000 -0400
3 +++ temp/config.h.in 2007-01-17 10:02:43.000000000 -0500
5 /* Libz compression lib */
8 +/* Linux wireless iwfreq.flag */
9 +#undef HAVE_LINUX_IWFREQFLAG
11 /* Linux netlink socket capture present */
12 #undef HAVE_LINUX_NETLINK
14 diff -ur kismet-2007-01-R1b/configure temp/configure
15 --- kismet-2007-01-R1b/configure 2006-12-27 09:32:52.000000000 -0500
16 +++ temp/configure 2007-01-17 10:02:43.000000000 -0500
17 @@ -7795,6 +7795,92 @@
22 + { echo "$as_me:$LINENO: checking can we use iw_freq.flags" >&5
23 +echo $ECHO_N "checking can we use iw_freq.flags... $ECHO_C" >&6; }
24 + cat >conftest.$ac_ext <<_ACEOF
27 +cat confdefs.h >>conftest.$ac_ext
28 +cat >>conftest.$ac_ext <<_ACEOF
29 +/* end confdefs.h. */
32 + #include <sys/types.h>
33 + #include <netinet/in.h>
34 + #include <asm/types.h>
35 + #include <linux/if.h>
36 + #include <linux/wireless.h>
43 + wrq.u.freq.flags = IW_FREQ_FIXED;
49 +rm -f conftest.$ac_objext conftest$ac_exeext
50 +if { (ac_try="$ac_link"
52 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
53 + *) ac_try_echo=$ac_try;;
55 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
56 + (eval "$ac_link") 2>conftest.er1
58 + grep -v '^ *+' conftest.er1 >conftest.err
60 + cat conftest.err >&5
61 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
62 + (exit $ac_status); } &&
63 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
64 + { (case "(($ac_try" in
65 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
66 + *) ac_try_echo=$ac_try;;
68 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
69 + (eval "$ac_try") 2>&5
71 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
72 + (exit $ac_status); }; } &&
73 + { ac_try='test -s conftest$ac_exeext'
74 + { (case "(($ac_try" in
75 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
76 + *) ac_try_echo=$ac_try;;
78 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
79 + (eval "$ac_try") 2>&5
81 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
82 + (exit $ac_status); }; }; then
85 + echo "$as_me: failed program was:" >&5
86 +sed 's/^/| /' conftest.$ac_ext >&5
91 +rm -f core conftest.err conftest.$ac_objext \
92 + conftest$ac_exeext conftest.$ac_ext
94 + if test "$iwfreqflag" = "no"; then
95 + { echo "$as_me:$LINENO: result: no" >&5
96 +echo "${ECHO_T}no" >&6; }
98 + { echo "$as_me:$LINENO: result: yes" >&5
99 +echo "${ECHO_T}yes" >&6; }
101 +cat >>confdefs.h <<\_ACEOF
102 +#define HAVE_LINUX_IWFREQFLAG 1
110 diff -ur kismet-2007-01-R1b/configure.in temp/configure.in
111 --- kismet-2007-01-R1b/configure.in 2006-12-27 09:32:52.000000000 -0500
112 +++ temp/configure.in 2007-01-17 10:02:43.000000000 -0500
114 AC_DEFINE(HAVE_LINUX_WIRELESS22, 1, [Linux wireless extentions v22 or better present])
118 + AC_MSG_CHECKING(can we use iw_freq.flags)
119 + AC_LINK_IFELSE([AC_LANG_PROGRAM([[
121 + #include <sys/types.h>
122 + #include <netinet/in.h>
123 + #include <asm/types.h>
124 + #include <linux/if.h>
125 + #include <linux/wireless.h>
128 + wrq.u.freq.flags = IW_FREQ_FIXED;
129 + ]])],[iwfreqflag=yes],[iwfreqflag=no])
131 + if test "$iwfreqflag" = "no"; then
135 + AC_DEFINE(HAVE_LINUX_IWFREQFLAG, 1, [Linux wireless iwfreq.flag])
141 diff -ur kismet-2007-01-R1b/iwcontrol.cc temp/iwcontrol.cc
142 --- kismet-2007-01-R1b/iwcontrol.cc 2006-11-17 11:13:23.000000000 -0500
143 +++ temp/iwcontrol.cc 2007-01-17 10:02:43.000000000 -0500
145 memset(&wrq, 0, sizeof(struct iwreq));
147 strncpy(wrq.ifr_name, in_dev, IFNAMSIZ);
148 +#ifdef HAVE_LINUX_IWFREQFLAG
149 wrq.u.freq.flags = IW_FREQ_FIXED;
151 IwFloat2Freq(in_ch, &wrq.u.freq);
153 // Try twice with a tiny delay, some cards (madwifi) need a second chance...