# ipw3945 kernel 2.6.24-gentoo-r4 issue [SOLVED]

## Impalatore-polacco

Hi,

I have some problems to configure my Intel wifi NIC

```
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
```

I've followed this guide: gentoo-guide but I cannot find the Intel PRO/Wireless 3945ABG/BG Network Connection under the Wireless devices.

I've tryed to download and configure the linux-2.6.25-gentoo-r6 kernel but the result it's the same, I think I have mismatch some configurations in the kernel.

Many thanks in advance.

----------

## d2_racing

Hi, can you read this thread and after that I can help you : https://forums.gentoo.org/viewtopic-t-697538-highlight-iwl3945.html

----------

## Impalatore-polacco

I have configured the kernel like in the topic you linked, and also I've enable the EXPERIMENTAL_MODULES, but nothing, I continue to haven't the ipw3945 in the kernel.

Also in the .config I've done a search of IPW but I didn't find the intel ipw3945 drivers.

----------

## pappy_mcfae

The .24 kernel sucks for wireless support. Move to .22, .25, or .26 instead.

Blessed be!

Pappy

----------

## d2_racing

Ok, first of all, you cannot run ipw3945 and a kernel 2.6.24 or higher.

You need to use the iwl3945 module instead  :Razz: 

----------

## Impalatore-polacco

OK, I understand that I have to use iwlwifi modules instead ipw, but I'm forced to upgrade my kernel to upper version than mine?

I cannot also find the iwlwifi modules for my wifi card in my kernel.

----------

## Psycho Dad

Activate networking, wireless and activate the new networking stack (mac80211).

Deactivate the old deprecated networking stack.

The iwlwifi drivers will be visible then in device drivers, network device support, wireless lan.

----------

## Impalatore-polacco

I've upgraded to 2.6.25-gentoo-r7 kernel and now I'm able to select the iwl3945 driver...with the same .config of the older kernel, I don't know why with the 2.6.24 kernel I wasn't able to select the iwl3945 driver.

----------

## pappy_mcfae

 *Impalatore-polacco wrote:*   

> I've upgraded to 2.6.25-gentoo-r7 kernel and now I'm able to select the iwl3945 driver...with the same .config of the older kernel, I don't know why with the 2.6.24 kernel I wasn't able to select the iwl3945 driver.

 

Reread my comment above for your answer.

Blessed be!

Pappy

----------

## d2_racing

So for the record, can you post this :

```

# dmesg | grep -i iwl3945

# ifconfig -a

# iwlist scan

```

----------

## Impalatore-polacco

Today I've tryed to config my WLAN but with negative issue.

```
el-loco-asus test # dmesg | grep -i iwl3945

iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.23ks

iwl3945: Copyright(c) 2003-2007 Intel Corporation

iwl3945: Detected Intel PRO/Wireless 3945ABG Network Connection

iwl3945: Tunable channels: 13 802.11bg, 23 802.11a channels

```

```
el-loco-asus test # ifconfig -a

dummy0    Link encap:Ethernet  HWaddr B6:62:3E:D7:E1:EE

          BROADCAST NOARP  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:0

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

eth0      Link encap:Ethernet  HWaddr 00:17:31:EC:A4:7A

          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:1320444 (1.2 Mb)  TX bytes:2168376 (2.0 Mb)

          Interrupt:16 Base address:0x2000

eth1      Link encap:UNSPEC  HWaddr 00-13-02-BE-AD-2D-F0-E4-00-00-00-00-00-00-00-00

          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)

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

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

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

          collisions:0 txqueuelen:0

          RX bytes:2129488 (2.0 Mb)  TX bytes:2129488 (2.0 Mb)

wlan0_ren Link encap:Ethernet  HWaddr 00:13:02:BE:AD:2D

          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)

```

```
el-loco-asus test # iwlist scan

lo        Interface doesn't support scanning.

dummy0    Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

eth1      Interface doesn't support scanning.

wlan0_rename  Interface doesn't support scanning : Network is down

```

I have to configure my iface? How?

----------

## d2_racing

Hi, you have something wrong. 

You suppose to have a wlan0 and wmaster0 interface.

Can you post this plz :

```

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

```

----------

## Impalatore-polacco

Here is what you have asked me:

```
el-loco-asus distfiles # cat /etc/udev/rules.d/70-persistent-net.rules

# This file was automatically generated by the /lib/udev/write_net_rules

# program, probably run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x10ec:0x8168 (r8169)

SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:17:31:ec:a4:7a", NAME="eth0"

# PCI device 0x8086:0x4222 (ipw3945)

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:13:02:be:ad:2d", NAME="eth1"

```

----------

## d2_racing

Ok, comment the line like that :

```

# PCI device 0x8086:0x4222 (ipw3945) 

# SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:13:02:be:ad:2d", NAME="eth1" 

```

Reboot your box.

----------

## d2_racing

The source of your problem is udev.

After your reboot, can you post this plz :

```

# rmmod iwl3945

# modprobe iwl3945

# ifconfig -a

# dmesg | tail

# iwconfig

```

----------

## Impalatore-polacco

It works now

```
el-loco-asus test # rmmod iwl3945

el-loco-asus test # modprobe iwl3945

el-loco-asus test # ifconfig -a

dummy0    Link encap:Ethernet  HWaddr EE:DD:22:AC:86:73

          BROADCAST NOARP  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:0

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

eth0      Link encap:Ethernet  HWaddr 00:17:31:EC:A4:7A

          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:109236 (106.6 Kb)  TX bytes:24747 (24.1 Kb)

          Interrupt:16 Base address:0x2000

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

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

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

          collisions:0 txqueuelen:0

          RX bytes:4868 (4.7 Kb)  TX bytes:4868 (4.7 Kb)

wlan0     Link encap:Ethernet  HWaddr 00:13:02:BE:AD:2D

          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)

wmaster0  Link encap:UNSPEC  HWaddr 00-13-02-BE-AD-2D-A0-1A-00-00-00-00-00-00-00-00

          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)

el-loco-asus test # dmesg | tail

[fglrx] Reserved FB block: Unshared offset:1000000, size:5000

[fglrx] Reserved FB block: Unshared offset:ffbf000, size:40000

[fglrx] Reserved FB block: Unshared offset:ffff000, size:1000

iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.23ks

iwl3945: 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

iwl3945: Detected Intel PRO/Wireless 3945ABG Network Connection

iwl3945: Tunable channels: 13 802.11bg, 23 802.11a channels

phy1: Selected rate control algorithm 'iwl-3945-rs'

el-loco-asus test # iwconfig

lo        no wireless extensions.

dummy0    no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11g  ESSID:""

          Mode:Managed  Channel:0  Access Point: Not-Associated

          Tx-Power=0 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

```

this is my conf of /etc/conf.d/net :

```
config_eth0=( "192.168.1.3 netmask 255.255.255.0 brd 192.168.1.255" )

routes_eth0=( "default via 192.168.1.1" )

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Diwlwifi"

```

is it right?

----------

## d2_racing

Hi, no your /etc/conf.d/net should be like this for the wpa_supplicant section :

```

#WPA_SUPPLICANT

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0_="-Dwext"

config_wlan0=( "dhcp" ) 

```

Also, what encryption do you use to connect to your router ?

Also, can you post your /etc/wpa/wpa_supplicant.conf plz

----------

## d2_racing

Your /etc/wpa/wpa_supplicant.conf should be like this :

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

#update_config=1

###### Configuration for WPA2 with encryption AES(CCMP) ######

#network={

#        ssid="YOURSSID"

#        psk="YOURPassPhrase"

#        proto=WPA2

#        key_mgmt=WPA-PSK

#        pairwise=CCMP

#        group=CCMP

#        priority=5

#}

#### OR 

###### Configuration for WEP ######

network={

        ssid="YOURSSID"

        scan_ssid=1

        priority=5

        key_mgmt=NONE

        wep_key0=0123456789

        wep_tx_keyidx=0

} 

```

where wep_key0 is in hexa and also without ""

----------

## Impalatore-polacco

Now the wpa_supplicant and conf.d/net are ok, I've also created a net.wlan0 device in init.d but when I execute:

```
el-loco-asus init.d # ./net.wlan0 restart

 * Caching service dependencies ...                                                                    [ ok ]

 * Starting wlan0

SIOCSIFFLAGS: No such device

SIOCSIFFLAGS: No such device

 *   Wireless radio has been killed for interface wlan0

 *   wpa_supplicant will launch, but not associate until

 *   wireles radio is re-enabled for interface wlan0

 *   Starting wpa_supplicant on wlan0 ...

SIOCSIFFLAGS: No such device

SIOCSIFFLAGS: No such device

Could not set interface 'wlan0' UP

ioctl[SIOCSIWAUTH]: Operation not supported                                                                   [ ok ]th param 4 value 0x0 -

 *   Starting wpa_cli on wlan0 ...                                                                     [ ok ]

 *     Backgrounding ...

```

 I receive this errors when I try to restart the device and when I switch off the WiFi NIC with the hardware switch the wlan0 is still enabled in wireless devices.

----------

## jcat

Lets see your 

```
cat /etc/conf.d/net
```

 and 

```
cat /etc/wpa/wpa_supplicant.conf
```

 now that you've updated them.

Also be aware, most people can't seem to just restart wlan0 without some issues with the current iwl3945 kernel mod.  I have to:

```
/etc/init.d/net.wlan0 stop

modprobe -r iwl3945

modprobe iwl3945

/etc/init.d/net.wlan0 start
```

Cheers,

jcat

----------

## d2_racing

And even, wpa can be stock too.

----------

## Impalatore-polacco

Is it normal?

```
el-loco-asus init.d # /etc/init.d/net.wlan0 stop

 * Stopping wlan0

 *   Bringing down wlan0

 *     Shutting down wlan0 ...                                                                         [ ok ]

 *     Stopping wpa_cli on wlan0 ...                                                                   [ ok ]

 *     Stopping wpa_supplicant on wlan0 ...                                                            [ ok ]

el-loco-asus init.d # modprobe -r iwl3945

el-loco-asus init.d # modprobe iwl3945

el-loco-asus init.d # /etc/init.d/net.wlan0 start

 * WARNING:  net.wlan0 has already been started.

```

I stop the WiFi iface but when I try to start it, my gentoo says that the wlan0 has been already started. And also when I open the wpa_supplicant GUI I see the masseage "could not get status from WPA_SUPPLICANT"

----------

## d2_racing

Your wpa process is still running.

Reboot your box.

----------

## Impalatore-polacco

Now I'm able to run my iface, also this one take the IP from the DHCP server, but something's gonna wrong...I'm not able to surf the net.

I have an AP (WPA-PSK, TKIP).

This happend to my NIC:

```
el-loco-asus linux # iwlist auth

lo        no authentication information.

dummy0    no authentication information.

eth0      no authentication information.

wmaster0  no authentication information.

wlan0     Authentication capabilities :

                WPA

                WPA2

                CIPHER-TKIP

                CIPHER-CCMP

          Current Authentication algorithm :

                open

```

```
el-loco-asus linux # iwlist encryption

lo        no encryption keys information.

dummy0    no encryption keys information.

eth0      no encryption keys information.

wmaster0  no encryption keys information.

wlan0     2 key sizes : 40, 104bits

          4 keys available :

                [1]: off

                [2]: 18A7-01EC-6B8F-1356-4E96-482B-F9D1-0523-...... (256 bits)

                [3]: off

                [4]: off

          Current Transmit Key: [2]

```

The NIC seems to auth...but I'm not able to surf my network.

```
el-loco-asus linux # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:17:31:EC:A4:7A

          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:1822364 (1.7 Mb)  TX bytes:270362 (264.0 Kb)

          Interrupt:16 Base address:0x2000

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

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

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

          collisions:0 txqueuelen:0

          RX bytes:9628 (9.4 Kb)  TX bytes:9628 (9.4 Kb)

wlan0     Link encap:Ethernet  HWaddr 00:13:02:BE:AD:2D

          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:101141 (98.7 Kb)  TX bytes:1465 (1.4 Kb)

wmaster0  Link encap:UNSPEC  HWaddr 00-13-02-BE-AD-2D-40-A1-00-00-00-00-00-00-00-00

          UP BROADCAST RUNNING 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)
```

UPDATE!! I've disabled my ETH0 iface and I've left enabled only the wlan0 and now everything's working fine!!

THX for the support guys!

PS: But I'm not able to see my config and my NIC associated in the WPA_GUI...?

----------

## d2_racing

Ok, when you are able to surf with your wifi, can you post that :

```

# wpa_cli status

```

Look mine :

```

Selected interface 'wlan0'

bssid=00:1a:70:62:40:88

ssid=gentoonet

id=0

pairwise_cipher=CCMP

group_cipher=CCMP

key_mgmt=WPA2-PSK

wpa_state=COMPLETED

ip_address=192.168.1.100

```

----------

## Impalatore-polacco

This is mine...?!

```
el-loco-asus test # wpa_cli status

Selected interface 'eth1'

Failed to connect to wpa_supplicant - wpa_ctrl_open: Connection refused
```

I have another doubt, why I'm constricted to turn off my eth iface if I wanna use the wlan iface, they cannot coexist?

I have also another mistake during switching the devices, when I want to stop the eth0 some times I cannot cause the VNC remain appended to an old session terminated:

```
el-loco-asus test # /etc/init.d/net.wlan0 stop

 * Caching service dependencies ...                                                                    [ ok ]

 * Stopping TightVNC server ...                                                                        [ !! ]

 * ERROR:  cannot stop net.wlan0 as vnc is still up.
```

----------

## jcat

 *Impalatore-polacco wrote:*   

> 
> 
> I have another doubt, why I'm constricted to turn off my eth iface if I wanna use the wlan iface, they cannot coexist?
> 
> 

 

If they are both on the same network range then you get _apparently_ unpredictable results, however it's quite normal.  Your kernel will just use the first relevant routing entries that it finds in the routing table.

Cheers,

jcat

----------

