# iwl4965 trouble

## lol24h

i got troubles with this module, it behaves very strange, module is loaded by udev during startup, a then works fine, net.wlan0 script starts.

when i want /etc/init.d/net.wlan0 restart. It complains, despite the wifi switch is always on since startup.

I got this mesage :

```

$ sudo /etc/init.d/net.wlan0 restart

Password or swipe finger:

 * Starting wlan0

SIOCSIFFLAGS: No such device

SIOCSIFFLAGS: No such device

SIOCSIFFLAGS: No such device

 *   Wireless radio has been killed for interface wlan0

```

my config :

```

$ cat /etc/conf.d/net

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules_wlan0=( "iwconfig" )

config_wlan0=(" dhcp ")

################

#config_eth0=(" dhcp" )

config_eth0=("172.16.0.2 broadcast 172.16.0.255 netmask 255.255.255.0")

################

scan_mode_wlan0="Managed"

#essid_wlan0="myap"

#channel_wlan0="6"

key_myap="XXXXXXXXXXXXXXXXXXXXXXXXX enc open"

preferred_aps_wlan0=( "myap" )

associate_order="forcepreffered"

```

SSID broadcast is off, IP Adress is received by DHCP.

iwl4965 module is from kernel 2.6.25-tuxonice-r5

----------

## fidel

```
*   Wireless radio has been killed for interface wlan0 
```

As you describe, the radio power should still be on, I guess turning off your wireless connection somehow powers your interface down. This would be actually a good thing, since it saves some energy from your battery. You could therefore make sure, the interface gets powered on before starting a connection. Manually you would issue:

```
# iwconfig wlan0 txpower on
```

On some interfaces this seems not to work, there one would issue:

```
# iwconfig wlan0 power on
```

But since you probably don't want to type that every time you reconnect, you could place the following snippet into your /etc/conf.d/net:

```
preup() { 

     [[ ${IFACE} == "wlan0" ]] && iwconfig wlan0 txpower on 

     return 0 

 } 
```

Hope that helps!

----------

## lol24h

not rly, unfortunetely :/ I added your script to my 'net' file, the result is the same. I tried it manually. Also no effect.

let's look at this scenerio :

```

# rmmod iwl4965

# modprobe iwl4965

# ifconfig -a wlan0

wlan0     Link encap:Ethernet  HWaddr 00:1F:3B:04:54:17

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

```

Now interface is present but down.

Let's try wake it up.

```

# ifconfig wlan0 up

SIOCSIFFLAGS: No such device

```

What the hell ?   :Shocked: 

----------

## fidel

What do you get trying to power on your device with

```
# iwconfig wlan0 txpower on
```

?

----------

## lol24h

```

rmmod iwl4965

modprobe iwl4965

```

Now iwconfig shows :

```

wlan0     IEEE 802.11g  ESSID:""

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated

          Tx-Power=off

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B

          Encryption key:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

RF Switch is on all the time. Modules rfkill and rfkill are also loaded.

```

# iwconfig wlan0 txpower on

# iwconfig

lo        no wireless extensions.

sit0      no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11g  ESSID:""

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated

          Tx-Power=27 dBm

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B

          Encryption key:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

# ifconfig wlan0 up

SIOCSIFFLAGS: No such device

```

:/

I noticed another thing, multiplied kernel messages like this : 

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

whole situation since modprobe ... :

```

iwl4965: Intel(R) Wireless WiFi Link 4965AGN driver for Linux, 1.2.23kds

iwl4965: Copyright(c) 2003-2007 Intel Corporation

ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 17 (level, low) -> IRQ 17

PCI: Setting latency timer of device 0000:03:00.0 to 64

iwl4965: Detected Intel Wireless WiFi Link 4965AGN

iwl4965: Tunable channels: 11 802.11bg, 13 802.11a channels

phy2: Selected rate control algorithm 'iwl-4965-rs'

ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 17 (level, low) -> IRQ 17

HW CONFIG: channel=1 freq=2412 phymode=2

ADDRCONF(NETDEV_UP): wlan0: link is not ready

HW CONFIG: channel=1 freq=2412 phymode=2

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

iwl4965: WARNING: Requesting MAC access during RFKILL wakes up NIC

```

and after 'ifconfig wlan0 up' (error from stdout was shown before)

```

ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 17 (level, low) -> IRQ 17

iwl4965: Radio disabled by SW RF kill (module parameter)

```

Hardware switch is on all the time.

Why it is disabled ? by software rfkill ?

here I found something : https://bugs.gentoo.org/show_bug.cgi?format=multiple&id=218565

 * ------- Comment  #5 From Michał Kudła  2008-06-17 13:08:29 0000  -------   wrote:*   

> 
> 
> http://lkml.org/lkml/2008/6/5/373
> 
> laptok ~ # echo 0 > /sys/bus/pci/drivers/iwl4965/0000\:04\:00.0/rf_kill
> ...

 

----------

## fidel

 :Shocked: 

I wonder what asus did this time! They just manage to include bugs in about every mainboard, any piece of hardware.... (I am on an asus notebook myself)

But at least you found a possible workaround that hopefully works for you as well!

Good luck!

----------

## lol24h

My personal ugly script works,  it seems i have to wake up iface just after modprobing

```

rmmod iwl4965

modprobe iwl4965

ifconfig wlan0 up

iwconfig wlan0 essid my_ap key XXXXXXXXXXXXXXXXXXXXXX enc open ap auto

ifconfig wlan0 192.168.1.103

route add default gw 192.168.1.1

iwconfig wlan0 ap auto

```

----------

## m1k0

More infos with some patches

[2.6.26-rc5] iwlwifi 4965 not working - last on 2.6.23 ->

http://lkml.org/lkml/2008/6/5/373

----------

