Loading ath_pci


Forum: Networking
Topic: Loading ath_pci
started by: jpeters

Posted by jpeters on Sep. 16 2007,04:29
I'd like to do the equivalent of manually reinstalling my wireless card via xterm. I've tried rmmod ath_pci, modprobe ath_pci, which works sometimes but not after the laptop returns from suspend mode.  Going into suspend mode shuts down my wireless card, and I have to reinstall the card manually before running my iwconfig script.
Posted by Juanito on Sep. 16 2007,05:04
I while ago, I saw an application called "hibernate" (or something like that) which allowed you to unload and load drivers prior to and after suspend.
Posted by jpeters on Sep. 16 2007,05:57
....gotta be a way to do this without software.   I have a hunch that the problem is that although I need to reload the driver after returning from suspend mode, there's no way to unload it without physically removing the card.  Thus, rmmod ath_pci generates a "device or resource busy" error.  Note that the light on the card is off upon return from suspend.
Posted by Juanito on Sep. 16 2007,06:23
I believe apm handles suspend in a different way to acpi - there are various parameters to set for suspend with acpi (eg cat /sys/power/state = mem if suspend is supported, ACPI_SLEEP KERNEL_CONFIG set in .config) but maybe apm handles suspend almost entirely in bios?
Posted by jpeters on Sep. 16 2007,06:34
Edit:  former response posted twice
Posted by jpeters on Sep. 16 2007,06:47
Quote (Juanito @ Sep. 16 2007,02:23)
I believe apm handles suspend in a different way to acpi - there are various parameters to set for suspend with acpi (eg cat /sys/power/state = mem if suspend is supported, ACPI_SLEEP KERNEL_CONFIG set in .config) but maybe apm handles suspend almost entirely in bios?

I had to turn off acpi to get suspend to work (using apm).  It actually works very well on my Dell laptop, returning to previous window state almost instantly after shutting down (also instantly).  R5 stays connected, but wireless needs to be reloaded; simple to do manually, but I fear wearing out the card slot.

Posted by roberts on Sep. 16 2007,12:41
Does using any of the pcmcia tool options (resume or reset) help?
Or typing the commands, example for slot 0

sudo cardctl resume 0

or

sudo cardctl reset 0

If so then perhaps you could still script something.

Posted by jpeters on Sep. 16 2007,13:32
Quote (roberts @ Sep. 16 2007,08:41)
Does using any of the pcmcia tool options (resume or reset) help?
Or typing the commands, example for slot 0

sudo cardctl resume 0

or

sudo cardctl reset 0

If so then perhaps you could still script something.

"sudo cardctl resume 0 produces "card device busy" error.
"sudo cardctl reset 0" gets a blinking light on the card, although
running "ifconfig" shows that ath0 is not loaded.  Running "ifconfig ath0 up" gets the device loaded, but running my iwconfig script fails unless I manually reinstall the card. ( I also tried  modprobe ath_pci first)

edit: I noticed that ath0 isn't loaded after manually reinstalling the card either until I run the iwconfig script.  Manual reinstall produces a steady light on the card)

edit: after suspend, sometimes there's a light on the card & sometimes not. If not, resetting the card doesn't appear to do anything.

Posted by jpeters on Sep. 17 2007,02:24
Okay,  here's how to do it (thanks to Robert for leading me in the right direction):

sudo cardctl eject
sudo cardctl insert

Now running the iwconfig script connects the card  :D

edit:  I just added it to my script....works!

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.