# Intel Wireless WiFi 5000AGN on x86_64

## deF1NE

Hey, guys.

I've got a similar problem with Intel Wireless WiFi 5000AGN on x86_64 gentoo.

I've comiled 2.6.27-gentoo-r2 kernel with Intel 5000AGN support, emerged net-wireless/iwl5000-ucode. And I've got the folowing things:

```
dv5 define # ifconfig wlan0 up

dv5 define # dmesg | grep iwl

iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27k

iwlagn: Copyright(c) 2003-2008 Intel Corporation

iwlagn 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwlagn 0000:02:00.0: setting latency timer to 64

iwlagn: Detected Intel Wireless WiFi Link 5100AGN REV=0x54

iwlagn: Tunable channels: 13 802.11bg, 24 802.11a channels

iwlagn 0000:02:00.0: PCI INT A disabled

phy0: Selected rate control algorithm 'iwl-agn-rs'

iwlagn 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwlagn 0000:02:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

firmware: requesting iwlwifi-5000-1.ucode

iwlagn: Radio disabled by HW RF Kill switch
```

```
dv5 define # lspci -k | grep -A 1 -i network

02:00.0 Network controller: Intel Corporation Device 4237

        Kernel driver in use: iwlagn
```

What's wrong?

I haven't seen this device working on 64 bits systems, thow on x86 it's working.

----------

## d2_racing

Can you check that your switch is on on your laptop ?

Also, did you enable the rf switch inside the kernel.

If so, disable it inside your kernel and recompile it.

----------

## deF1NE

The problem is that hw switch doesn't work.

Refering to this it shoud work just after compiling the kernel.

RF switch was enabled in my kernel. I've tried to disable it and recompile the kernel the result is the same.

Wireless LAN section of my .config is here:

```

# Wireless LAN

#

# CONFIG_WLAN_PRE80211 is not set

CONFIG_WLAN_80211=y

# CONFIG_PCMCIA_RAYCS is not set

# CONFIG_IPW2100 is not set

# CONFIG_IPW2200 is not set

# CONFIG_LIBERTAS is not set

# CONFIG_AIRO is not set

# CONFIG_HERMES is not set

# CONFIG_ATMEL is not set

# CONFIG_AIRO_CS is not set

# CONFIG_PCMCIA_WL3501 is not set

# CONFIG_PRISM54 is not set

# CONFIG_USB_ZD1201 is not set

# CONFIG_USB_NET_RNDIS_WLAN is not set

# CONFIG_RTL8180 is not set

# CONFIG_RTL8187 is not set

# CONFIG_ADM8211 is not set

# CONFIG_MAC80211_HWSIM is not set

# CONFIG_P54_COMMON is not set

# CONFIG_ATH5K is not set

# CONFIG_ATH9K is not set

CONFIG_IWLWIFI=y

CONFIG_IWLCORE=y

CONFIG_IWLWIFI_LEDS=y

CONFIG_IWLWIFI_RFKILL=n

# CONFIG_IWLWIFI_DEBUG is not set

CONFIG_IWLAGN=y

# CONFIG_IWLAGN_SPECTRUM_MEASUREMENT is not set

CONFIG_IWLAGN_LEDS=y

# CONFIG_IWL4965 is not set

CONFIG_IWL5000=y

# CONFIG_IWL3945 is not set

# CONFIG_HOSTAP is not set

# CONFIG_B43 is not set

# CONFIG_B43LEGACY is not set

# CONFIG_ZD1211RW is not set

# CONFIG_RT2X00 is not set
```

And when I press WiFi button on my laptop I see in dmesg the following:

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

atkbd.c: Use 'setkeycodes e076 <keycode>' to make it known.

atkbd.c: Unknown key released (translated set 2, code 0xe4 on isa0060/serio0).

atkbd.c: Use 'setkeycodes e064 <keycode>' to make it known.

```

----------

## d2_racing

Hi, for your switch problem, make sure that you have disable this section :

```

(M) RF switch subsystem support

    (M) Input layer to RF switch connector

```

You don't need this since your hardware swtich doesn't work on Linux.

----------

## d2_racing

Hi, since you have a iwl5000, you can remove this :

```

# emerge -Cv iwl4965-ucode

```

----------

## d2_racing

 *deF1NE wrote:*   

> I've tried different combinations:
> 
> ```
> CONFIG_TIMERFD=y
> 
> ...

 

