# madwifi-ng doesn't create any interfaces

## PeterWelzien

I've emerged madwifi-ng 0.9.2.1 without problem (and madwifi-tools 0.9.2 and wireless-tools 28). I'm running gentoo kernel 2.6.18-r6 with wireless extensions compiled in. I can modprobe ath_pci just fine, but no interface gets created, not ath0 nor wifi0. My WLAN-card is:

```
00:05.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
```

dmesg shows:

```
ath_hal: module license 'Proprietary' taints kernel.

ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)

wlan: 0.8.4.2 (0.9.2.1)

ath_rate_sample: 1.2 (0.9.2.1)

ath_pci: 0.9.4.5 (0.9.2.1)

```

Does anyone have a clue what might be wrong?

----------

## Moji

Wireless can be a bit flakey. Have you tried using the init script after you modprobed?

```
/etc/init.d/net.ath0 start
```

If you can do a all of the following and post the results, might give a little more info on your problem.

```
ifconfig -a
```

```
lspci
```

```
iwconfig
```

-MJ

----------

## PeterWelzien

net.ath0 doesn't exist. If I make a link to net and then run net.ath0 start nothing happens.

ifconfig -a:

```
eth0      Link encap:Ethernet  HWaddr 00:20:ED:2D:E0:10

          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:2185 errors:0 dropped:0 overruns:0 frame:0

          TX packets:2114 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:181486 (177.2 Kb)  TX bytes:1331096 (1.2 Mb)

eth1      Link encap:Ethernet  HWaddr 00:20:ED:2D:E0:11

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

```

eth0 and eth1 are NICs integrated on the motherboard.

lspci:

```
00:00.0 Host bridge: Broadcom CNB20LE Host Bridge (rev 06)

00:00.1 Host bridge: Broadcom CNB20LE Host Bridge (rev 06)

00:05.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)

00:07.0 Ethernet controller: Intel Corporation 82557/8/9 [Ethernet Pro 100] (rev 08)

00:08.0 Ethernet controller: Intel Corporation 82557/8/9 [Ethernet Pro 100] (rev 08)

00:09.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)

00:0f.0 ISA bridge: Broadcom OSB4 South Bridge (rev 50)

00:0f.1 IDE interface: Broadcom OSB4 IDE Controller

00:0f.2 USB Controller: Broadcom OSB4/CSB5 OHCI USB Controller (rev 04)

```

iwconfig:

```
eth0      no wireless extensions.

eth1      no wireless extensions.

lo        no wireless extensions.

```

I used to use this wlan card on a machine running Slackware without any troubles. I used a madwifi CVS snapshot and it was rock steady. This was a year ago though.

----------

## madisonicus

Have you done a 

```
# modprobe ath_pci
```

Did it give any errors?  That should create the interface.  You might have to ifconfig -a to see it though.  If it doesn't, then 

```
# wlanconfig ath0 create wlandev wifi0 wlanmode sta
```

Come to think of it... All this stuff is in the Madwifi HowTo.

HTH,

m

----------

## PeterWelzien

I have run 'modprobe ath_pci'. It loads a couple of other modules as well. I don't get any errors. I don't see any wlan interfaces with 'ifconfig -a'. I've tried running wlanconfig but it doesn't work since there's no wifi0 device.

----------

## canabix67

Your interface will be called ath0 not wifi0,

Try 

```
ifconfig ath0
```

 or that 

```
/etc/init.d/net.ath0 start
```

And give us the recult of that if it doesn't work... ;o)

----------

## PeterWelzien

I don't have an ath0 interface so I can't do an ifconfig ath0. That's the problem.

----------

## canabix67

Ok then...

Read that: http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup

and don't forget to do that: 

# cd /etc/init.d

# ln -s net.lo net.ath0

# ./net.ath0 start

----------

## PeterWelzien

I've followed those instructions, but since the madwifi module doesn't create any wlan interfaces I can't do anything.

I need to get an ath0 interface before I can even try to get the wireless network working.

----------

## canabix67

I can't remember now, but I think you have to create it yourself... 

# cd /etc/init.d

# ln -s net.lo net.ath0

# ./net.ath0 start

----------

## PeterWelzien

ath_pci is supposed to created it automatically, but it don't. You can also create it yourself from the interface wifi0 using 'wlancreate'. But since I don't have a wifi0 interface either, it doesn't work.

I've had madwifi working under Slackware without any problems whatsoever. Tonight I'm going to unmerge madwifi and manually download a tar ball and compile it and see if that works.

----------

## tenorism

 *PeterWelzien wrote:*   

> I have run 'modprobe ath_pci'. It loads a couple of other modules as well. I don't get any errors. I don't see any wlan interfaces with 'ifconfig -a'. I've tried running wlanconfig but it doesn't work since there's no wifi0 device.

 

When you "modprobe ath_pci" you can see your iface with iwconfig. Then you have to start the iface. As mentioned before you have to 

cp /etc/init.d/net.eth0 /etc/init.d/net.ath0

and then 

/etc/init.d/net.ath0 start 

and see if you get any errors

