Solved Ath0 Driver Failure after restart, But: Shutdown & Power ON = OK?

I Just installed a TP-LINK TL-WN881ND (PCIe 802.11 Atheros)
In my box (the one on my avatar photo)
The internet works GREAT only when I power off & boot up.

When I restart the computer, the device is not found and the Driver drives nothing.
even #sysctl net.wlan.devices shows empty.

This leads me to believe that there is a reset problem, the Device gets stuck with garbage until the power is turned off and it starts up FRESH.
if i do #sysctl net.wlan.devices it shows: ath0 ONLY after cold-boot however!
Anybody have any ideas?
Thanks Everyone!
Showing my various .confs should be irrelevant, because the wifi works (right now as I'm posting).
Is there a trick to send the device a reset?
pciconf -lv
Code:
ath0@pci0:1:0:0:        class=0x028000 card=0x30a4168c chip=0x002e168c rev=0x01 hdr=0x00
    vendor     = 'Qualcomm Atheros'
    device     = 'AR9287 Wireless Network Adapter (PCI-Express)'
    class      = network
 
/etc/rc.conf
Code:
wlans_ath0="wlan0"

ifconfig_wlan0="inet 10.0.0.23 netmask 255.255.255.0 WPA country GR"
/boot/loader.conf

Code:
if_ath_load="YES"
if_ath_pci_load="YES"
 
Attention kalamari's:
# nano /etc/sysctl.conf
Code:
hw.pci.do_power_nodriver=0

Excerpt from the FreeBSD Bible:
pci(4):
Code:
hw.pci.do_power_nodriver (Defaults    to 0)
         Place devices into    a low power state (D3) when a suitable device
         driver is not found.  Can be set to one of    the following values:

         3         Powers down all PCI devices without a device driver.

         2         Powers down most devices without a    device driver.    PCI
             devices with the display, memory, and base    peripheral
             device classes are    not powered down.

         1         Similar to    a setting of 2 except that storage controllers
             are also not powered down.

         0         All devices are left fully    powered.

         A PCI device must support power management    to be powered down.
         Placing a device into a low power state may not reduce power con-
         sumption.
This solved my booboo. After 9 hours I need a drink.
Basically the Atheros driver likes to be late, and the PCI Bus cuts off power to incomplete devices without a driver.
It was supposed to default to zero, but I had tinkered with S3 sleep/hibernate a while ago and there was residual stuff hw.pci declarations in that file.
 
Back
Top