View previous topic :: View next topic |
Author |
Message |
GD Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 11 May 2005 Posts: 138 Location: Greece
|
Posted: Wed Jul 26, 2006 3:50 am Post subject: [SOLVED] Ath0 device in master mode at boot (madwifi-ng) |
|
|
Hello,
I have been trying to get my atheros based adapter to work in Access Point mode... According to madwifi documentation, this can be achieved by either using the wlanconfig utility or passing an option to the kernel module upon its initialisation.
The madwifi.org wiki suggests autoloading the module by appending "ath_pci autocreate=ap" in /etc/modules.autoload.d/kernel-2.6
However this will only create the ath0 device in managed (aka client) mode despite the autocreate=ap option...
Things work as expected if I login, remove the module by issuing "modprobe -r ath_pci" and then reload it by issuing "modprobe ath_pci autocreate=ap"
I thought these two methods (modules.autoload.d and modprobe) were identical so why is it that the autocreate=ap option is completely ignored by modules.autoload.d? Everything seems normal during boot (the kernel loading part produces no errors) and I wasn't able to find anything wrong in the logs...
Please note that I am running gentoo-hardened (with a Grsec+PaX enabled kernel) although grsec has not been configured yet... Besides the fact that the autocreate flag doesn't work in modules.autoload.d everything works as expected anyway...
Any help would be greatly appreciated...
George
Last edited by GD on Fri Jul 28, 2006 12:22 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
GD Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 11 May 2005 Posts: 138 Location: Greece
|
Posted: Thu Jul 27, 2006 6:57 pm Post subject: |
|
|
I think I might have come up with an explanation as to why this is happening, but I haven't been able to solve it yet...
It seems the ath_pci module gets loaded automatically, but not through modules.autoload.d. Here's how I found out:
I commented all lines in /etc/modules.autoload.d/kernel-2.6. I rebooted, did an lsmod and found that all the appropriate ath_pci modules had been loaded. This led me to think that they might have been loaded by coldplug/hotplug... So I put them (the modules) in the blacklist file which is located somewhere in /etc/hotplug.
I rebooted the system anew, but to my surprise the modules had been loaded again!
I suppose that this is what happens: the modules somehow get loaded automatically, then modules.autoload.d tries to load them again which of course has no effect at all... As a result the autocreate=ap option makes no difference since the module has already been loaded without it.
This is the only explanation I can think of, so it would really help if somebody could explain how these modules are loaded even though they're not handled by modules.autoload.d or hotplug (since they're blacklisted). Perhaps if this were resolved, I could make sure they get loaded for the first time by modules.autoload.d with the appropriate option...
Thanks in advance,
George |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
chunderbunny Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1181016848413c617038f3d.jpg)
Joined: 31 May 2004 Posts: 1281 Location: 51°24'27" N, 0°57'15" W
|
Posted: Thu Jul 27, 2006 7:17 pm Post subject: |
|
|
Hotplug has been deprecated for over 2 years now, and coldplug was deprecated a few months ago. Automatic kernel module loading is now handled by udev, but it is also possible that the net.ath0 init script is also loading the module. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Monkeh Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/158504026146c5220a4feda.png)
Joined: 06 Aug 2005 Posts: 1656 Location: England
|
Posted: Thu Jul 27, 2006 9:07 pm Post subject: |
|
|
You don't add options to /etc/modules.autoload.d, you add them to a file under /etc/modules.d. Add this to /etc/modules.d/ath_pci: Code: | options ath_pci autocreate=ap |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
GD Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 11 May 2005 Posts: 138 Location: Greece
|
Posted: Fri Jul 28, 2006 12:20 am Post subject: |
|
|
Quote: | You don't add options to /etc/modules.autoload.d, you add them to a file under /etc/modules.d. Add this to /etc/modules.d/ath_pci:
Code:
options ath_pci autocreate=ap |
Solved (had to run modules-update as well)! Thanks a lot! I would never have found out myself... Searching with google for /etc/modules.d/ath_pci only yields three results... It's funny because building an AP with madwifi is so well documented I would never have imagined I should in fact ignore being advised to use kernel-2.6
I can't help being a little disappointed though because I feel so lost in this modules thing (or anything of similar nature, whatever that may mean)... There is an abundance of how-tos out there, you manage to get it working more often than not, but if something goes wrong you have no idea what to do next because sometimes you don't really know how the whole thing works...
I'm glad I now feel the urge to learn more about the difference between modules.d and modules.autoload.d though...
Quote: | Hotplug has been deprecated for over 2 years now, and coldplug was deprecated a few months ago. Automatic kernel module loading is now handled by udev, but it is also possible that the net.ath0 init script is also loading the module. |
I'm surprised at this... there is a lot of documentation out there suggesting that hotplug be used... sometimes I feel the linux world is so inconsistent... if it weren't though I might not be interested in it at all I've already unmerged hotplug anyway
Again thank you both for your feedback |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|