Hi, for the sake of this thread, can you create a new thread deF1NE  :Razz: 

----------

## NathanZachary

Split appropriate posts from this thread as this problem regards a different WNIC driver.

----------

## deF1NE

 *kalos wrote:*   

> Split appropriate posts from this thread as this problem regards a different WNIC driver.

 

Thank you. It's easier to watch this thread.

----------

## d2_racing

Hi, are you sure that your rf switch is not compile inside your kernel.

If so, disable it and retry this :

```

# rmmod iwlagn

# modprobe iwlagn

# dmesg | tail

# ifconfig -a

# iwconfig

```

----------

## d2_racing

Also, double check that physically that your wifi switch is enable on your laptop too  :Razz: 

----------

## deF1NE

It must be enabled because it's working in vista.

----------

## deF1NE

And if the IWLWIFI_RFKILL shoud be disables too?

----------

## d2_racing

Yes  :Razz:  and after that run the commands that I have asked.

----------

## deF1NE

Here it is.

```
dv5 define # rmmod iwlagn

dv5 define # modprobe iwlagn

dv5 define # dmesg | tail

nvidia 0000:01:00.0: setting latency timer to 64

NVRM: loading NVIDIA UNIX x86_64 Kernel Module  177.82  Tue Nov  4 16:50:05 PST 2008

CE: hpet increasing min_delta_ns to 15000 nsec

iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks

iwlagn: Copyright(c) 2003-2008 Intel Corporation

iwlagn 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwlagn 0000:02:00.0: setting latency timer to 64

iwlagn: Detected Intel Wireless WiFi Link 5100AGN REV=0x54

iwlagn: Tunable channels: 13 802.11bg, 24 802.11a channels

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

dv5 define # ifconfig -a

dummy0    Link encap:Ethernet  HWaddr da:f6:fc:ab:a4:e2

          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:1e:68:99:a3:4c

          inet addr:10.10.10.1  Bcast:10.10.10.31  Mask:255.255.255.224

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:944864 (922.7 KiB)  TX bytes:229625 (224.2 KiB)

          Interrupt:56 Base address:0xe000

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

tunl0     Link encap:IPIP Tunnel  HWaddr

          NOARP  MTU:1480  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)

wlan0     Link encap:Ethernet  HWaddr 00:16:ea:4a:ea:1c

          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-16-EA-4A-EA-1C-00-00-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)

dv5 define # iwconfig

lo        no wireless extensions.

dummy0    no wireless extensions.

eth0      no wireless extensions.

tunl0     no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:""

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

          Tx-Power=0 dBm

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

          Encryption key:off

          Power Management: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

dv5 define #        
```

----------

## d2_racing

Hi, what do you have :

```

# rc-update show

# cd /etc/init.d/ && ls-la

```

Do you have any entry about net.wlan0 ?Last edited by d2_racing on Fri Nov 28, 2008 6:50 pm; edited 1 time in total

----------

## deF1NE

 *d2_racing wrote:*   

> Hi, what do you have :
> 
> ```
> 
> # rc-update show
> ...

 

No, I don't. And what entry should be there?

```
dv5 define # rc-update show

           alsasound | boot

            bootmisc | boot

             checkfs | boot

           checkroot | boot

               clock | boot

         consolefont | boot

                dbus |      default

                hald |      default

            hostname | boot

             keymaps | boot

               local |      default nonetwork

          localmount | boot

             modules | boot

              net.lo | boot

            netmount |      default

          pbbuttonsd |      default

           rmnologin | boot

           syslog-ng |      default

             urandom | boot

          vixie-cron |      default

                 xdm |      default

dv5 init.d # cd /etc/init.d/ && ls -la

итого 272

drwxr-xr-x  2 root root  4096 Ноя 27 22:53 .

drwxr-xr-x 71 root root  4096 Ноя 28 06:48 ..

-rwxr-xr-x  1 root root  6557 Ноя 20 14:03 alsasound

-rwxr-xr-x  1 root root  3661 Июн 17 05:51 bootmisc

-rwxr-xr-x  1 root root  1188 Июн 17 05:51 checkfs

-rwxr-xr-x  1 root root  3226 Июн 17 05:51 checkroot

-rwxr-xr-x  1 root root  3054 Июн 17 05:51 clock