when you are done and you have a manual ip or from a dhcp server then you will see your iface with ifconfig.

Also try to see what you get from dmesg and if your iface is recognized as ath0 or ath1 or whatever athX.

----------

## madisonicus

If modprobing doesn't create the interface, this command does 

```
# wlanconfig ath0 create wlandev wifi0 wlanmode sta
```

Also check the Madwifi HowTo for other troubleshooting hints.

----------

## PeterWelzien

This is very strange, now it's working. When I modprobe ath_pci it loads a modules it hasn't loaded before, wlan_scan_sta, and creates ath0.

Well, I don't know what I've done, but it's working. Thank you everyone who has tried to help me.

----------

## PeterWelzien

One more question: how do I make net.ath0 automatically load the modules? I have to load them manually now before I run '/etc/init.d/net.ath0 start'.

----------

## Cieslo

you need to edit /etc/modules.autoload.d/kernel-2.6 (or kernel-2.4) and add them to the file

----------

## Moji

These are the modules that have I added to my /etc/modules.autoload.d/kernel-2.6 in order to get my madwifi working correctly. Just listing them so you'll have something to compare to, I saw a post fairly recently where they mentioned that wlan_tkip doesn't always load correctly as a dependency.

```
ath_pci autocreate=ap

wlan_scan_ap

wlan_ccmp

wlan_xauth

wlan_tkip

wlan_scan_sta

ath_rate_sample

ath_hal
```

-MJ

----------

## PeterWelzien

But I don't want them to load automatically when the system boots. Only when I start the ath0 interface. Is that possible?

----------

## Moji

Yeah just make a script that modprobes them all and then start up the interface. Then just run the script instead of the /etc/init/net.ath0 dealio.

Create a file where you want the script.

```
touch /root/wlan_script_ath0
```

open it up with nano

```
nano /root/wlan_script_ath0
```

copy all of the following into the file.

```
#!/bin/sh

modprobe ath_pci autocreate=ap

modprobe wlan_scan_ap

modprobe wlan_ccmp

modprobe wlan_xauth

modprobe wlan_tkip

modprobe wlan_scan_sta

modprobe ath_rate_sample

modprobe ath_hal

/etc/init.d/net.ath0 start
```

Then just change the permissions.

```
chmod 750 /root/wlan_script_ath0
```

Now all you have to do is run the script to modprobe everything and then start up the interface

```
/root/wlan_script_ath0
```

-MJ

----------

## phil_r

I had the same problem as in Peter's first post (no wifi0 created therefore there could be no ath0).  In my case, it was that I'd forgotten to compile in CardBus support for the kernel  :Smile: 

D'oh!

Phil.

PS - If anyone tries to find it, CardBus support is under the PCMCIA section in the menuconfig.

----------

## hurvajs

Hi,

I have a same problem. All modules loaded, I read manual, this forum, but I dont resolve my problem.

kernel:

```
2.6.20-r3
```

dmesg: 

```
ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)

wlan: 0.8.4.2 (0.9.2.1)

ath_rate_sample: 1.2 (0.9.2.1)

ath_pci: 0.9.4.5 (0.9.2.1)

...

wifi%d: unable to attach hardware: 'Hardware revision not supported' (HAL status 13)
```

lsmod:

```
rfcomm                 33896  7 

l2cap                  20096  5 rfcomm

wlan_scan_sta          12416  0 

wlan_tkip              11392  0 

wlan_xauth              1984  0 

wlan_ccmp               7808  0 

wlan_scan_ap            5248  0 

pcmcia                 32344  0 

pcmcia_core            34340  1 pcmcia

ath_pci                84968  0 

ath_rate_sample        13568  1 ath_pci

wlan                  176992  7 wlan_scan_sta,wlan_tkip,wlan_xauth,wlan_ccmp,wlan_scan_ap,ath_pci,ath_rate_sample

ath_hal               216304  2 ath_pci,ath_rate_sample

nvidia               7753112  22 

snd_hda_intel          17504  1 

snd_hda_codec         192256  1 snd_hda_intel

snd_pcm                66632  2 snd_hda_intel,snd_hda_codec

snd_timer              19528  1 snd_pcm

snd                    50216  6 snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer

soundcore               6944  1 snd

snd_page_alloc          8016  2 snd_hda_intel,snd_pcm

sdhci                  16780  0 

mmc_core               22984  1 sdhci

hci_usb                16284  6 

bluetooth              46532  15 rfcomm,l2cap,hci_usb

i2c_core               18880  1 nvidia

shpchp                 30044  0 

pci_hotplug            14344  1 shpchp
```

Help me someone?

----------

## wyv3rn

If I recall madwifi-ng-0.9.2 is not compatible with kernel 2.6.20.  Try madwifi-ng-0.9.3/madwifi-ng-tools-0.9.3.

----------

## Paczesiowa

I got 2.6.19-gentoo-r7 and madwifi-ng-0.9.3 doesn't create interfaces ( and I do know what is wlanconfig for). it works great with 0.9.2.1 though. hope that helps someone.

