# iwl3945 cant work!!! SIOCSIFFLAGS: No such file ...[SOLVED]

## still0water

Hi all,

Here is a lenovo t60 laptop with wireless network card:

```
# lspci | grep -i wire

03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan]

Network Connection (rev 02)

```

kernel version:

```
# uname -a

Linux t60 2.6.38-gentoo-r6 #22 SMP Sat Jul 16 07:56:27 HKT 2011 i686 Intel(R)

Core(TM)2 CPU T5600 @ 1.83GHz GenuineIntel GNU/Linux

```

I followed the guide on http://en.gentoo-wiki.com/wiki/Iwlwifi .

Some configs in 2.6.38 are different with the wiki says...

zcat /proc/config.gz | grep -i 802

```
# CONFIG_VLAN_8021Q is not set

# CONFIG_IEEE802154 is not set

CONFIG_CFG80211=y

# CONFIG_NL80211_TESTMODE is not set

# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set

# CONFIG_CFG80211_REG_DEBUG is not set

CONFIG_CFG80211_DEFAULT_PS=y

# CONFIG_CFG80211_DEBUGFS is not set

# CONFIG_CFG80211_INTERNAL_REGDB is not set

CONFIG_CFG80211_WEXT=y

CONFIG_LIB80211=y

CONFIG_LIB80211_CRYPT_WEP=y

CONFIG_LIB80211_CRYPT_CCMP=y

CONFIG_LIB80211_CRYPT_TKIP=y

CONFIG_LIB80211_DEBUG=y

CONFIG_MAC80211=y

CONFIG_MAC80211_HAS_RC=y

CONFIG_MAC80211_RC_MINSTREL=y

CONFIG_MAC80211_RC_MINSTREL_HT=y

CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y

CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"

# CONFIG_MAC80211_MESH is not set

CONFIG_MAC80211_LEDS=y

# CONFIG_MAC80211_DEBUGFS is not set

# CONFIG_MAC80211_DEBUG_MENU is not set

# CONFIG_MAC80211_HWSIM is not set

# CONFIG_LEDS_BD2802 is not set

# CONFIG_RTC_DRV_RX8025 is not set

# CONFIG_RTC_DRV_BQ4802 is not set

```

zcat /proc/config.gz | grep -i iwl

```
CONFIG_IWLWIFI=m

CONFIG_IWLWIFI_DEBUG=y

CONFIG_IWLWIFI_DEBUG_EXPERIMENTAL_UCODE=y

CONFIG_IWLWIFI_DEVICE_TRACING=y

# CONFIG_IWLAGN is not set

CONFIG_IWL3945=m

```

As wiki says, I installend net-wireless/iwl3945-ucode.

But, when trying to change the state of the wlan0 interface, I get: 

```
# ifconfig wlan0 up

SIOCSIFFLAGS: No such file or directory

```

dmesg:

```
Jul 16 08:00:01 localhost cron[1738]: (root) CMD (test -x /usr/sbin/run-crons

&& /usr/sbin/run-crons )

Jul 16 08:00:49 localhost kernel: [  175.840166] iwl3945 0000:03:00.0:

iwlwifi-3945-2.ucode firmware file req failed: -2

Jul 16 08:01:50 localhost kernel: [  236.768174] iwl3945 0000:03:00.0:

iwlwifi-3945-1.ucode firmware file req failed: -2

Jul 16 08:01:50 localhost kernel: [  236.768178] iwl3945 0000:03:00.0: Could

not read microcode: -2

Jul 16 08:10:01 localhost cron[1754]: (root) CMD (test -x /usr/sbin/run-crons

&& /usr/sbin/run-crons )

```

I googled these links, and re-emerge iwl3945-ucode, but wireless still can't work...

any help appreciated   :Smile: 

https://forums.gentoo.org/viewtopic-t-664295-highlight-ipw3945.html

https://forums.gentoo.org/viewtopic-t-865011-highlight-ipw3945.html

https://forums.gentoo.org/viewtopic-t-808481-start-0-postdays-0-postorder-asc-highlight-.htmlLast edited by still0water on Sat Jul 16, 2011 3:33 pm; edited 1 time in total

----------

## Gef

Hi,

The driver is not able to load the firmware file (err "-2", ie. No such file or directory, hence the output of ifconfig). Please post the output of:

```
ls -al /lib*/firmware/*.ucode
```

----------

## still0water

I have installed iwl3945-ucode:1 and iwl3945-ucode:0

here is output:

```
 # ls -al /lib*/firmware/*.ucode

 -rw-r--r-- 1 root root 149816 Jul 16 06:53 /lib/firmware/iwlwifi-3945-1.ucode

 -rw-r--r-- 1 root root 150100 Jul 16 07:14 /lib/firmware/iwlwifi-3945-2.ucode

```

Thank you.

----------

## mamac

Hi,

Is the module loaded? post output of lsmod.

You should consider building iwl3945 inkernel, it doesn't have to be built as a module.

Which version of ucode do you have? Post emerge -s iwl3945.

I have driver compiled in kernel (not as module) and ucode 15.32.2.9, and everything works fine here.

----------

## still0water

 *mamac wrote:*   

> Hi,
> 
> Is the module loaded? post output of lsmod.
> 
> You should consider building iwl3945 inkernel, it doesn't have to be built as a module.
> ...

 

Thx.

I'm sure the iwl3945 module has been loaded, because I loaded it manually using modprobe.

Here is lsmod

```
# lsmod

Module                  Size  Used by

iwl3945                72973  0 

iwlcore                87126  1 iwl3945

```

iwl3945 version

```
# emerge -s iwl3945

Searching...    

[ Results for search key : iwl3945 ]

[ Applications found : 1 ]

*  net-wireless/iwl3945-ucode

    Latest version available: 15.32.2.9

    Latest version installed: 15.32.2.9

    Size of files: 65 kB

    Homepage:

    http://intellinuxwireless.org/?p=iwlwifi

    Description:   Intel (R) PRO/Wireless 3945ABG

    Network Connection ucode

    License:       ipw3945

```

NOT build as a module? but wiki says it should be...

Which version of kernel do you have? 2.6.38?

----------

## mamac

I use 2.6.38-gentoo-r6.

I've been using this driver built in kernel for 4 years now and this computer is updated on a regular basis  :Smile: 

```

zcat /proc/config.gz | grep -i iwl 

CONFIG_IWLWIFI=y

# CONFIG_IWLWIFI_DEBUG is not set

# CONFIG_IWLWIFI_DEVICE_TRACING is not set

CONFIG_IWLAGN=y

# CONFIG_IWL4965 is not set

# CONFIG_IWL5000 is not set

CONFIG_IWL3945=y

```

----------

## mamac

can you wgetpaste dmesg ?

----------

## still0water

Thanks a lot.

1. I tried to build iwl3945 in kernel, but wireless cant work. 

2. open CONFIG_IWLAGN, then recompile kernel, wireless still cant work...

```
 # zcat /proc/config.gz | grep -i iwl 

 CONFIG_IWLWIFI=y

 CONFIG_IWLWIFI_DEBUG=y

 CONFIG_IWLWIFI_DEBUG_EXPERIMENTAL_UCODE=y

 CONFIG_IWLWIFI_DEVICE_TRACING=y

 CONFIG_IWLAGN=y

 # CONFIG_IWL4965 is not set

 # CONFIG_IWL5000 is not set

 CONFIG_IWL3945=y

```

3. all dmesg here

dmesg.txtLast edited by still0water on Sun Jul 17, 2011 2:15 am; edited 1 time in total

----------

## Gef

You don't need CONFIG_IWLAGN, only relevant for Wireless on the N frequency range.

Please make sure you have the following set, and that'all:

```
CONFIG_IWLWIFI=m

# CONFIG_IWLWIFI_DEBUG is not set

# CONFIG_IWLAGN is not set

CONFIG_IWL3945=m
```

In my POV, it is way easier and convenient to compile iwl3945 in kernel (about iwlwifi, well, =m or =y should be allright), because if the driver is not functioning ok because of bad useland settings, you can just "modprobe -r" it, and modprobe it again. As advised in gentoo-wiki, for instance.

I would really follow this lead:

```
[  302.048192] iwl3945 0000:03:00.0: iwlwifi-3945-2.ucode firmware file req failed: -2

[  363.232170] iwl3945 0000:03:00.0: iwlwifi-3945-1.ucode firmware file req failed: -2

[  363.232174] iwl3945 0000:03:00.0: Could not read microcode: -2
```

edited:

Looking at the links you posted in your first post, lets check at your crypto settings:

```
zcat /proc/config.gz | grep CRYPTO_
```

----------

## still0water

OK, I changed config as follows:

```
# zcat /proc/config.gz | grep -i iwl

CONFIG_IWLWIFI=m

# CONFIG_IWLWIFI_DEBUG is not set

# CONFIG_IWLWIFI_DEVICE_TRACING is not set

# CONFIG_IWLAGN is not set

CONFIG_IWL3945=m

```

But, problem still here...   :Crying or Very sad: 

```
# lsmod

Module                  Size  Used by

iwl3945                42177  0 

iwlcore                42291  1 iwl3945

```

```
# ifconfig wlan0 up

SIOCSIFFLAGS: No such file or directory

```

```
 # dmesg | tail -n 20

 [    9.873341] e1000e 0000:02:00.0: irq 46 for MSI/MSI-X

 [    9.891702] IBM TrackPoint firmware: 0x0e, buttons: 3/3

 [    9.924172] e1000e 0000:02:00.0: irq 46 for MSI/MSI-X

 [    9.924675] ADDRCONF(NETDEV_UP): eth0: link is not ready

 [   10.126100] input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/serio2/input/input7

 [   11.575635] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx

 [   11.575640] e1000e 0000:02:00.0: eth0: 10/100 speed: disabling TSO

 [   11.575861] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

 [   22.242042] eth0: no IPv6 routers present

 [   44.185798] iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, in-tree:s

 [   44.185801] iwl3945: Copyright(c) 2003-2010 Intel Corporation

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

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

 [   44.239206] iwl3945 0000:03:00.0: Tunable channels: 11 802.11bg, 13 802.11a channels

 [   44.239209] iwl3945 0000:03:00.0: Detected Intel Wireless WiFi Link 3945ABG

 [   44.239360] iwl3945 0000:03:00.0: irq 48 for MSI/MSI-X

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

 [  223.712168] iwl3945 0000:03:00.0: iwlwifi-3945-2.ucode firmware file req failed: -2

 [  284.896172] iwl3945 0000:03:00.0: iwlwifi-3945-1.ucode firmware file req failed: -2

 [  284.896176] iwl3945 0000:03:00.0: Could not read microcode: -2

```

----------

## Gef

Please make sure you have everything set up regarding crypto and firmware loading according to  http://en.gentoo-wiki.com/wiki/Iwlwifi#Kernel_Setup

and please post the output of:

```
ls -al /usr/src

head -n 5 /usr/src/linux/.config

uname -a

depmod -a
```

----------

## still0water

```
# zcat /proc/config.gz | grep CRYPTO_ 

CONFIG_CRYPTO_ALGAPI=y

CONFIG_CRYPTO_ALGAPI2=y

CONFIG_CRYPTO_AEAD=y

CONFIG_CRYPTO_AEAD2=y

CONFIG_CRYPTO_BLKCIPHER=y

CONFIG_CRYPTO_BLKCIPHER2=y

CONFIG_CRYPTO_HASH=y

CONFIG_CRYPTO_HASH2=y

CONFIG_CRYPTO_RNG2=y

CONFIG_CRYPTO_PCOMP2=y

CONFIG_CRYPTO_MANAGER=y

CONFIG_CRYPTO_MANAGER2=y

CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y

# CONFIG_CRYPTO_GF128MUL is not set

# CONFIG_CRYPTO_NULL is not set

# CONFIG_CRYPTO_PCRYPT is not set

CONFIG_CRYPTO_WORKQUEUE=y

# CONFIG_CRYPTO_CRYPTD is not set

CONFIG_CRYPTO_AUTHENC=y

# CONFIG_CRYPTO_TEST is not set

# CONFIG_CRYPTO_CCM is not set

# CONFIG_CRYPTO_GCM is not set

# CONFIG_CRYPTO_SEQIV is not set

CONFIG_CRYPTO_CBC=y

# CONFIG_CRYPTO_CTR is not set

# CONFIG_CRYPTO_CTS is not set

CONFIG_CRYPTO_ECB=y

# CONFIG_CRYPTO_LRW is not set

CONFIG_CRYPTO_PCBC=y

# CONFIG_CRYPTO_XTS is not set

CONFIG_CRYPTO_HMAC=y

# CONFIG_CRYPTO_XCBC is not set

# CONFIG_CRYPTO_VMAC is not set

# CONFIG_CRYPTO_CRC32C is not set

# CONFIG_CRYPTO_CRC32C_INTEL is not set

# CONFIG_CRYPTO_GHASH is not set

# CONFIG_CRYPTO_MD4 is not set

CONFIG_CRYPTO_MD5=y

CONFIG_CRYPTO_MICHAEL_MIC=y

# CONFIG_CRYPTO_RMD128 is not set

# CONFIG_CRYPTO_RMD160 is not set

# CONFIG_CRYPTO_RMD256 is not set

# CONFIG_CRYPTO_RMD320 is not set

CONFIG_CRYPTO_SHA1=y

CONFIG_CRYPTO_SHA256=y

# CONFIG_CRYPTO_SHA512 is not set

# CONFIG_CRYPTO_TGR192 is not set

# CONFIG_CRYPTO_WP512 is not set

CONFIG_CRYPTO_AES=y

CONFIG_CRYPTO_AES_586=y

# CONFIG_CRYPTO_AES_NI_INTEL is not set

# CONFIG_CRYPTO_ANUBIS is not set

CONFIG_CRYPTO_ARC4=y

# CONFIG_CRYPTO_BLOWFISH is not set

# CONFIG_CRYPTO_CAMELLIA is not set

# CONFIG_CRYPTO_CAST5 is not set

# CONFIG_CRYPTO_CAST6 is not set

CONFIG_CRYPTO_DES=y

# CONFIG_CRYPTO_FCRYPT is not set

# CONFIG_CRYPTO_KHAZAD is not set

# CONFIG_CRYPTO_SALSA20 is not set

# CONFIG_CRYPTO_SALSA20_586 is not set

# CONFIG_CRYPTO_SEED is not set

# CONFIG_CRYPTO_SERPENT is not set

# CONFIG_CRYPTO_TEA is not set

# CONFIG_CRYPTO_TWOFISH is not set

# CONFIG_CRYPTO_TWOFISH_586 is not set

# CONFIG_CRYPTO_DEFLATE is not set

# CONFIG_CRYPTO_ZLIB is not set

# CONFIG_CRYPTO_LZO is not set

# CONFIG_CRYPTO_ANSI_CPRNG is not set

# CONFIG_CRYPTO_USER_API_HASH is not set

# CONFIG_CRYPTO_USER_API_SKCIPHER is not set

CONFIG_CRYPTO_HW=y

# CONFIG_CRYPTO_DEV_PADLOCK is not set

# CONFIG_CRYPTO_DEV_GEODE is not set

# CONFIG_CRYPTO_DEV_HIFN_795X is not set

```

----------

## still0water

 *Gef wrote:*   

> Please make sure you have everything set up regarding crypto and firmware loading according to  http://en.gentoo-wiki.com/wiki/Iwlwifi#Kernel_Setup
> 
> and please post the output of:
> 
> ```
> ...

 

```
t60 ~ # ls -al /usr/src 

total 12

drwxr-xr-x  3 root root 4096 Jul  3 23:37 .

drwxr-xr-x 14 root root 4096 Jul  3 23:36 ..

lrwxrwxrwx  1 root root   22 Jul  3 23:37 linux -> linux-2.6.38-gentoo-r6

drwxr-xr-x 24 root root 4096 Jul 17 05:29 linux-2.6.38-gentoo-r6

t60 ~ # head -n 5 /usr/src/linux/.config 

#

# Automatically generated make config: don't edit

# Linux/i386 2.6.38-gentoo-r6 Kernel Configuration

# Sun Jul 17 05:27:38 2011

#

t60 ~ # uname -a 

Linux t60 2.6.38-gentoo-r6 #27 SMP Sun Jul 17 05:29:19 HKT 2011 i686 Intel(R)

Core(TM)2 CPU T5600 @ 1.83GHz GenuineIntel GNU/Linux

t60 ~ # depmod -a

t60 ~ # 

```

----------

## Gef

How do you compile your kernel ? With genkernel ?

If not, ie, if you compile your kernel manually, please post the sequence of commands you run.

----------

## still0water

I did not use genkernel

only 'make menuconfig', then 'make && make modules_install'

----------

## Gef

Running short on clues, as it looks like you do everything needed.

```
cat /etc/udev/rules.d/70-persistent-net.rules

zcat /proc/config.gz | grep FW_LOADER

zcat /proc/config.gz | grep RFKILL

zcat /proc/config.gz | grep MAC802
```

----------

## still0water

Thanks a lot.

```
 t60 ~ # cat /etc/udev/rules.d/70-persistent-net.rules 

 cat: /etc/udev/rules.d/70-persistent-net.rules: No such file or directory

```

Does the udev module has problem??

```
t60 ~ # 

t60 ~ # zcat /proc/config.gz | grep FW_LOADER 

CONFIG_FW_LOADER=y

t60 ~ # 

t60 ~ # 

t60 ~ # zcat /proc/config.gz | grep RFKILL 

CONFIG_RFKILL=y

CONFIG_RFKILL_LEDS=y

CONFIG_RFKILL_INPUT=y

# CONFIG_TOSHIBA_BT_RFKILL is not set

t60 ~ # 

t60 ~ # 

t60 ~ # zcat /proc/config.gz | grep MAC802

CONFIG_MAC80211=y

CONFIG_MAC80211_HAS_RC=y

CONFIG_MAC80211_RC_MINSTREL=y

