#811: 0.9.2 fails to compile on RHEL3 kernels
----------------------------+-----------------------------------------------
Reporter: anonymous | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: madwifi: other | Version:
Keywords: | Patch_attached: 1
----------------------------+-----------------------------------------------
I am attempting to compile 0.9.2 on Centos 3 (kernel 2.4.21-32.0.1.EL).
I get the following error:
{{{
[EMAIL PROTECTED] madwifi-0.9.2]# make KERNELPATH=/usr/src/linux-2.4.21-
32.0.1.EL
[snip]
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21-32.0.1.EL/include -Wall -Wstrict-
prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Wno-
unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-
boundary=2 -march=athlon -DMODULE -DMODVERSIONS -include
/usr/src/linux-2.4.21-32.0.1.EL/include/linux/modversions.h -include
./../include/compat.h -I./../include -I./../hal -I./../hal/linux
-I./../net80211 -I./.. -Werror -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN -fomit-
frame-pointer -DATH_SUPERG_FF=1 -DATH_SUPERG_DYNTURBO=1 -DATH_TURBO_SCAN=1
-DATH_SUPERG_XR=1 -nostdinc -iwithprefix include
-DKBUILD_BASENAME=ieee80211_wireless -DEXPORT_SYMTAB -c
ieee80211_wireless.c
ieee80211_wireless.c: In function `ieee80211_ioctl_setthrspy':
ieee80211_wireless.c:1144: storage size of `threshold' isn't known
ieee80211_wireless.c:1152: sizeof applied to an incomplete type
ieee80211_wireless.c:1152: sizeof applied to an incomplete type
ieee80211_wireless.c:1152: sizeof applied to an incomplete type
ieee80211_wireless.c: In function `ieee80211_ioctl_getthrspy':
ieee80211_wireless.c:1184: dereferencing pointer to incomplete type
ieee80211_wireless.c:1185: dereferencing pointer to incomplete type
make[3]: *** [ieee80211_wireless.o] Error 1
make[3]: Leaving directory
`/usr/src/redhat/SOURCES/madwifi-0.9.2/net80211'
make[2]: *** [_mod_/usr/src/redhat/SOURCES/madwifi-0.9.2/net80211] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.21-32.0.1.EL'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/usr/src/redhat/SOURCES/madwifi-0.9.2/net80211'
make: *** [modules] Error 1
[EMAIL PROTECTED] madwifi-0.9.2]#
}}}
If I backout changeset 1668, with the following patch, then the module
compiles fine.
{{{
diff -uNr madwifi-0.9.2/net80211/ieee80211_input.c
madwifi-0.9.2.patched/net80211/ieee80211_input.c
--- madwifi-0.9.2/net80211/ieee80211_input.c 2006-07-06
05:23:08.000000000 +0200
+++ madwifi-0.9.2.patched/net80211/ieee80211_input.c 2006-08-08
21:39:18.000000000 +0200
@@ -46,9 +46,6 @@
#include <linux/etherdevice.h>
#include <linux/random.h>
#include <linux/if_vlan.h>
-#include <net/iw_handler.h> /* wireless_send_event(..) */
-#include <linux/wireless.h> /* SIOCGIWTHRSPY */
-#include <linux/if_arp.h> /* ARPHRD_ETHER */
#include "if_llc.h"
#include "if_ethersubr.h"
@@ -129,83 +126,6 @@
static unsigned short ath_eth_type_trans(struct sk_buff *, struct
net_device *);
#endif
-/* Enhanced iwspy support */
-#ifdef CONFIG_NET_WIRELESS
-#if WIRELESS_EXT >= 16
-
-#ifndef IW_QUAL_QUAL_UPDATED
-#define IW_QUAL_QUAL_UPDATED 0x01
-#define IW_QUAL_LEVEL_UPDATED 0x02
-#define IW_QUAL_NOISE_UPDATED 0x04
-#endif /* IW_QUAL_QUAL_UPDATED */
-
-/**
- * This function is a clone of set_quality(..) in ieee80211_wireless.c
- */
-static void
-set_quality(struct iw_quality *iq, u_int rssi)
-{
- iq->qual = rssi;
- /* NB: max is 94 because noise is hardcoded to 161 */
- if (iq->qual > 94)
- iq->qual = 94;
-
- iq->noise = 161; /* -95dBm */
- iq->level = iq->noise + iq->qual;
- iq->updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED |
- IW_QUAL_NOISE_UPDATED;
-}
-
-/**
- * Given a node and the rssi value of a just received frame from the
node, this
- * function checks if to raise an iwspy event because we iwspy the node
and rssi
- * exceeds threshold (if active).
- *
- * @param vap: vap
- * @param ni: sender node
- * @param rssi: rssi value of received frame
- */
-static void
-iwspy_event(struct ieee80211vap *vap, struct ieee80211_node *ni, u_int
rssi)
-{
- if (vap->iv_spy.thr_low && vap->iv_spy.num && ni && (rssi <
- vap->iv_spy.thr_low || rssi > vap->iv_spy.thr_high)) {
- int i;
- for (i = 0; i < vap->iv_spy.num; i++) {
- if (IEEE80211_ADDR_EQ(ni->ni_macaddr,
- &(vap->iv_spy.mac[i *
IEEE80211_ADDR_LEN]))) {
-
- union iwreq_data wrq;
- struct iw_thrspy thr;
- IEEE80211_DPRINTF(vap,
IEEE80211_MSG_DEBUG,
- "%s: we spy %s, threshold is
active "
- "and rssi exceeds it -> raise an
iwspy"
- " event\n", __func__,
ether_sprintf(
- ni->ni_macaddr));
- memset(&wrq, 0, sizeof(wrq));
- wrq.data.length = 1;
- memset(&thr, 0, sizeof(struct iw_thrspy));
- memcpy(thr.addr.sa_data, ni->ni_macaddr,
- IEEE80211_ADDR_LEN);
- thr.addr.sa_family = ARPHRD_ETHER;
- set_quality(&thr.qual, rssi);
- set_quality(&thr.low,
vap->iv_spy.thr_low);
- set_quality(&thr.high,
vap->iv_spy.thr_high);
- wireless_send_event(vap->iv_dev,
- SIOCGIWTHRSPY, &wrq, (char*)
&thr);
- break;
- }
- }
- }
-}
-
-#else
-#define iwspy_event(_vap, _ni, _rssi)
-#endif /* WIRELESS_EXT >= 16 */
-#else
-#define iwspy_event(_vap, _ni, _rssi)
-#endif /* CONFIG_NET_WIRELESS */
-
/*
* Process a received frame. The node associated with the sender
* should be supplied. If nothing was found in the node table then
@@ -292,7 +212,6 @@
vap->iv_stats.is_rx_wrongbss++;
goto out;
}
- iwspy_event(vap, ni, rssi);
break;
case IEEE80211_M_IBSS:
case IEEE80211_M_AHDEMO:
@@ -331,7 +250,6 @@
}
}
}
- iwspy_event(vap, ni, rssi);
break;
case IEEE80211_M_HOSTAP:
if (dir != IEEE80211_FC1_DIR_NODS)
diff -uNr madwifi-0.9.2/net80211/ieee80211_var.h
madwifi-0.9.2.patched/net80211/ieee80211_var.h
--- madwifi-0.9.2/net80211/ieee80211_var.h 2006-07-06
05:23:08.000000000 +0200
+++ madwifi-0.9.2.patched/net80211/ieee80211_var.h 2006-08-08
21:37:26.000000000 +0200
@@ -262,8 +262,6 @@
#define IW_MAX_SPY 8
struct ieee80211_spy {
u_int8_t mac[IW_MAX_SPY * IEEE80211_ADDR_LEN];
- u_int8_t thr_low; /* 1 byte rssi value, 0 = threshold is off
*/
- u_int8_t thr_high; /* 1 byte rssi value */
u_int8_t num;
};
diff -uNr madwifi-0.9.2/net80211/ieee80211_wireless.c
madwifi-0.9.2.patched/net80211/ieee80211_wireless.c
--- madwifi-0.9.2/net80211/ieee80211_wireless.c 2006-07-06
05:23:08.000000000 +0200
+++ madwifi-0.9.2.patched/net80211/ieee80211_wireless.c 2006-08-08
21:37:26.000000000 +0200
@@ -1135,61 +1135,6 @@
return 0;
}
-/* Enhanced iwspy support */
-static int
-ieee80211_ioctl_setthrspy(struct net_device *dev, struct iw_request_info
*info,
- struct iw_point *data, char *extra)
-{
- struct ieee80211vap *vap = dev->priv;
- struct iw_thrspy threshold;
-
- if (data->length != 1)
- return -EINVAL;
-
- /* get the threshold values into the driver */
- if (data->pointer) {
- if (copy_from_user(&threshold, data->pointer,
- sizeof(struct iw_thrspy)))
- return -EFAULT;
- } else
- return -EINVAL;
-
- if (threshold.low.level == 0) {
- /* disable threshold */
- vap->iv_spy.thr_low = 0;
- vap->iv_spy.thr_high = 0;
- IEEE80211_DPRINTF(vap, IEEE80211_MSG_DEBUG,
- "%s: disabled iw_spy threshold\n", __func__);
- } else {
- /* calculate corresponding rssi values */
- vap->iv_spy.thr_low = threshold.low.level - 161;
- vap->iv_spy.thr_high = threshold.high.level - 161;
- IEEE80211_DPRINTF(vap, IEEE80211_MSG_DEBUG,
- "%s: enabled iw_spy threshold\n", __func__);
- }
-
- return 0;
-}
-
-static int
-ieee80211_ioctl_getthrspy(struct net_device *dev, struct iw_request_info
*info,
- struct iw_point *data, char *extra)
-{
- struct ieee80211vap *vap = dev->priv;
- struct iw_thrspy *threshold;
-
- threshold = (struct iw_thrspy *) extra;
-
- /* set threshold values */
- set_quality(&(threshold->low), vap->iv_spy.thr_low);
- set_quality(&(threshold->high), vap->iv_spy.thr_high);
-
- /* copy results to userspace */
- data->length = 1;
-
- return 0;
-}
-
static int
ieee80211_ioctl_siwmode(struct net_device *dev, struct iw_request_info
*info,
__u32 *mode, char *extra)
@@ -4855,8 +4800,8 @@
(iw_handler) NULL /* kernel code */, /* SIOCGIWSTATS */
(iw_handler) ieee80211_ioctl_setspy, /* SIOCSIWSPY */
(iw_handler) ieee80211_ioctl_getspy, /* SIOCGIWSPY */
- (iw_handler) ieee80211_ioctl_setthrspy, /* SIOCSIWTHRSPY
*/
- (iw_handler) ieee80211_ioctl_getthrspy, /* SIOCGIWTHRSPY
*/
+ (iw_handler) NULL, /* -- hole -- */
+ (iw_handler) NULL, /* -- hole -- */
(iw_handler) ieee80211_ioctl_siwap, /* SIOCSIWAP */
(iw_handler) ieee80211_ioctl_giwap, /* SIOCGIWAP */
#ifdef SIOCSIWMLME
}}}
--
Ticket URL: <http://madwifi.org/ticket/811>
MadWifi <http://madwifi.org/>
Multiband Atheros Driver for Wireless Fidelity-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Madwifi-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/madwifi-tickets