-rwxr-xr-x  1 root root  1429 Июн 17 05:51 consolefont

-rwxr-xr-x  1 root root   540 Ноя 18 03:31 consolekit

-rwxr-xr-x  1 root root  1722 Июн 17 06:15 crypto-loop

-rwxr-xr-x  1 root root   286 Ноя 18 04:02 cupsd

-rwxr-xr-x  1 root root  1152 Ноя 23 22:55 dbus

lrwxrwxrwx  1 root root    21 Ноя 17 21:28 depscan.sh -> ../../sbin/depscan.sh

-rwxr-xr-x  1 root root   627 Ноя 18 03:03 device-mapper

-rwxr-xr-x  1 root root  1989 Ноя 27 17:42 dhcpd

-rwxr-xr-x  1 root root   736 Ноя 27 17:42 dhcrelay

-rwxr-xr-x  1 root root   660 Ноя 18 03:31 dmcrypt

-rwxr-xr-x  1 root root   547 Ноя 18 03:03 dmeventd

-rwxr-xr-x  1 root root   998 Ноя 18 02:57 dnsextd

-rwxr-xr-x  1 root root   993 Ноя 24 01:32 esound

lrwxrwxrwx  1 root root    23 Ноя 17 21:28 functions.sh -> ../../sbin/functions.sh

-rwxr-xr-x  1 root root   951 Июн 17 05:52 gpm

-rwxr-xr-x  1 root root  1111 Ноя 23 22:56 hald

-rwxr-xr-x  1 root root  5606 Июн 17 05:51 halt.sh

-rwxr-xr-x  1 root root   433 Июн 17 05:51 hostname

-rwxr-xr-x  1 root root   808 Ноя 20 09:45 irexec

-rwxr-xr-x  1 root root  1874 Июн 17 05:51 keymaps

-rwxr-xr-x  1 root root   581 Ноя 20 09:45 lircd

-rwxr-xr-x  1 root root   466 Ноя 20 09:45 lircmd

-rwxr-xr-x  1 root root   546 Ноя 18 09:20 lisa

-rwxr-xr-x  1 root root   620 Июн 17 05:51 local

-rwxr-xr-x  1 root root  2088 Июн 17 05:51 localmount

-rwxr-xr-x  1 root root   845 Ноя 18 02:57 mdnsd

-rwxr-xr-x  1 root root  1247 Ноя 18 02:57 mDNSResponderPosix

-rwxr-xr-x  1 root root  2947 Июн 17 05:51 modules

-rwxr-xr-x  1 root root   557 Ноя 24 01:39 nas

lrwxrwxrwx  1 root root     6 Ноя 17 21:28 net.eth0 -> net.lo

-rwxr-xr-x  1 root root 30696 Июн 17 05:51 net.lo

-rwxr-xr-x  1 root root  3311 Июн 17 05:51 netmount

-rwxr-xr-x  1 root root  1566 Ноя 24 22:50 nscd

-rwxr-xr-x  1 root root   670 Июн 17 05:51 numlock

-rwxr-xr-x  1 root root   472 Ноя 27 22:53 pbbuttonsd

-rwxr-xr-x  1 root root  1228 Ноя 18 05:17 pe-format

-rwxr-xr-x  1 root root   636 Ноя 24 01:26 pulseaudio

-rwxr-xr-x  1 root root   538 Ноя 18 03:16 pwcheck

-rwxr-xr-x  1 root root   666 Ноя 27 20:42 pydoc-2.5

-rwxr-xr-x  1 root root   304 Июн 17 05:15 reboot.sh

-rwxr-xr-x  1 root root   557 Ноя 18 09:20 reslisa

-rwxr-xr-x  1 root root   276 Июн 17 05:51 rmnologin

-rwxr-xr-x  1 root root   558 Ноя 18 01:04 rsyncd

lrwxrwxrwx  1 root root    23 Ноя 17 21:28 runscript.sh -> ../../sbin/runscript.sh

-rwxr-xr-x  1 root root  1133 Ноя 18 04:07 samba

-rwxr-xr-x  1 root root   525 Ноя 18 03:16 saslauthd

-rwxr-xr-x  1 root root   385 Июн 17 05:15 shutdown.sh

-rwxr-xr-x  1 root root  2114 Ноя 18 01:34 sshd

-rwxr-xr-x  1 root root   817 Ноя 27 10:43 svnserve

