LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-25-2009, 02:04 AM   #1
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Rep: Reputation: 15
Madwifi


I am trying to compile madwifi-0.9.4 and create an access point on a linux box which is currently acting as a nat.

Linux version 2.6.18-92.1.22.el5xen (mockbuild@builder16.centos.org) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42))

This is the link which was in build -> ../../../usr/src/kernels/2.6.18-92.1.22.el5-xen-i686
I removed that link and changed this link to ../../../usr/src/kernels/2.6.18-128.1.10.el5-xen-i686

This is what is listed under /usr/src/kernels/2.6.18-128.1.10.el5-xen-i686


drwxr-xr-x 26 root root 4096 May 25 00:06 arch
drwxr-xr-x 2 root root 4096 May 25 00:06 block
drwxr-xr-x 4 root root 4096 May 25 00:06 crypto
drwxr-xr-x 65 root root 4096 May 25 00:06 drivers
drwxr-xr-x 66 root root 4096 May 25 00:06 fs
drwxr-xr-x 19 root root 4096 May 25 00:06 include
drwxr-xr-x 2 root root 4096 May 25 00:06 init
drwxr-xr-x 2 root root 4096 May 25 00:06 ipc
-rw-r--r-- 1 root root 57326 May 7 12:18 kabi_whitelist
drwxr-xr-x 5 root root 4096 May 25 00:06 kernel
drwxr-xr-x 5 root root 4096 May 25 00:06 lib
-rw-r--r-- 1 root root 48181 May 7 12:19 Makefile
drwxr-xr-x 2 root root 4096 May 25 00:06 mm
-rw-r--r-- 1 root root 167736 May 7 12:19 Module.kabi
-rw-r--r-- 1 root root 1089 May 7 12:19 Module.markers
-rw-r--r-- 1 root root 373792 May 7 12:19 Module.symvers
drwxr-xr-x 41 root root 4096 May 25 00:06 net
drwxr-xr-x 4 root root 4096 May 25 00:06 samples
drwxr-xr-x 10 root root 4096 May 25 00:06 scripts
drwxr-xr-x 4 root root 4096 May 25 00:06 security
drwxr-xr-x 18 root root 4096 May 25 00:06 sound
-rw-r--r-- 1 root root 46693 May 7 12:19 symsets-2.6.18-128.1.10.el5xen.tar.gz
drwxr-xr-x 2 root root 4096 May 25 00:06 usr




Checking requirements... ok.
Checking kernel configuration... ok.
make -C /lib/modules/2.6.18-92.1.22.el5xen/build SUBDIRS=/home/keith/wifi/madwifi-0.9.4 modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-128.1.10.el5-xen-i686'
CC [M] /home/keith/wifi/madwifi-0.9.4/ath/if_ath.o
In file included from <command line>:1:
/home/keith/wifi/madwifi-0.9.4/ath/../include/compat.h:140: error: redefinition of 'skb_end_pointer'
include/linux/skbuff.h:417: error: previous definition of 'skb_end_pointer' was here
/home/keith/wifi/madwifi-0.9.4/ath/../include/compat.h:145: error: redefinition of 'skb_tail_pointer'
include/linux/skbuff.h:835: error: previous definition of 'skb_tail_pointer' was here
/home/keith/wifi/madwifi-0.9.4/ath/../include/compat.h:150: error: redefinition of 'skb_set_network_header'
include/linux/skbuff.h:1021: error: previous definition of 'skb_set_network_header' was here
/home/keith/wifi/madwifi-0.9.4/ath/../include/compat.h:155: error: redefinition of 'skb_reset_network_header'
include/linux/skbuff.h:1016: error: previous definition of 'skb_reset_network_header' was here
/home/keith/wifi/madwifi-0.9.4/ath/../include/compat.h:160: error: redefinition of 'skb_mac_header'
include/linux/skbuff.h:1036: error: previous definition of 'skb_mac_header' was here
/home/keith/wifi/madwifi-0.9.4/ath/../include/compat.h:165: error: redefinition of 'skb_reset_mac_header'
include/linux/skbuff.h:1046: error: previous definition of 'skb_reset_mac_header' was here
make[3]: *** [/home/keith/wifi/madwifi-0.9.4/ath/if_ath.o] Error 1
make[2]: *** [/home/keith/wifi/madwifi-0.9.4/ath] Error 2
make[1]: *** [_module_/home/keith/wifi/madwifi-0.9.4] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-128.1.10.el5-xen-i686'
make: *** [modules] Error 2

