Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 111358 - new madwifi-ng driver ebuild (svn repo) (x86 only)
Summary: new madwifi-ng driver ebuild (svn repo) (x86 only)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Mobile Herd (OBSOLETE)
URL: http://www.madwifi.org
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-03 06:14 UTC by Ronni Nielsen
Modified: 2005-11-16 05:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
madwifi-ng-driver-svn-1.0.ebuild (madwifi-ng-driver-svn-1.0.ebuild,2.27 KB, text/plain)
2005-11-03 06:18 UTC, Ronni Nielsen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ronni Nielsen 2005-11-03 06:14:02 UTC
This is my attempt to make an ebuild that downloads source from the new
madwifi.org (Trac/svn) site, compiles and installs.
I modified the madwifi-driver ebuild into this one.
It works for me, but ...

Since I only have an x86 I have disabled support for other archs - please help
me fix the ebuild

Reproducible: Always
Steps to Reproduce:
1. just emerge
Comment 1 Stefan Schweizer (RETIRED) gentoo-dev 2005-11-03 06:16:47 UTC
You can try my one at
http://dev.gentoo.org/~genstef/files/overlay/madwifi-driver-0.1_pre20051021.ebuild


Of course change the version to sth newer
Does it work for you? In connect to AP, WEP? WPA?

Tests with the above version were not successful.
Comment 2 Ronni Nielsen 2005-11-03 06:18:52 UTC
Created attachment 72012 [details]
madwifi-ng-driver-svn-1.0.ebuild

put this ebuild in
$PORTAGE_OVERLAY/net-wireless/madwifi-ng-driver-svn/
Comment 3 Ronni Nielsen 2005-11-03 06:35:28 UTC
to use the new driver you have to:
modprobe -v ath_pci
modprobe -v wlan_scan_ap # if you use ap mode
modprobe -v wlan_scan_sta # if you use station mode
modprobe -v wlan_wep # if you use wep

wlanconfig ath0 create wlandev wifi0 wlanmode sta
(for more info see man 8 wlanconfig)

now use it as you would the old driver
Comment 4 Stefan Schweizer (RETIRED) gentoo-dev 2005-11-03 09:14:02 UTC
interesting

Do you think we should automate the wlanconfig ath0 create wlandev wifi0
wlanmode sta

in /etc/modules.d/somefile?
Like have it run every time after ath_pci is loaded, what do you think?
Comment 5 Tuan Van (RETIRED) gentoo-dev 2005-11-03 09:32:54 UTC
IMO, a snapshot ebuild (as in Stefan's ebuild) is preferable to live svn ebuild.

(In reply to comment #4)
> 
> Do you think we should automate the wlanconfig ath0 create wlandev wifi0
> wlanmode sta
> 
> in /etc/modules.d/somefile?
> Like have it run every time after ath_pci is loaded, what do you think?

something like the init script in http://madwifi.org/wiki/UserDocs/Distro/Gentoo  ?
Comment 6 Stefan Schweizer (RETIRED) gentoo-dev 2005-11-03 09:44:52 UTC
Something like that in /etc/modules.d/ath:


install ath_pci \
/usr/local/bin/wlanconfig ath0 create wlandev wifi0 wlanmode sta && \
/sbin/modprobe --ignore-install ath_pci

Or is it too general to always use ath0 and wifi0?
Maybe a better approach is possible with udev?
I am open for suggestions.

Reassigning to mobile because that's the appropriate herd .. and I plan to add
an ebuild as soon as it works good enough :)
Comment 7 Ronni Nielsen 2005-11-03 09:50:38 UTC
I think that it should not be created at modprobe ath_pci time.
With the new driver you can create multiple stations and accesspoints:

taken from man 8 wlanconfig:
       wlanconfig ath0 create wlandev wifi0 wlanmode ap
       wlanconfig ath1 create wlandev wifi0 wlanmode sta nosbeacon

So instead I suggest that it should be created with the net runscript
Maybe using the preup{ ... } function???

Comment 8 Stefan Schweizer (RETIRED) gentoo-dev 2005-11-03 11:12:33 UTC
dev.gentoo.org/~genstef/files/overlay/madwifi-driver-0.1_pre20051103.ebuild


New ebuild for you to try.
Can we use wifi0 like ath0 without wlanconfig?
Or is wlanconfig mandatory in this release?
I wonder why madwifi does not stick to the iwconfig-standard..
Comment 9 Ronni Nielsen 2005-11-03 11:28:46 UTC
First note that I am not associated with ahteros/madwifi - just an enthusiastic
user :-)