-rwxr-xr-x  1 root root  1894 Ноя 17 22:09 syslog-ng

-rwxr-xr-x  1 root root   510 Ноя 18 01:13 udev-postmount

-rwxr-xr-x  1 root root   942 Июн 17 05:51 urandom

-rwxr-xr-x  1 root root   530 Ноя 17 22:09 vixie-cron

-rwxr-xr-x  1 root root  5207 Ноя 18 03:46 xdm

-rwxr-xr-x  1 root root   868 Ноя 18 02:53 xinetd
```

----------

## d2_racing

Hi, you need this to have a working Wifi :

```

# cd /etc/init.d

# ln -s net.lo net.wlan0

```

Also, can you post this :

```

# cat /etc/conf.d/net

# equery list wpa

# cat /etc/wpa_supplicant/wpa_supplicant.conf

```

----------

## deF1NE

 *d2_racing wrote:*   

> Hi, you need this to have a working Wifi :
> 
> ```
> 
> # cd /etc/init.d
> ...

 

I've added wlan0 to init.d, but result is the same. Wireless is swithed off:

```
 dv5 init.d # ln -s net.lo net.wlan0

dv5 init.d # /etc/init.d/net.

net.eth0   net.lo     net.wlan0

dv5 init.d # /etc/init.d/net.wlan0 start

 * Caching service dependencies ...                                                                                                                    [ ok ]

 * Starting wlan0

 *   Configuring wireless network for wlan0

 *     no access points found

 *   Couldn't find any access points on wlan0

 *   Failed to configure wireless for wlan0                                                                                                            [ !! ]

dv5 init.d # ifconfig wlan0

wlan0     Link encap:Ethernet  HWaddr 00:16:ea:4a:ea:1c

          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)

dv5 init.d # ifconfig wlan0 up

dv5 init.d # ifconfig wlan0

wlan0     Link encap:Ethernet  HWaddr 00:16:ea:4a:ea:1c

          UP 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)

dv5 init.d # dmesg | grep iwl

iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks

iwlagn: Copyright(c) 2003-2008 Intel Corporation

iwlagn 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwlagn 0000:02:00.0: setting latency timer to 64

iwlagn: Detected Intel Wireless WiFi Link 5100AGN REV=0x54

iwlagn: Tunable channels: 13 802.11bg, 24 802.11a channels

iwlagn 0000:02:00.0: PCI INT A disabled

phy0: Selected rate control algorithm 'iwl-agn-rs'

iwlagn 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwlagn 0000:02:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

firmware: requesting iwlwifi-5000-1.ucode

iwlagn: Radio disabled by HW RF Kill switch

iwlagn 0000:02:00.0: PCI INT A disabled

iwlagn 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwlagn 0000:02:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

iwlagn: Radio disabled by HW RF Kill switch

 
```

And here are things you've asked:

```
 dv5 init.d # 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 :]!).

config_eth0=("dhcp")

routes_eth0=("default via 10.10.10.254")

dv5 init.d # equery list wpa

[ Searching for package 'wpa' in all categories among: ]

 * installed packages

[I--] [  ] net-wireless/wpa_supplicant-0.5.7 (0)

dv5 init.d # cat /etc/wpa_supplicant/wpa_supplicant.conf

# This is a network block that connects to any unsecured access point.

# We give it a low priority so any defined blocks are preferred.

network={

        key_mgmt=NONE

        priority=-9999999

}

 
```

----------

## d2_racing

Hi, first we need to tweak your /etc/conf.d/net like this :

Add theses lines :

```

#WPA_SUPPLICANT

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0_="-Dwext"

config_wlan0=( "dhcp" )

```

After that, can you tell me about your wifi installation ? Do you use any encryption at all ?

----------

## d2_racing

If you use WPA2, then you can tweak my config :

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

#update_config=1

network={

        ssid="your_SSID"

        psk="your_PASSPHRASE"

        proto=WPA2

        key_mgmt=WPA-PSK

        pairwise=CCMP

        group=CCMP

        priority=5

}

```

----------

## deF1NE

I've done that:

```
 dv5 define # 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 :]!).

config_eth0=("dhcp")

routes_eth0=("default via 10.10.10.254")

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

#update_config=1