----------

## wyv3rn

The interfaces are supposed to be created automatically on module load, wlanconfig is not necessary for the initial interface.  Do you still have an old /etc/udev.d/rules.d/65-madwifi.rules hanging around?  What kind of card is it (cardbus, pci, etc.)?  Did you recompile madwifi-ng-0.9.3 and madwifi-ng-tools-0.9.3?  Please post lsmod and dmesg output.

----------

## sheriff-jms

Madwifi 0.9.3-r2 doesn't appear to play nicely with my kernel (2.6.19-r5).  

I saw the same problems as other in this thread had reported, i.e. the system wouldn't create an "ath" or "wifi" interface, so net.ath0 wouldn't do anything.  Looking in dmesg, I also saw an error about my kernel not supporting automatic module loading, which is not correct.  This was making the 'ath_rate_sample' module unhappy.

I rolled back to madwifi 0.9.2.1 and my wireless interface fired right back up.

I guess I'll hold off on upgrading to madwifi 0.9.3 (or newer) until I upgrade to a 2.6.20 (or newer) kernel.

----------

## depontius

Did you double-check to see if your modules loaded? Mine didn't.

ath_pci: Unknown symbol ieee80211_rate_attach

ath_pci: Unknown symbol ieee80211_rate_detach

So in the manner of idiots, I've set ~x86 for gentoo-sources-2.6.20-r5 and will try a new kernel.

Then maybe I'll mask madwifi-ng-0.9.3 if that doesn't work.

----------

## silverwolf

 *sheriff-jms wrote:*   

> Madwifi 0.9.3-r2 doesn't appear to play nicely with my kernel (2.6.19-r5).  
> 
> I saw the same problems as other in this thread had reported, i.e. the system wouldn't create an "ath" or "wifi" interface, so net.ath0 wouldn't do anything.  Looking in dmesg, I also saw an error about my kernel not supporting automatic module loading, which is not correct.  This was making the 'ath_rate_sample' module unhappy.
> 
> I rolled back to madwifi 0.9.2.1 and my wireless interface fired right back up.
> ...

 

I have a similar problem running 0.9.3 and linux-2.6.19-gentoo-r5.

How do I roll back to 0.9.2.1 (for example)? I've never been through this process before.

Would appreciate someone's help on how to do this -- thanks.

----------

## Paczesiowa

I found solution to this problem I think. 0.9.3 now creates interface. All I did was enabling autoloading of modules in kernel config (before I had static module loading through /etc/modules.autoload.d/kernel-2.6) and now it works. I was loading all needed modules but perhaps I was doing it in wrong order or smth.

If you want revert back to 0.9.2 try this:

add 

```
>=net-wireless/madwifi-ng-0.9.3

>=net-wireless/madwifi-ng-tools-0.9.3
```

 to /etc/portage/package.mask

and 

```
emerge madwifi-ng madwifi-ng-tools -vat
```

----------

## depontius

 *silverwolf wrote:*   

>  *sheriff-jms wrote:*   Madwifi 0.9.3-r2 doesn't appear to play nicely with my kernel (2.6.19-r5).  
> 
> I saw the same problems as other in this thread had reported, i.e. the system wouldn't create an "ath" or "wifi" interface, so net.ath0 wouldn't do anything.  Looking in dmesg, I also saw an error about my kernel not supporting automatic module loading, which is not correct.  This was making the 'ath_rate_sample' module unhappy.
> 
> I rolled back to madwifi 0.9.2.1 and my wireless interface fired right back up.
> ...

 

Either put 

```
>=net-wireless/madwifi-ng-0.9.3

>=net-wireless/madwifi-ng-tools-0.9.3
```

into /etc/portage/package.mask or just upgrade to a 2.6.20+ kernel. They've been stable for a bit, already.

----------

## silverwolf

 *Quote:*   

> Eiither put 
> 
> ```
> >=net-wireless/madwifi-ng-0.9.3
> 
> ...

 

Thanks for that. I took the first route -- just need to test things now. I daren't upgrade the kernel as I have a pcmcia wireless card that's about to have support withdrawn, and I can't afford to replace it yet.

----------

## depontius

 *silverwolf wrote:*   

> 
> 
> Thanks for that. I took the first route -- just need to test things now. I daren't upgrade the kernel as I have a pcmcia wireless card that's about to have support withdrawn, and I can't afford to replace it yet.

 

Linux support being withdrawn, or Windows support? The latter is easy to believe, the former is a bit surprising. What card?

----------

## silverwolf

 *Quote:*   

> Linux support being withdrawn, or Windows support? The latter is easy to believe, the former is a bit surprising. What card?

 

I'm being a little sloppy -- apologies. After booting, dmesg tells me the following:

```
pcmcia: Detected deprecated PCMCIA ioctl usage from process: cardmgr.

pcmcia: This interface will soon be removed from the kernel; please expect break

age unless you upgrade to new tools.
```

Maybe I took the word "interface" the wrong way. Reading it through, I need to do something else. But the hardware is not the problem. Unintentional flame -- my bad.

----------

