I'm pretty new to all of this so sorry about the large amount of nonsense this post is comprised of as I try and word what I want to say.

I am trying to compile the MadWiFi kernel module but unfortunately getting the error below. The problem (AFAIK) is that the kernel headers I am using have a new struct to replace net\_device. 

Can I use a different set of kernel headers to compile it against or would the resulting module not be compatible with my kernel?

```
make -C /lib/modules/2.6.32-5-686/build SUBDIRS=/home/madwifi-0.9.4 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-686'
make[1]: Warning: File `Makefile' has modification time 4.2e+08 s in the future
make[2]: Warning: File `Makefile' has modification time 4.2e+08 s in the future
make[3]: Warning: File `/usr/src/linux-headers-2.6.32-5-common/arch/x86/Makefile_32.cpu' has modification time 4.2e+08 s in the future
make[4]: Warning: File `scripts/Makefile.lib' has modification time 3.1e+08 s in the future
make[5]: Warning: File `scripts/Makefile.lib' has modification time 3.1e+08 s in the future
  CC [M]  /home/madwifi-0.9.4/ath/if_ath.o
In file included from /home/madwifi-0.9.4/ath/../net80211/ieee80211_monitor.h:45,
                 from /home/madwifi-0.9.4/ath/if_ath.c:71:
/home/madwifi-0.9.4/ath/../ath/if_athvar.h:98: error: conflicting types for 'irqreturn_t'
/usr/src/linux-headers-2.6.32-5-common/include/linux/irqreturn.h:16: error: previous declaration of 'irqreturn_t' was here
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_attach':
/home/madwifi-0.9.4/ath/if_ath.c:402: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c:678: error: 'struct net_device' has no member named 'open'
/home/madwifi-0.9.4/ath/if_ath.c:679: error: 'struct net_device' has no member named 'stop'
/home/madwifi-0.9.4/ath/if_ath.c:680: error: 'struct net_device' has no member named 'hard_start_xmit'
/home/madwifi-0.9.4/ath/if_ath.c:681: error: 'struct net_device' has no member named 'tx_timeout'
/home/madwifi-0.9.4/ath/if_ath.c:683: error: 'struct net_device' has no member named 'set_multicast_list'
/home/madwifi-0.9.4/ath/if_ath.c:684: error: 'struct net_device' has no member named 'do_ioctl'
/home/madwifi-0.9.4/ath/if_ath.c:685: error: 'struct net_device' has no member named 'get_stats'
/home/madwifi-0.9.4/ath/if_ath.c:686: error: 'struct net_device' has no member named 'set_mac_address'
/home/madwifi-0.9.4/ath/if_ath.c:687: error: 'struct net_device' has no member named 'change_mtu'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_detach':
/home/madwifi-0.9.4/ath/if_ath.c:958: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c:1005: error: 'struct net_device' has no member named 'stop'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_vap_create':
/home/madwifi-0.9.4/ath/if_ath.c:1014: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c:1084: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_vap_delete':
/home/madwifi-0.9.4/ath/if_ath.c:1248: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_suspend':
/home/madwifi-0.9.4/ath/if_ath.c:1350: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_resume':
/home/madwifi-0.9.4/ath/if_ath.c:1359: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_intr':
/home/madwifi-0.9.4/ath/if_ath.c:1652: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_bmiss_tasklet':
/home/madwifi-0.9.4/ath/if_ath.c:1843: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_init':
/home/madwifi-0.9.4/ath/if_ath.c:1886: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_stop_locked':
/home/madwifi-0.9.4/ath/if_ath.c:2014: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_stop':
/home/madwifi-0.9.4/ath/if_ath.c:2078: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_reset':
/home/madwifi-0.9.4/ath/if_ath.c:2182: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_startraw':
/home/madwifi-0.9.4/ath/if_ath.c:2343: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_hardstart':
/home/madwifi-0.9.4/ath/if_ath.c:2558: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_mgtstart':
/home/madwifi-0.9.4/ath/if_ath.c:2875: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_key_alloc':
/home/madwifi-0.9.4/ath/if_ath.c:3237: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_key_delete':
/home/madwifi-0.9.4/ath/if_ath.c:3304: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_key_set':
/home/madwifi-0.9.4/ath/if_ath.c:3380: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_key_update_begin':
/home/madwifi-0.9.4/ath/if_ath.c:3395: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_key_update_end':
/home/madwifi-0.9.4/ath/if_ath.c:3416: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_mode_init':
/home/madwifi-0.9.4/ath/if_ath.c:3504: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_updateslot':
/home/madwifi-0.9.4/ath/if_ath.c:3555: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_beacon_dturbo_config':
/home/madwifi-0.9.4/ath/if_ath.c:3585: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_beacon_dturbo_update':
/home/madwifi-0.9.4/ath/if_ath.c:3633: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_turbo_switch_mode':
/home/madwifi-0.9.4/ath/if_ath.c:3776: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_bstuck_tasklet':
/home/madwifi-0.9.4/ath/if_ath.c:4368: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_node_alloc':
/home/madwifi-0.9.4/ath/if_ath.c:4820: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_node_cleanup':
/home/madwifi-0.9.4/ath/if_ath.c:4855: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_node_free':
/home/madwifi-0.9.4/ath/if_ath.c:4909: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_rx_capture':
/home/madwifi-0.9.4/ath/if_ath.c:5404: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_capture':
/home/madwifi-0.9.4/ath/if_ath.c:5437: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_recv_mgmt':
/home/madwifi-0.9.4/ath/if_ath.c:5502: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_rx_tasklet':
/home/madwifi-0.9.4/ath/if_ath.c:5574: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_grppoll_start':
/home/madwifi-0.9.4/ath/if_ath.c:6013: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_grppoll_stop':
/home/madwifi-0.9.4/ath/if_ath.c:6226: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_wme_update':
/home/madwifi-0.9.4/ath/if_ath.c:6441: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_uapsd_flush':
/home/madwifi-0.9.4/ath/if_ath.c:6460: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_start':
/home/madwifi-0.9.4/ath/if_ath.c:6655: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_tasklet_q0':
/home/madwifi-0.9.4/ath/if_ath.c:7495: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_tasklet_q0123':
/home/madwifi-0.9.4/ath/if_ath.c:7516: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_tasklet':
/home/madwifi-0.9.4/ath/if_ath.c:7551: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_timeout':
/home/madwifi-0.9.4/ath/if_ath.c:7574: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_calibrate':
/home/madwifi-0.9.4/ath/if_ath.c:7937: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_scan_start':
/home/madwifi-0.9.4/ath/if_ath.c:8003: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_scan_end':
/home/madwifi-0.9.4/ath/if_ath.c:8023: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_set_channel':
/home/madwifi-0.9.4/ath/if_ath.c:8041: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_set_coverageclass':
/home/madwifi-0.9.4/ath/if_ath.c:8057: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_mhz2ieee':
/home/madwifi-0.9.4/ath/if_ath.c:8067: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_newstate':
/home/madwifi-0.9.4/ath/if_ath.c:8082: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_setup_stationkey':
/home/madwifi-0.9.4/ath/if_ath.c:8471: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_newassoc':
/home/madwifi-0.9.4/ath/if_ath.c:8631: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_getchannels':
/home/madwifi-0.9.4/ath/if_ath.c:8662: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_xr_rate_setup':
/home/madwifi-0.9.4/ath/if_ath.c:8832: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_setup_subrates':
/home/madwifi-0.9.4/ath/if_ath.c:8861: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_rate_setup':
/home/madwifi-0.9.4/ath/if_ath.c:8904: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_getstats':
/home/madwifi-0.9.4/ath/if_ath.c:9141: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_set_mac_address':
/home/madwifi-0.9.4/ath/if_ath.c:9164: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_change_mtu':
/home/madwifi-0.9.4/ath/if_ath.c:9196: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_ioctl':
/home/madwifi-0.9.4/ath/if_ath.c:9283: error: 'struct net_device' has no member named 'priv'
cc1: warnings being treated as errors
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_sysctl_halparam':
/home/madwifi-0.9.4/ath/if_ath.c:9370: error: passing argument 5 of 'proc_dointvec' from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9370: error: too many arguments to function 'proc_dointvec'
/home/madwifi-0.9.4/ath/if_ath.c:9562: error: passing argument 5 of 'proc_dointvec' from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9562: error: too many arguments to function 'proc_dointvec'
/home/madwifi-0.9.4/ath/if_ath.c: At top level:
/home/madwifi-0.9.4/ath/if_ath.c:9574: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9580: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9586: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9592: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9598: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9604: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9610: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9616: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9623: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9630: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9636: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9642: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9648: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9654: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9660: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9667: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9673: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9680: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9686: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_announce':
/home/madwifi-0.9.4/ath/if_ath.c:9779: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_rcv_dev_event':
/home/madwifi-0.9.4/ath/if_ath.c:9926: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c:9928: error: 'struct net_device' has no member named 'open'
make[5]: *** [/home/madwifi-0.9.4/ath/if_ath.o] Error 1
make[4]: *** [/home/madwifi-0.9.4/ath] Error 2
make[3]: *** [_module_/home/madwifi-0.9.4] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-686'
make: *** [modules] Error 2

```

More info on my kernel:

```
root@alix:~# cat /proc/version
Linux version 2.6.32-5-686 (Debian 2.6.32-45) (dannf@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Sun May 6 04:01:19 UTC 2012

root@alix:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 6.0.5 (squeeze)
Release:    6.0.5
Codename:   squeeze

```