network={

        ssid="Wnet"

        psk="Fuck%Them^All"

        proto=WPA

        key_mgmt=WPA-PSK

        pairwise=CCMP

        group=CCMP

        priority=5

dv5 define #      
```

----------

## d2_racing

Hi, this config is inside /etc/wpa_supplicant/wpa_supplicant.conf 

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

#update_config=1

network={

        ssid="Wnet"

        psk="Fuck%Them^All"

        proto=WPA

        key_mgmt=WPA-PSK

        pairwise=CCMP

        group=CCMP

        priority=5 

}

```

Last edited by d2_racing on Fri Nov 28, 2008 6:46 pm; edited 1 time in total

----------

## d2_racing

And inside /etc/conf.d/net, you need to have this :

```

config_eth0=("dhcp")

routes_eth0=("default via 10.10.10.254") 

#WPA_SUPPLICANT

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0_="-Dwext"

config_wlan0=( "dhcp" ) 

```

Sorry if you have miss understood.

----------

## d2_racing

After that, reboot your box and run this :

```

# su -

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

# dmesg | tail

# iwconfig

# ifconfig -a

```

----------

## deF1NE

I've got it - changed my configs as you said.

```
dv5 define # /etc/init.d/net.wlan0 start

 * WARNING:  net.wlan0 has already been started.

dv5 define # dmesg | tail

XFS mounting filesystem sda2

Ending clean XFS mount for filesystem: sda2

Adding 4008176k swap on /dev/sda5.  Priority:-1 extents:1 across:4008176k

r8169: eth0: link up

r8169: eth0: link up

iwlagn 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwlagn 0000:02:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

firmware: requesting iwlwifi-5000-1.ucode

iwlagn: Radio disabled by HW RF Kill switch

CE: hpet increasing min_delta_ns to 15000 nsec

dv5 define # iwconfig

lo        no wireless extensions.

dummy0    no wireless extensions.

eth0      no wireless extensions.

tunl0     no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:""

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

          Tx-Power=15 dBm

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

          Encryption key:off

          Power Management: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

dv5 define # ifconfig -a

dummy0    Link encap:Ethernet  HWaddr 9e:3c:b1:35:87:94

          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:1e:68:99:a3:4c

          inet addr:10.10.10.1  Bcast:10.10.10.31  Mask:255.255.255.224

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:840620 (820.9 KiB)  TX bytes:201934 (197.2 KiB)

          Interrupt:56 Base address:0xe000

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

tunl0     Link encap:IPIP Tunnel  HWaddr

          NOARP  MTU:1480  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)

wlan0     Link encap:Ethernet  HWaddr 00:16:ea:4a:ea:1c

          UP 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-16-EA-4A-EA-1C-00-00-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)

dv5 define #
```

There's still a string

```
iwlagn: Radio disabled by HW RF Kill switch
```

in dmesg. And wireless doesn't work.

And should hw switch work in this situatuon? Or we've disabled it in the kernel and wlan0 interface can be up just with ifconfig wlan0 up?

----------

## d2_racing

Hi, you need to disable the switch inside your kernel,recompile your kernel, copy it inside /boot, and reboot.

----------

## deF1NE

 *d2_racing wrote:*   

> Hi, you need to disable the switch inside your kernel,recompile your kernel, copy it inside /boot, and reboot.

 

It's done. My kernel is configured as you told me before:

```

-*- Networking support  --->

      <M>   RF switch subsystem support  ---> 

                   --- RF switch subsystem support                                                                           

                   <M>   Input layer to RF switch connector                                                               

Device Drivers  --->

      [*] Network device support  --->

              Wireless LAN  --->

                   [*] Wireless LAN (IEEE 802.11)

                   {M} Intel Wireless Wifi Core                                          

                   [ ] Iwlwifi RF kill support                                               

                   [ ] Enable full debugging output in iwlagn driver             

                   <M> Intel Wireless WiFi Next Gen AGN                         

                   [*]   Enable Spectrum Measurement in iwlagn driver      

                   [*]   Enable LEDS features in iwlagn driver                    

                   [ ]   Intel Wireless WiFi 4965AGN 

                   [*]   Intel Wireless WiFi 5000AGN                                                                                                                                         

```

----------

## d2_racing

You need to remove this :

```

*- Networking support  --->

      <M>   RF switch subsystem support  --->

                   --- RF switch subsystem support                                                                           

                   <M>   Input layer to RF switch connector                                                               

```

You don't need that at all.

----------

## deF1NE

But here you've told that it's ok.

 *d2_racing wrote:*   

> Hi, for your switch problem, make sure that you have disable this section :
> 
> ```
> 
> (M) RF switch subsystem support
> ...

 

And rfkill module isn't loaded:

```
define@dv5 ~ $ lsmod

Module                  Size  Used by

nvidia               7798472  28

nvidiafb               42624  0

uvcvideo               51528  0

fb_ddc                  2368  1 nvidiafb

compat_ioctl32          8000  1 uvcvideo

i2c_algo_bit            5956  1 nvidiafb

videodev               33216  2 uvcvideo,compat_ioctl32

iwlagn                 68420  0

vgastate                8896  1 nvidiafb

iwlcore                77252  1 iwlagn

v4l1_compat            12932  2 uvcvideo,videodev

```

----------

## d2_racing

Ok since, now reboot and run this :

```

# rmmod iwlagn

# modprobe iwlagn

# /etc/init.d/net.wlan0 restart

# ifconfig -a

# iwconfig

# wpa_cli status

```

----------

## deF1NE

Still nothing

```
dv5 define # rmmod iwlagn

dv5 define # modprobe iwlagn

dv5 define # /etc/init.d/net.wlan0 restart

 * Stopping wlan0

 *   Bringing down wlan0

 *     Shutting down wlan0 ...                                                                                                                         [ ok ]

 *     Stopping wpa_cli on wlan0 ...                                                                                                                   [ ok ]

 *     Stopping wpa_supplicant on wlan0 ...                                                                                                            [ ok ]

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...

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

 *   Starting wpa_cli on wlan0 ...                                                                                                                     [ ok ]

 *     Backgrounding ...

dv5 define # ifconfig -a

dummy0    Link encap:Ethernet  HWaddr ae:6d:23:a4:81:3a

          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:1e:68:99:a3:4c

          inet addr:10.10.10.1  Bcast:10.10.10.31  Mask:255.255.255.224

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:22384367 (21.3 MiB)  TX bytes:6135243 (5.8 MiB)

          Interrupt:56 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: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)