I am not sure if I have the source code for the kernel installed, this is where I am lost. I see `/usr/src/kernels/2.6.18-128.1.10.el5-xen-i686'.

Thanks again

Keith
 
Old 05-25-2009, 04:44 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Hi Keith,
A couple of suggestions:
1. if you're not sure of what kernel you're running (and want to build a module for) the type
Code:
uname -a
in a terminal.
2. For building a module I always use module-assistant which makes everything quite simple. You should be able to find a package for your distro. You will need the headers for your kernel but m-a will download them for you if you don't have them installed.
Cheers,
jdk
 
Old 05-25-2009, 05:12 AM   #3
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Original Poster
Rep: Reputation: 15
Headers

Hello,

I was able to install madwifi with apt-get, I also have the headers and kernel-devel to match my kernel version. When I modprobe ath_pci I get
FATAL: Module ath_pci not found. I tried to do a find for ath_pci I can't locate this module which is leading me to believe it was not compiled? I will look at what you suggested and any other help would be appreciated.

Thanks again,

Also this is the Kernel I am using Linux 2.6.18-92.1.22.el5xen
 
Old 05-25-2009, 09:14 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
I think you need to install the module with module-assistant. Using apt-get will install the source but then you must build the module with m-a.
This link may help:
http://madwifi-project.org/wiki/User...Debian/MadWifi
Cheers,
jdk
 
Old 05-25-2009, 02:36 PM   #5
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Original Poster
Rep: Reputation: 15
Module assistant

Hello,

I appreciate the suggestions but module assistant seems to be for debian, I can't locate a rpm or redhat version for centos. It seems really easy on Debian boxes from what I have been reading. If anyone could give me some pointers on how to resolve my issue with compiling the module it would be helpful. As I said I used apt-get which was part of the dag repo for redhat to install madwifi. I had no errors during the install but I cannot find ath_pci anywhere on my system, its leading me to believe it was not installed?

Thanks again,

Keith
 
Old 05-25-2009, 02:41 PM   #6
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Code:
# lsmod
- You may find it is installed and its the firmware for the card you need, or someother factor; you'd not be the first to make that mistake
 
Old 05-25-2009, 03:44 PM   #7
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Original Poster
Rep: Reputation: 15
lsmod

Here are what I have for modules, the card I installed is a TP-Link TL-WN651G Ver 1.5. How can I tell if the module it needs is listed, I thought it should be ath0_pci for madwifi?

Module Size Used by
i915 23873 2
drm 66901 3 i915
netloop 10945 0
netbk 78401 0 [permanent]
blktap 115941 2 [permanent]
blkbk 22241 0 [permanent]
ipt_REJECT 9537 2
bridge 53597 0
autofs4 24517 2
hidp 23105 2
rfcomm 42457 0
l2cap 29505 10 hidp,rfcomm
bluetooth 53797 5 hidp,rfcomm,l2cap
sunrpc 144893 1
ip_conntrack_ftp 11697 0
ip_conntrack_netbios_ns 6977 0
ipt_MASQUERADE 7617 3
iptable_nat 11205 1
ip_nat 21101 2 ipt_MASQUERADE,iptable_nat
xt_state 6209 9
ip_conntrack 53025 6 ip_conntrack_ftp,ip_conntrack_netbios_ns,ipt_MASQUERADE,iptable_nat,ip_nat,xt_state
nfnetlink 10713 2 ip_nat,ip_conntrack
iptable_filter 7105 1
ip_tables 17029 2 iptable_nat,iptable_filter
ip6t_REJECT 9409 1
xt_tcpudp 7105 34
ip6table_filter 6849 1
ip6_tables 18053 1 ip6table_filter
x_tables 17349 8 ipt_REJECT,ipt_MASQUERADE,iptable_nat,xt_state,ip_tables,ip6t_REJECT,xt_tcpudp,ip6_tables
dm_multipath 22089 0
video 21193 0
sbs 18533 0
backlight 10049 1 video
i2c_ec 9025 1 sbs
button 10705 0
battery 13637 0
asus_acpi 19289 0
ac 9157 0
ipv6 258273 27 ip6t_REJECT
xfrm_nalgo 13765 1 ipv6
crypto_api 11969 1 xfrm_nalgo
lp 15849 0
floppy 54949 0
b44 30541 0
i2c_i810 9285 0
parport_pc 29157 1
parport 37641 2 lp,parport_pc
i2c_algo_bit 12489 1 i2c_i810
mii 9409 1 b44
pcspkr 7105 0
tulip 52193 0
i2c_i801 11597 0
i2c_core 23745 3 i2c_ec,i2c_algo_bit,i2c_i801
ide_cd 40033 0
cdrom 36705 1 ide_cd
serial_core 23617 0
serio_raw 10693 0
dm_snapshot 21477 0
dm_zero 6209 0
dm_mirror 29381 0
dm_mod 61405 9 dm_multipath,dm_snapshot,dm_zero,dm_mirror
ata_piix 22341 0
libata 144637 1 ata_piix
sd_mod 24897 0
scsi_mod 134861 2 libata,sd_mod
ext3 123593 2
jbd 56553 1 ext3
uhci_hcd 25677 0
ohci_hcd 23517 0
ehci_hcd 33741 0

Thanks again,

Keith
 
Old 05-25-2009, 06:39 PM   #8
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Original Poster
Rep: Reputation: 15
kernel-source

Also I did yum install kernel-xen-devel which it installed in /usr/src/kernels

drwxr-xr-x 20 root root 4096 May 25 18:31 2.6.18-128.1.10.el5-xen-i686
lrwxrwxrwx 1 root root 28 May 25 15:27 2.6.18-128.1.10.el5xen-i686 -> 2.6.18-128.1.10.el5-xen-i686
drwxr-xr-x 18 root root 4096 May 25 04:41 2.6.18-92.1.22.el5.centos.plus-i686


Uname -a gives me Linux TrunkmonkeyNat 2.6.18-92.1.22.el5xen #1 SMP Tue Dec 16 13:08:49 EST 2008 i686 i686 i386 GNU/Linux.

When I run make in the madwifi directory I get this error

madwifi-0.9.4]# make
./kernelversion.c:13:30: error: linux/utsrelease.h: No such file or directory
Makefile.inc:91: *** KERNELCONF: /lib/modules/2.6.18-92.1.22.el5xen/build/.config does not exist.. Stop.

This is what I have for a soft link in /lib/modules/2.6.18-92.1.22.el5xen/build
lrwxrwxrwx 1 root root 45 May 25 15:37 2.6.18-128.1.10.el5-xen-i686 -> /usr/src/kernels/2.6.18-128.1.10.el5-xen-i686

I believe there is something wrong with how I have the kernel-devel and or the link set up.

Thanks again,

Keith
 
Old 05-26-2009, 12:29 AM   #9
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Sorry Keith,
I guess modules are built differently in RH. sounds very complicated. Good luck.
jdk
 
Old 05-26-2009, 04:50 PM   #10
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Original Poster
Rep: Reputation: 15
modprobe

Hello,

This is where I stand now, I have the modules installed when I do lsmod this is what I have for ath

lsmod | grep ath

dm_multipath 24013 0
scsi_dh 11713 1 dm_multipath
ath_pci 87716 0
ath_rate_sample 16896 1 ath_pci
wlan 172380 2 ath_pci,ath_rate_sample
ath_hal 195280 2 ath_pci,ath_rate_sample
ath5k 98281 0
mac80211 137801 1 ath5k
cfg80211 30793 2 ath5k,mac80211
dm_mod 62201 11 dm_multipath,dm_raid45,dm_snapshot,dm_zero,dm_mirror,dm_log.

I installed madwifi with yum, after the install I ran the command for modprob ath_pci it showed up in my ifconfig at Wlan0 Master. When I rebooted the box it hung would not reboot I had to power it off. After reboot the module was not loaded, when trying modprobe it was not listed in ifconfig.

Any ideas?

Keith
 
Old 05-27-2009, 12:37 AM   #11
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by keyboard1973 View Post
When I run make in the madwifi directory I get this error

madwifi-0.9.4]# make
./kernelversion.c:13:30: error: linux/utsrelease.h: No such file or directory

That means you haven't installed the header files for your kernel. You need to do that.
Cheers,
jdk
 
Old 06-06-2009, 03:40 PM   #12
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Original Poster
Rep: Reputation: 15
madwifi access point

Hey Everyone,

It's been a while but I now have the madwifi driver installed, bridged access point is up. I can now see my essid from clients the only problem is when I join I can't surf. The access point will let me join but once in I can't get out to the net. I can ssh that box fine, when I am in that box I can ping the gateway and google fine. Any ideas of what to look for ?

Thanks again

Keith
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to load madwifi driver madwifi-0.9.4-38_r2512.el5 louisb Linux - Wireless Networking 3 07-21-2007 09:15 PM
Madwifi-old + Aircrack/Trouble compiling madwifi Ashex Linux - Software 7 04-06-2006 12:39 AM
Madwifi-old + Aircrack/Trouble compiling madwifi Ashex Linux - Software 0 03-05-2006 07:55 PM
Can someone email me "madwifi-2.6.8_and_-mm-040821.patch.bz2"? (madwifi 2.6.8 patch) 95se Linux - Wireless Networking 0 09-01-2004 11:34 AM


All times are GMT -5. The time now is 10:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration