# [Solved] iwl3945: "SIOCSIFFLAGS: No such device"

## andr3w

Hey all,

In my never-ending struggle to make Gentoo function on my laptop, I've run into a new problem.  I installed Gentoo from scratch, and decided to move from the familiar ipw3945 to the new and wondrous iwl3945.

My laptop is an Acer 5672WLMi.

When my laptop first boots and attempts to connect to a wireless network, the Wireless activity light rapidly blinks and the laptop manages to find all the broadcasting SSIDs around it (but does not connect).  Then, however, it stops working and gives the following error messages hereafter.

Output of /etc/init.d/net.wlan0 start

```
 * Caching service dependencies ...                                       [ ok ]

 * Starting wlan0

SIOCSIFFLAGS: No such device

SIOCSIFFLAGS: No such device

SIOCSIFFLAGS: No such device

 *   Configuring wireless network for wlan0

 *   wlan0 does not support scanning

 *   You either need to set a preferred_aps list in /etc/conf.d/wireless

 *      preferred_aps=( "ESSID1" "ESSID2" )

 *      and set associate_order_wlan0="forcepreferred"

 *      or set associate_order_wlan0="forcepreferredonly"

 *   or hardcode the ESSID to "any" and let the driver find an Access Point

 *      essid_wlan0="any"

 *   or configure defaulting to Ad-Hoc when Managed fails

 *      adhoc_essid_wlan0="WLAN"

 *   or hardcode the ESSID against the interface (not recommended)

 *      essid_wlan0="ESSID"

 *   Failed to configure wireless for wlan0                               [ !! ]
```

/etc/conf.d/net

```
#modules_eth0={ "dhcpcd" }

config_eth0="dhcp"

#modules_wlan0={ "wpa_supplicant" }

config_wlan0="dhcp"

wpa_supplicant_wlan0="Dwext"
```

Dmesg output:

```
[    7.375179] iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.26ks

[    7.375183] iwl3945: Copyright(c) 2003-2008 Intel Corporation

[    7.375253] iwl3945 0000:03:00.0: enabling device (0000 -> 0002)

[    7.375266] iwl3945 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[    7.375286] iwl3945 0000:03:00.0: setting latency timer to 64

[    7.375307] iwl3945: Detected Intel Wireless WiFi Link 3945ABG

[    7.436498] iwl3945: Tunable channels: 11 802.11bg, 13 802.11a channels

[    7.437404] phy0: Selected rate control algorithm 'iwl-3945-rs'

[    7.439520] iwl3945 0000:03:00.0: PCI INT A disabled

[   15.334597] iwl3945 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[   15.334752] iwl3945 0000:03:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

[   15.334833] firmware: requesting iwlwifi-3945-1.ucode

[   15.460664] Registered led device: iwl-phy0:radio

[   15.460733] Registered led device: iwl-phy0:assoc

[   15.460761] Registered led device: iwl-phy0:RX

[   15.460788] Registered led device: iwl-phy0:TX

[   18.668775] iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC

[   18.669007] iwl3945: MAC is in deep sleep!

[   18.718879] iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC

[   18.719845] iwl3945: MAC is in deep sleep!

[   18.778964] iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC

[   18.779946] iwl3945: MAC is in deep sleep!

[   18.940365] iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC
```

Another interesting symptom is that gentoo does not seem to recognize the keystroke that should activate and deactivate the wireless card.  See below.

Dmesg output:

```
[  164.577722] atkbd.c: Unknown key pressed (translated set 2, code 0xd6 on isa0060/serio0).

[  164.577729] atkbd.c: Use 'setkeycodes e056 <keycode>' to make it known.

[  165.241646] atkbd.c: Unknown key released (translated set 2, code 0xd6 on isa0060/serio0).

[  165.241653] atkbd.c: Use 'setkeycodes e056 <keycode>' to make it known.
```

Any input would be appreciated.  If you need any additional output or config files please let me know.

----------

## d2_racing

Hi, your /etc/conf.d/net should be like this :

```

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "dhcp" )

```

----------

## d2_racing

Can you post your /etc/wpa_supplicant/wpa_supplicant.conf ?

```

# cat /etc/wpa_supplicant/wpa_supplicant.conf

```

Also, can you post this :

```

# lsmod

# dmesg | grep -i iwl

# cd /usr/src/linux

# cat .config | grep -i kill

# cat .config | grep -i 802

# cat .config | grep -i iwl

```

----------

## andr3w

/etc/conf.d/net

```
modules_eth0=( "dhcpcd" )

config_eth0=( "dhcp" )

modules_wlan0=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "dhcp" )
```

/etc/wpa_supplicant/wpa_supplicant.conf

```
# The below line should not be changed otherwise we refuse to work

ctrl_interface=/var/run/wpa_supplicant

# Ensure that only root can read the WPA configuration

ctrl_interface_group=0

# Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

network={

   ssid="50"

   scan_ssid=1

   key_mgmt=WPA-PSK

   psk="Passwordword"

   priority=1

}
```

lsmod

```
Module                  Size  Used by

fglrx                1755912  0 

iwl3945                79412  0 
```

dmesg | grep -i iwl