But from what I have gathered, the wifi0 device corrosponds to the physical
device (eg pci card 0). And from this "physical" device you have to create
virtual devices (ath0, ath1, ...) - you cannot use wifi0 for anything directly;
wlanconfig is your friend.
Comment 10 James Le Cuirot gentoo-dev 2005-11-09 17:23:43 UTC
I was about to go on a rant. I saw that there was an update for this in Portage. 
It didn't work at all and I couldn't understand why it had been put as ~x86 
already. But I just checked back and it's M~ at the moment. Was there a mistake? 
The ebuild I have says ~x86 and it's not masked anywhere.

For one thing, this new version NEEDS wlanconfig and that wasn't installed in 
the ebuild for madwifi-tools. Neither were the man pages. Though from what I can 
tell, the latest ebuild you have here combines the two. That makes sense.

I'm still annoyed because not only could I not get it to work, I can't get the 
older drivers to work now either, at least not with encryption turned on. They 
always were a bit flakey. Do you guys have as much trouble with encryption as I 
do? Scanning practically never works either. It's a mess.
Comment 11 James Le Cuirot gentoo-dev 2005-11-09 17:36:54 UTC
Actually if you're going to combine the packages, you should probably block 
madwifi-tools in this new ebuild.
Comment 12 James Le Cuirot gentoo-dev 2005-11-09 18:25:24 UTC
I finally got it to work. First I upgraded my router's firmware. Not sure if 
that made any difference. I just happened to notice a new one came out recently. 
It still wouldn't work until I tried it manually AND brought the interface up 
with "ifconfig athint up" immediately afterwards. I don't think the Gentoo net 
script is doing that. I'm going to look into it.

The following in /etc/modules.d/atheros works well enough for me. I already use 
udev to rename the interface to athint and that still works.

post-install ath_pci /sbin/wlanconfig ath0 create wlandev wifi0 wlanmode sta
Comment 13 James Le Cuirot gentoo-dev 2005-11-09 19:30:12 UTC
Aha!! Got it! (-: I was setting my WEP key in /etc/conf.d/wireless but it was 
being silently ignored because of bug #112031, which I just filed.

About that /etc/modules.d/atheros line I posted above, I now think ath0 should 
just be ath. It finds the next available number. The command fails if ath0 is/
was already in use. Even if you want ath0 specifically, there's no point in 
putting that because it won't necessarily work.

It's probably also worth nothing that wifi0 can be renamed with udev like any 
other interface.
Comment 14 phaidros 2005-11-16 05:32:35 UTC
I tested now driver and tools 0.1_pre20051111.
all compiles fine so far.
putting the snippet in /etc/conf.d/net brings up ath0 ok.

but: 
tiber ~ # iwconfig ath0 mode ad-hoc
Error for wireless request "Set Mode" (8B06) :
    SET failed on device ath0 ; Invalid argument.

its not capable of ad-hoc mode???
Comment 15 Stefan Schweizer (RETIRED) gentoo-dev 2005-11-16 05:37:51 UTC
This is obviously fixed :)

And for ad-hoc mode, you need to use a different wlanconfig command. You can
look it up either in man wlanconfig or the madwifi website.
Replace the command in /etc/conf.d/net and you should always get an adhoc interface.
goood luck