tunl0     Link encap:IPIP Tunnel  HWaddr

          NOARP  MTU:1480  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)

wlan0     Link encap:Ethernet  HWaddr 00:16:ea:4a:ea:1c

          UP 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-16-EA-4A-EA-1C-00-00-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)

dv5 define # iwconfig

lo        no wireless extensions.

dummy0    no wireless extensions.

eth0      no wireless extensions.

tunl0     no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:""

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

          Tx-Power=15 dBm

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

          Encryption key:off

          Power Management: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

dv5 define # wpa_cli status

Selected interface 'wlan0'

wpa_state=DISCONNECTED
```

----------

## MorpheuS.Ibis

just a thought (I have iwl5100 on my x64 setup and it works)

```
cat /sys/module/rfkill/parameters/default_state
```

PS; old miniPCIs had a pin (number 6 I guess) that controlled rfkill, and if you blinded it than the card would work all the time, maybe miniPCIe has something similar  :Smile: 

----------

## d2_racing

Just for a test, can you reboot and post this :

```

# iwlist scan

```

I want to see if your Wifi card can scan a least a network.

----------

## deF1NE

 *MorpheuS.Ibis wrote:*   

> just a thought (I have iwl5100 on my x64 setup and it works)
> 
> ```
> cat /sys/module/rfkill/parameters/default_state
> ```
> ...

 

While rfkill module is loaded i can see:

```
dv5 define # cat /sys/module/rfkill/parameters/default_state

1

```

To blind it physically?

----------

## deF1NE

 *d2_racing wrote:*   

> Just for a test, can you reboot and post this :
> 
> ```
> 
> # iwlist scan
> ...

 

```
dv5 define # rmmod rfkill

dv5 define # ifconfig wlan0 up

dv5 define # iwlist scan

lo        Interface doesn't support scanning.

dummy0    Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

tunl0     Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

wlan0     No scan results

```

----------

## d2_racing

Your wifi, doesn't even scan.

Can you post this :

```

# iwlist scan

# dmesg | tail

# dmesg | grep -i iwl

```

----------

## deF1NE

 *d2_racing wrote:*   

> Your wifi, doesn't even scan.
> 
> Can you post this :
> 
> ```
> ...

 

Because it's still switched off. The problem is the same. And dmesg shows the same thing:

```
dv5 define # lsmod