```
[    7.498768] iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.26ks

[    7.498772] iwl3945: Copyright(c) 2003-2008 Intel Corporation

[    7.498837] iwl3945 0000:03:00.0: enabling device (0000 -> 0002)

[    7.498849] iwl3945 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[    7.498869] iwl3945 0000:03:00.0: setting latency timer to 64

[    7.498890] iwl3945: Detected Intel Wireless WiFi Link 3945ABG

[    7.560152] iwl3945: Tunable channels: 11 802.11bg, 13 802.11a channels

[    7.561074] phy0: Selected rate control algorithm 'iwl-3945-rs'

[    7.563804] iwl3945 0000:03:00.0: PCI INT A disabled

[   43.395635] iwl3945 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[   43.395783] iwl3945 0000:03:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

[   43.395857] firmware: requesting iwlwifi-3945-1.ucode

[   43.474149] iwl3945: Radio disabled by HW RF Kill switch

[   43.474271] iwl3945 0000:03:00.0: PCI INT A disabled

[   43.501617] iwl3945 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[   43.501772] iwl3945 0000:03:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

[   43.501851] iwl3945: Radio disabled by HW RF Kill switch

[   43.501871] iwl3945 0000:03:00.0: PCI INT A disabled

[   43.630048] iwl3945 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[   43.630203] iwl3945 0000:03:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

[   43.630292] iwl3945: Radio disabled by HW RF Kill switch

[   43.630313] iwl3945 0000:03:00.0: PCI INT A disabled

[   43.827222] iwl3945 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[   43.827388] iwl3945 0000:03:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

[   43.827461] iwl3945: Radio disabled by HW RF Kill switch

[   43.827479] iwl3945 0000:03:00.0: PCI INT A disabled

[  152.004051] iwl3945 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[  152.004206] iwl3945 0000:03:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

[  152.004295] iwl3945: Radio disabled by HW RF Kill switch

[  152.004318] iwl3945 0000:03:00.0: PCI INT A disabled

[  176.126255] iwl3945 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[  176.126432] iwl3945 0000:03:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

[  176.126510] iwl3945: Radio disabled by HW RF Kill switch

[  176.126531] iwl3945 0000:03:00.0: PCI INT A disabled
```

cat .config | grep -i kill

```
CONFIG_RFKILL=y

# CONFIG_RFKILL_INPUT is not set

CONFIG_RFKILL_LEDS=y

CONFIG_IWLWIFI_RFKILL=y

CONFIG_IWL3945_RFKILL=y
```

cat .config | grep -i 802

```
# CONFIG_VLAN_8021Q is not set

CONFIG_CFG80211=y

CONFIG_NL80211=y

CONFIG_MAC80211=y

CONFIG_MAC80211_RC_PID=y

CONFIG_MAC80211_RC_DEFAULT_PID=y

CONFIG_MAC80211_RC_DEFAULT="pid"

# CONFIG_MAC80211_MESH is not set

CONFIG_MAC80211_LEDS=y

# CONFIG_MAC80211_DEBUG_MENU is not set

# CONFIG_IEEE80211 is not set

# CONFIG_WLAN_PRE80211 is not set

CONFIG_WLAN_80211=y

# CONFIG_MAC80211_HWSIM is not set
```

cat .config | grep -i iwl

```
CONFIG_IWLWIFI=y

CONFIG_IWLCORE=y

# CONFIG_IWLWIFI_LEDS is not set

CONFIG_IWLWIFI_RFKILL=y

# CONFIG_IWLWIFI_DEBUG is not set

# CONFIG_IWLAGN is not set

CONFIG_IWL3945=m

CONFIG_IWL3945_RFKILL=y

CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y

CONFIG_IWL3945_LEDS=y

# CONFIG_IWL3945_DEBUG is not set
```

Thanks!

----------

## pholthau

Whithout having a gentoo installation here right now: Do you have iwl3945-ucode installed?

----------

## andr3w

 *pholthau wrote:*   

> Whithout having a gentoo installation here right now: Do you have iwl3945-ucode installed?

 I do.

----------

## d2_racing

Can you double check if you Wifi switch is enable ?

```

Radio disabled by HW RF Kill switch 

```

And if yes, then remove the RFKIll support.

----------

## andr3w

 *d2_racing wrote:*   

> Can you double check if you Wifi switch is enable ?
> 
> ```
> 
> Radio disabled by HW RF Kill switch 
> ...

 

The WiFi switch isn't a switch so much as a button.  When pushed, I get the following dmesg output:

Dmesg output when I hit the wireless switch:

```
[  164.577722] atkbd.c: Unknown key pressed (translated set 2, code 0xd6 on isa0060/serio0).

[  164.577729] atkbd.c: Use 'setkeycodes e056 <keycode>' to make it known.

[  165.241646] atkbd.c: Unknown key released (translated set 2, code 0xd6 on isa0060/serio0).

[  165.241653] atkbd.c: Use 'setkeycodes e056 <keycode>' to make it known.
```

----------

## d2_racing

Maybe you should try to remove the rfkill switch support :

```

CONFIG_RFKILL=y

CONFIG_RFKILL_LEDS=y

CONFIG_IWLWIFI_RFKILL=y

CONFIG_IWL3945_RFKILL=y

```

I'm sure that without this feature your Wifi will be good to go.

So, try that and recompile your kernel and reboot.

----------

## andr3w

That does appear to have fixed it.  Odd.

Thanks!

----------

## d2_racing

Nice  :Razz: 

----------

