# brcmsmac - wlan0 will not come up due to rfkill lock

## Kuhndog86

OK.  I'm installing Gentoo on my new laptop for the first time.  It's a HP G42 with a  Broadcom wireless card.  I've gotten plenty of Broadcom cards working in the past with the b43 and bcm43xx drivers.  This one is being stubborn as it needs the new brcmsmac driver.  The relevant output of lspci is:

```
02:00.0 Network controller: Broadcom Corporation Device 4727 (rev 01)
```

Relevant kernel info:

```
AndrAIa frosty # uname -a

Linux AndrAIa 2.6.39-gentoo-r1 #2 SMP PREEMPT Thu Jun 16 20:02:27 CDT 2011 x86_64 AMD Phenom(tm) II N640 Dual-Core Processor AuthenticAMD GNU/Linux

```

When I load the brcmsmac module I get this output from dmesg:

```
[ 1273.709549] brcmsmac: module is from the staging directory, the quality is unknown, you have been warned.

[ 1273.717706] brcmsmac 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[ 1273.717724] brcmsmac 0000:02:00.0: setting latency timer to 64

[ 1273.722859] Found chip type AI (0x13814313)

[ 1273.726752] Changing max_res_mask to 0xffff

[ 1273.726758] Changing min_res_mask to 0x200d

[ 1273.732403] Applying 4313 WARs

[ 1273.734444] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'

[ 1273.745693] wl_ops_bss_info_changed: use_cts_prot: false (implement)

[ 1273.745697] wl_ops_bss_info_changed: short preamble: false (implement)

[ 1273.745704] wl_ops_bss_info_changed: BSS idle: true (implement)

[ 1273.745708] wl_ops_config: change monitor mode: false (implement)

[ 1273.745709] wl_ops_config: change power-save mode: false (implement)

[ 1273.745718] wl0: wlc_wme_setparams : no-clock

[ 1273.745720] wl0: wlc_wme_setparams : no-clock

[ 1273.745722] wl0: wlc_wme_setparams : no-clock

[ 1273.745723] wl0: wlc_wme_setparams : no-clock

[ 1273.745725] wl_ops_bss_info_changed: qos enabled: false (implement)

[ 1273.746290] ADDRCONF(NETDEV_UP): wlan0: link is not ready

```

When I try to bring the interface up, I get this:

```
AndrAIa frosty # ifconfig wlan0 up

SIOCSIFFLAGS: Operation not possible due to RF-kill

```

I have tried unblocking the interface with rfkill but it does nothing:

```

AndrAIa frosty # rfkill list

1: phy1: Wireless LAN

   Soft blocked: no

   Hard blocked: yes

AndrAIa frosty # rfkill unblock 1

AndrAIa frosty # rfkill list

1: phy1: Wireless LAN

   Soft blocked: no

   Hard blocked: yes

```

The physical wireless switch on this laptop is a key combination--fn+f12.  I can press this combination all day and it does nothing.  Any ideas?

----------

## cach0rr0

Do you have a file /sys/class/rfkill/rfkill0/state ?

if so, do an "echo 1 > /sys/class/rfkill/rfkill0/state" and see if it doesn't cut the wifi on. 

(I think this is the path - if you have rfkill support in your kernel, this should be created; ive omitted it from my kernel for a good while now, though)

----------

## Kuhndog86

The file exists.  I set it to "1" and it appears to work but when I read it back again it's still set to "2."

----------

## Kuhndog86

So I tried compiling the kernel without rfkill support and now the laptop is hanging at a black screen on boot--presumably when the brcmsmac module loads.  This is the same behavior I was getting with previous kernel versions.  It's getting too late to mess with it any more tonight but I'll have to pull the log files and take a look in the morning.

----------

## Kuhndog86

OK.  I had a little more time to troubleshoot and I discovered the module loads OK, but when I do 

```
iwconfig wlan0 scan
```

 or have NetworkManager try using the card the display turns black and the system hard locks.

----------