Module                  Size  Used by

iwlagn                 68420  0

nvidia               7798472  28

nvidiafb               42624  0

uvcvideo               51528  0

fb_ddc                  2368  1 nvidiafb

compat_ioctl32          8000  1 uvcvideo

i2c_algo_bit            5956  1 nvidiafb

videodev               33216  2 uvcvideo,compat_ioctl32

vgastate                8896  1 nvidiafb

iwlcore                77252  1 iwlagn

v4l1_compat            12932  2 uvcvideo,videodev

dv5 define # dmesg | tail

atkbd.c: Unknown key released (translated set 2, code 0x88 on isa0060/serio0).

atkbd.c: Use 'setkeycodes e008 <keycode>' to make it known.

atkbd.c: Unknown key pressed (translated set 2, code 0xf6 on isa0060/serio0).

atkbd.c: Use 'setkeycodes e076 <keycode>' to make it known.

atkbd.c: Unknown key released (translated set 2, code 0xe4 on isa0060/serio0).

atkbd.c: Use 'setkeycodes e064 <keycode>' to make it known.

atkbd.c: Unknown key pressed (translated set 2, code 0xd9 on isa0060/serio0).

atkbd.c: Use 'setkeycodes e059 <keycode>' to make it known.

atkbd.c: Unknown key pressed (translated set 2, code 0xd8 on isa0060/serio0).

atkbd.c: Use 'setkeycodes e058 <keycode>' to make it known.

dv5 define # dmesg | grep -i iwl

iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks

iwlagn: Copyright(c) 2003-2008 Intel Corporation

iwlagn 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwlagn 0000:02:00.0: setting latency timer to 64

iwlagn: Detected Intel Wireless WiFi Link 5100AGN REV=0x54

iwlagn: Tunable channels: 13 802.11bg, 24 802.11a channels

iwlagn 0000:02:00.0: PCI INT A disabled

phy0: Selected rate control algorithm 'iwl-agn-rs'

iwlagn 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwlagn 0000:02:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

firmware: requesting iwlwifi-5000-1.ucode

iwlagn: Radio disabled by HW RF Kill switch

iwlagn 0000:02:00.0: PCI INT A disabled

iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks

iwlagn: Copyright(c) 2003-2008 Intel Corporation

iwlagn 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwlagn 0000:02:00.0: setting latency timer to 64

iwlagn: Detected Intel Wireless WiFi Link 5100AGN REV=0x54

iwlagn: Tunable channels: 13 802.11bg, 24 802.11a channels

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

iwlagn 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

firmware: requesting iwlwifi-5000-1.ucode

iwlagn: Radio disabled by HW RF Kill switch

iwlagn 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwlagn: Radio disabled by HW RF Kill switch

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

```

lsmod

----------

## d2_racing

In fact, 

```
iwlagn: Radio disabled by HW RF Kill switch 
```

 it's not good at all.

So we really need to figure this out for your hardware switch and after that it will be a walk in a park.

----------

## monstercoo

I had these same problems, but got my wifi up and running! Disabling rfkill in the kernel does not work, instead I modified the source as follows:

```

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c

index c00b25d..36aeb15 100644

--- a/drivers/net/wireless/iwlwifi/iwl-agn.c

+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c

@@ -1656,8 +1656,11 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv)

        * the driver as well won't allow loading if RFKILL is set

        * therefore no need to restart the driver from this handler

        */

-      if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status))

+      if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {

          clear_bit(STATUS_RF_KILL_HW, &priv->status);

+         if (priv->is_open && !iwl_is_rfkill(priv))

+            queue_work(priv->workqueue, &priv->up);

+      }

 

       handled |= CSR_INT_BIT_RF_KILL;

    }

diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c

index 1383fd1..22987f4 100644

--- a/drivers/net/wireless/iwlwifi/iwl-core.c

+++ b/drivers/net/wireless/iwlwifi/iwl-core.c

@@ -1435,6 +1435,16 @@ int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv)

       return 0;

    }

 

+   /* when driver is up while rfkill is on, it wont receive

+    * any CARD_STATE_NOTIFICATION notifications so we have to

+    * restart it in here

+    */

+   if (priv->is_open && !test_bit(STATUS_ALIVE, &priv->status)) {

+      clear_bit(STATUS_RF_KILL_SW, &priv->status);

+      if (!iwl_is_rfkill(priv))

+         queue_work(priv->workqueue, &priv->up);

+   }

+

    /* If the driver is already loaded, it will receive

     * CARD_STATE_NOTIFICATION notifications and the handler will

     * call restart to reload the driver.

```

I'm sure a proper patch would be better than modifying by hand, but this is how I got mine up and running quickly. I'm using linux-2.6.27-gentoo-r4 kernel. You can use "locate iwl-agn.c" to find the file location.

----------

## d2_racing

Hi, you need to post a bugzilla about that for sure.

----------

## deF1NE

 *monstercoo wrote:*   

> I had these same problems, but got my wifi up and running! Disabling rfkill in the kernel does not work, instead I modified the source as follows:
> 
> ```
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
> ...

 

Hey!

Could you give your iwl-agn.c file? I can't understand what exactly I should modify in it.

----------

## d2_racing

Hi, here what you need to do :

Remove this line :

```

      if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) 

```

And replace it by this code :

```

      if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) { 

          clear_bit(STATUS_RF_KILL_HW, &priv->status); 

         if (priv->is_open && !iwl_is_rfkill(priv)) 

            queue_work(priv->workqueue, &priv->up); 

      } 

```

And you need to add theses lines :

```

   /* when driver is up while rfkill is on, it wont receive 

    * any CARD_STATE_NOTIFICATION notifications so we have to 

    * restart it in here 

    */ 

   if (priv->is_open && !test_bit(STATUS_ALIVE, &priv->status)) { 

      clear_bit(STATUS_RF_KILL_SW, &priv->status); 

      if (!iwl_is_rfkill(priv)) 

         queue_work(priv->workqueue, &priv->up); 

   } 

 

    /* If the driver is already loaded, it will receive 

     * CARD_STATE_NOTIFICATION notifications and the handler will 

     * call restart to reload the driver. 

```

----------

## deF1NE

 *d2_racing wrote:*   

> 
> 
> And you need to add theses lines :
> 
> ```
> ...

 

And what place I should add them?

----------

## d2_racing

You need to insert them inside : drivers/net/wireless/iwlwifi/iwl-agn.c

----------

## deF1NE

Excuse me for my stupidity.

 *d2_racing wrote:*   

> You need to insert them inside : drivers/net/wireless/iwlwifi/iwl-agn.c

 

I see it, but what exact place in this file?

Just in the end after the following?

```
{

        pci_unregister_driver(&iwl_driver);

        iwlagn_rate_control_unregister();

}

module_exit(iwl4965_exit);

module_init(iwl4965_init);

```

I see in diff output line number 1656, but I've got some other lines there, which don't seem to be 

```
       return 0;

    } 
```

So i can't understand where should be that lines add.

----------

## d2_racing

Hi, it's actually inside this file : drivers/net/wireless/iwlwifi/iwl-core.c

----------

## deF1NE

 *d2_racing wrote:*   

> Hi, it's actually inside this file : drivers/net/wireless/iwlwifi/iwl-core.c

 

My mistake.

Thank you a lot.

I'll try this driver fix in a few hours.

----------

## d2_racing

No problem, keep us inform of your progress.

----------

## deF1NE

 *d2_racing wrote:*   

> No problem, keep us inform of your progress.

 

Compiled new kernel with that fixes.

Seems like it doesn't work.

Still 

```
iwlagn: Radio disabled by HW RF Kill switch
```

in dmesg.

----------

## d2_racing

Hi deF1NE, you need to contact monstercoo, maybe he can help you how to hack actually the driver  :Razz: 

----------

## LorenzoR

deF1NE I had the same problem and I disabled RF switch in the kernel and now everything works.

I discovered that although the switch's light is always red, sometimes when I press the button the wireless card stopped working. So try pressing the button and then scan for networks.

----------

## deF1NE

 *LorenzoR wrote:*   

> deF1NE I had the same problem and I disabled RF switch in the kernel and now everything works.
> 
> I discovered that although the switch's light is always red, sometimes when I press the button the wireless card stopped working. So try pressing the button and then scan for networks.

 

Don't know what I'm doing wrong, but it doesnt work.

Rfkill is compiled as module, the module isn't loaded.

I try ifconfig wlan0 up but it's not up. Tried iwlist scanning it doesn't see anything. I pressed hw button - nothing happens.

----------