CONFIG_MAC80211_RC_MINSTREL_HT=y

CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y

CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"

# CONFIG_MAC80211_MESH is not set

CONFIG_MAC80211_LEDS=y

# CONFIG_MAC80211_DEBUGFS is not set

# CONFIG_MAC80211_DEBUG_MENU is not set

# CONFIG_MAC80211_HWSIM is not set

t60 ~ # 

```

----------

## Gef

Ok, the kernel config looks ok to me.

Well, about udev, let's try again:

```
cat /etc/udev/rules.d/*-persistent-net.rules
```

----------

## still0water

There is no net.rules...

```
t60 ~ # 

t60 ~ # cat /etc/udev/rules.d/*-persistent-net.rules

cat: /etc/udev/rules.d/*-persistent-net.rules: No such file or directory

t60 ~ # 

t60 ~ # 

t60 ~ # ll /etc/udev/rules.d/

total 4

-rw-r--r-- 1 root root 1093 Jul  4 20:31 60-pcmcia.rules

t60 ~ # 

t60 ~ # find /etc/ -iname "*net.rules*"

t60 ~ # 

```

----------

## Gef

udev is up and running ?

```
emerge --pretend --verbose udev

rc-update show
```

Is this Gentoo installation a newly built one ? upgraded from an older one ?

```
emerge --info
```

----------

## still0water

A newly build one.

I used a Ubuntu liveCD to boot machine, then download stage3, then chroot to install Gentoo.

here seems udev is not running...

```
t60 ~ # emerge --pretend --verbose udev

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N     ] dev-libs/libusb-1.0.8  USE="-debug -doc" 325 kB

[ebuild  N     ] virtual/libusb-1  0 kB

[ebuild  N     ] dev-libs/libusb-0.1.12-r5  USE="-debug -doc -nocxx" 381 kB

[ebuild  N     ] sys-apps/usbutils-001  USE="zlib -network-cron" 564 kB

[ebuild  N     ] virtual/libusb-0  0 kB

[ebuild     U  ] sys-fs/udev-164-r2 [151-r4] USE="extras* -build% (-selinux)

-test (-devfs-compat%) (-old-hd-rules%)" 554 kB

Total: 6 packages (1 upgrade, 5 new), Size of downloads: 1,822 kB

t60 ~ # 

t60 ~ # rc-update show

            killprocs |              shutdown        

               sysctl |         boot                 

           localmount |         boot                 

             net.eth0 |                       default

                dmesg | sysinit                      

             bootmisc |         boot                 

                 sshd |                       default

                local |                       default

             hostname |         boot                 

              modules |         boot                 

              keymaps |         boot                 

           vixie-cron |                       default

               procfs |         boot                 

                 root |         boot                 

            syslog-ng |                       default

               net.lo |         boot                 

             netmount |                       default

                devfs | sysinit                      

              hwclock |         boot                 

       udev-postmount |                       default

             mount-ro |              shutdown        

                 fsck |         boot                 

         termencoding |         boot                 

                 swap |         boot                 

              urandom |         boot                 

                 mtab |         boot                 

            savecache |              shutdown        

t60 ~ # 

```

Last edited by still0water on Sun Jul 17, 2011 2:16 am; edited 1 time in total

----------

## Gef

Well well well, let's install udev!

```
emerge --ask --verbose sys-fs/udev
```

(which will be added to your world file, but nevermind).

----------

## still0water

After install udev, wireless works well.   :Embarassed: 

THANK YOU VERY MUCH!

Thanks a lot ........

----------

## Gef

 :Very Happy:  Good to ear!

Happy fiddling with wpa_supplicant now ! Cheers.

----------

## still0water

I will mask this subject SOLVED.

Thanks again.   :Very Happy: 

----------

## mods

Hi lads,

im sorry to bring this up again but i think i am in the same situation as still0water was.

Im installing gentoo from scratch, not using genkernel. I followed all the steps above, but starting udevd didn't help. Do i have to write any rule for udev in order to have the iwl3945 firmware loaded when i try to bring wlan0 up?

 :Crying or Very sad: 

----------

## mamac

mods,

You shouldn't need to create any rule.

What error message/symptoms do you have?

----------

## mods

Hi mamac, thanks for the answer.

The steps i go through are:

1. modprobe iwl3945

2. udevd --daemon

3. ifconfig wlan0 up

The error mess is the usual:

```
# ifconfig wlan0 up

SIOCSIFFLAGS: No such file or directory 
```

maybe udev is not looking in /lib/firmware? I guess ill have to look at the source to know...

----------

## Slaik

Hi mods,

Have you sorted your problem out?

Regards

----------

