Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Autoloading Firmware for Wireless NIC [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
coplaniuk
Guru
Guru


Joined: 14 Apr 2004
Posts: 461
Location: Philadelphia, USA

PostPosted: Wed Sep 14, 2005 3:27 am    Post subject: Autoloading Firmware for Wireless NIC [solved] Reply with quote

After a long battle, I finally got my Wireless working. I have a prism card (D-Link DWL-650 rev.P) and I'm using the hostap drivers. In order for my wireless to work...I have to load the kernel module, THEN I have to load the firmware using hostap_fw_load. All together, it looks like this:

Code:

# modprobe hostap_cs
# hostap_fw_load wlan0


There are two things I want to do.

1) The card is a PCMCIA card. I want the module to automatically load when the card is inserted.
2) I want to automatically load the hostap_fw_load command when the module is inserted.

What do I do?
_________________
-- Coplan
~/ Outland - Art, Music, PHP and Hidden Corners of the Web
-{ Embrace Life. Evolve your computer. Emerge Gentoo. }-


Last edited by coplaniuk on Sat Sep 24, 2005 9:02 pm; edited 3 times in total
Back to top
View user's profile Send private message
coplaniuk
Guru
Guru


Joined: 14 Apr 2004
Posts: 461
Location: Philadelphia, USA

PostPosted: Wed Sep 14, 2005 4:12 am    Post subject: Reply with quote

Okay...I don't know how...but I have the module autoloading when it's inserted.

I still have to manuall run the hostap_fw_load routine though.

Anyone got help with that last part?
_________________
-- Coplan
~/ Outland - Art, Music, PHP and Hidden Corners of the Web
-{ Embrace Life. Evolve your computer. Emerge Gentoo. }-
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Wed Sep 14, 2005 5:15 am    Post subject: Reply with quote

Try adding the following line to your /etc/modprobe.conf file. You've stated that you have got to the point where it automatically loads the module, so this next line configures that module loading to first load the module and then runs the command to load the firmware:
Code:
install  hostap_cs    /sbin/modprobe  --ignore-install hostap_cs; /usr/bin/hostap_fw_load wlan0

_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Back to top
View user's profile Send private message
coplaniuk
Guru
Guru


Joined: 14 Apr 2004
Posts: 461
Location: Philadelphia, USA

PostPosted: Wed Sep 14, 2005 8:04 pm    Post subject: Reply with quote

That file won't get overwritted by a modules-update or any other scripts, will it?
_________________
-- Coplan
~/ Outland - Art, Music, PHP and Hidden Corners of the Web
-{ Embrace Life. Evolve your computer. Emerge Gentoo. }-
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Wed Sep 14, 2005 8:23 pm    Post subject: Reply with quote

coplaniuk wrote:
That file won't get overwritted by a modules-update or any other scripts, will it?
I think it does. Hmm instead of putting it in modprobe.conf directly, try creating a file called 'wireless' in /etc/modules.d/ and add that line in there. This way it will always be in the modprobe configuration whenever you run update-modules.
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Back to top
View user's profile Send private message
coplaniuk
Guru
Guru


Joined: 14 Apr 2004
Posts: 461
Location: Philadelphia, USA

PostPosted: Fri Sep 16, 2005 8:16 pm    Post subject: Reply with quote

That seems to work.

Thanks.
_________________
-- Coplan
~/ Outland - Art, Music, PHP and Hidden Corners of the Web
-{ Embrace Life. Evolve your computer. Emerge Gentoo. }-
Back to top
View user's profile Send private message
coplaniuk
Guru
Guru


Joined: 14 Apr 2004
Posts: 461
Location: Philadelphia, USA

PostPosted: Sun Sep 18, 2005 6:49 pm    Post subject: Reply with quote

Actually...it's not working. I still have to run hostap_fw_load wlan0 every time.

Is there a way to add this to the /etc/init.d/net.wlan0 script? Or is this not advisable?

I was also told that I could do something in the preup() function within /etc/conf.d/net. But I don't understand the docs on that.

Any advice?
_________________
-- Coplan
~/ Outland - Art, Music, PHP and Hidden Corners of the Web
-{ Embrace Life. Evolve your computer. Emerge Gentoo. }-
Back to top
View user's profile Send private message
coplaniuk
Guru
Guru


Joined: 14 Apr 2004
Posts: 461
Location: Philadelphia, USA

PostPosted: Mon Sep 19, 2005 3:51 am    Post subject: Reply with quote

nudge
_________________
-- Coplan
~/ Outland - Art, Music, PHP and Hidden Corners of the Web
-{ Embrace Life. Evolve your computer. Emerge Gentoo. }-
Back to top
View user's profile Send private message
psialonn
n00b
n00b


Joined: 24 Sep 2005
Posts: 1

PostPosted: Sat Sep 24, 2005 5:37 am    Post subject: Reply with quote

I just got the same exact card working with hostap_cs and I figured out how to get the firmware loaded automatically. The problem with the modprobe.conf install line is that /proc/net/hostap/wlan0/ doesn't exist for hostap_fw_load to use until after the modprobe for hostap_cs completes, and the modprobe.conf install line runs hostap_fw_load as part of the modprobe for hostap_cs so it isn't completed yet.

You must use /etc/pcmcia/wireless.opts to make hostap_fw_load happen for the specific card. Remove all the examples from the default wireless.opts and make your's like this:

Code:
# ... comments at top of file ...

case "$ADDRESS" in

# D-Link DWL-650 rev P1
*,*,*,00:00:00:00:00:00)
    if [ "$MANFID" = "000b,7110" -a "$PRODID_2" = "DWL-650 Wireless PC Card RevP" ] ; then
        VERBOSE="true"
        INFO="Load firmware for D-Link DWL-650 rev P1"
        log /usr/sbin/hostap_fw_load $DEVICE
    fi
    ;;

esac


This will automatically run hostap_fw_load when the card is inserted, after loading the hostap_cs module.

Also, the pcmcia scripts try to use /etc/init.d/net.wlan0, so if you want to use Gentoo's init.d script to setup your wireless, you'll need a /etc/init.d/net.wlan0 symlink'ed to net.lo, and you'll need at least the following in /etc/conf.d/wireless:

Code:
sleep_scan_wlan0="1"
iwpriv_scan_pre_wlan0="host_roaming 2"
iwpriv_scan_post_wlan0="host_roaming 0"


You'll probably also want to read the comments in and use /etc/conf.d/wireless to configure access point stuff.
Back to top
View user's profile Send private message
coplaniuk
Guru
Guru


Joined: 14 Apr 2004
Posts: 461
Location: Philadelphia, USA

PostPosted: Sat Sep 24, 2005 9:01 pm    Post subject: Reply with quote

Wow...that did it perfectly.

Thanks very much.
_________________
-- Coplan
~/ Outland - Art, Music, PHP and Hidden Corners of the Web
-{ Embrace Life. Evolve your computer. Emerge Gentoo. }-
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum