[mdlug] Attempts at manually restarting wireless kernal module
Peter Bart
petertheplumber at att.net
Fri Dec 25 12:37:07 EST 2009
On Mon, 2009-12-14 at 05:49 -0500, Peter Bart wrote:
> On Sun, 2009-12-13 at 00:19 -0500, Drew wrote:
> > Per my discussion with a couple of members at today's mdlug, I'm
> > recapping my efforts at
> > solving an issue with the wireless card in my desktop computer.
> >
> > What I need to do:
> >
> > Remove the module which runs the acx100 wireless card, then put
> > it back in, without
> > rebooting the entire system.
> >
> > Why:
> >
> > It's the only reliable means I've found so far to restore a
> > wireless connection after something
> > (interference from aircraft radar probably) screws up the connection.
> >
> > Telling when the connection gets screwed up:
> >
> > I've found that the loss of connection correlates strongly with
> > the Signal Strength number in
> > /proc/net/wireless for wlan0. A working connection will have this
> > number (a) almost always
> > ending in a decimal point or period ("."), and (b) varying in value
> > almost every second. When a
> > connection goes bad, this number becomes *constant* - and is never
> > zero!. Also, the ending
> > decimal point/period disappears. A script that I had running in
> > Fedora 4 watched for this condition
> > as a signal to restart the module.
> >
> > Previous handling:
> >
> > As indicated, I had the problem solved "in software" under
> > Fedora 4 with a script that watches
> > for the connection to go bad, then runs other scripts that came with
> > the driver that I had previously
> > downloaded, compiled, and installed separately (Fedora 4 itself did
> > not come with an acx100 driver),
> > which rmmod'ed then insmod'ed the module. This not only restored the
> > connection (at least until
> > it would get jammed again) but allowed downloading already in
> > progress to continue and eventually
> > finish.
> >
> > Current situation:
> >
> > I'm now running Suse 11 which comes with an acx driver.
> > Unfortunately, even though it starts up
> > properly during boot, removing and reinserting the module fails when
> > attempted from the command line.
> > dmesg indicates that it is failing to find the card firmware files
> > (in /lib/firmware). The previous driver
> > accepted a firmware_dir= parameter, but this version does not. Nor
> > have I been able to figure out just
> > how it's managing to find these files during boot.
> >
> > I've tried the following:
> >
> > insmod and rmmod, and modprobe. Fails to find firmware.
> >
> > insmod/rmmod/modprobe with firmware_dir=/lib/firmware. Does not
> > recognize parameter; "invalid symbol"
> >
> > Recompiling the previous driver for Suse 11. Fails due to a
> > missing config.h somewhere; apparently Suse 11
> > has bad kernel sources.
> >
> > Creating a new Fedora 4 partition. *Works!* However, there are
> > other problems with this too numerous
> > to deal with, including Flash Player refusing to install due to
> > missing glibc. (Fedora 4 glibc is probably too
> > out of date for current Flash Player.)
> >
> >
> > Per suggestion at mdlug:
> >
> > rcnetwork start, restart, and try-restart. Runs without error,
> > but does not restore the signal strength
> > number to a "good" condition (Remains flatlined).
> >
> > hald, udevd, and udevadm trigger. Does not restore wlan0, nor do
> > any of them correct the flatline
> > condition if I leave the module in.
> >
> >
> > What I am seeking: Any of the following:
> >
> > What exactly to enter as a parameter, or otherwise how to get
> > the kernel to know where to find
> > those firmware files.
> >
> > How exactly this is being done during boot (when the files *do*
> > successfully get found).
> >
> > Generally, how to find out, from the .o or .ko file, what
> > parameters a kernel module takes.
> >
> > Where or how to get a log of the commands, with their
> > parameters, that get executed during
> > boot - especially those that start kernel modules - as opposed to
> > just the output which dmesg
> > gives. To wit, an input equivalent of dmesg.
> >
> > A way to "restart" a kernel module without removing it.
> > Something like a modprobe --restart.
> >
> > Any other way to actually shut down and restart the card itself
> > (not just the "network"). That
> > is, restart it at the hardware level.
> >
>
> I would be very interested in what you find. I may have the same
> trouble,openSUSE 11.1/Gnome and my wireless just stops working after a
> while. I use notebooks; with two different wireless cards; so there are
> suspend/resume cycles involved. Usually a <service network stop>
> <service network start> is enough to get things going. Sometimes I have
> to <service network stop> <modprobe -r iwl4965> <modprobe iwl4965>
> <service network start> My understanding is that modprobe -r removes the
> wireless driver, and modprobe inserts it. I believe I found it on
> openSUSE's forum as a temporary work around.
>
An interesting development. As I mentioned I'm using openSUSE 11.1 and
Gnome. I have the 64 bit versions running on a T61 Thinkpad and a
Toshiba P205 Satellite. Repeated suspend/resume cycles will eventually
cause Networkmanager to stop automatically connecting to; the
preconfigured and previously working; hidden wap. The hidden wap used
wpa encryption. When manually trying to connect to this hidden wap;
using the Networkmanager gui; Networkmanager indicates starting to try
but then stops. Networkmanager then asks for the proper wep passcode. Of
course that doesn't work. The interesting part is that; using the
Networkmanager gui; disabling and re enabling networking will allow me
to manually connect to the hidden wap. From then on Networkmanager is
able to automatically connect to the hidden wap; after suspend/resume
cycle; until the next time it stops. I have not yet experimented using a
wap that broadcasts its ssid.
There are instructions on creating your own "hooks", to be run during
suspend/resume here
<http://en.opensuse.org/Pm-utils#Creating_your_own_hooks>. I did start
investigating how to unload and reload networking modules but stopped
before I figured out how to actually do it. I hope this helps you.
--
Best Regards,
Peter The Plumber
More information about the mdlug
mailing list