# [SOLVED]BroadcomWL driver crashes when attempting to connect

## Amity88

Hi guys,

          I'm facing a problem very similar to this (https://forums.gentoo.org/viewtopic-t-1063542.html). I have a hardened kernel with grsecurity and pax disabled and my wireless driver seem to crash every time I try to connect to an AP. I'm able to scan and negotiate a connection but can't finish it. Any help/guidance is appreciated. Here is the dmesg:

```

[  275.214414] WARNING: CPU: 2 PID: 7220 at net/wireless/sme.c:1027 cfg80211_connect+0x491/0x6c0

[  275.214418] Modules linked in: wl(PO) uvcvideo rtsx_pci_sdmmc shpchp iTCO_wdt

[  275.214454] CPU: 2 PID: 7220 Comm: iwconfig Tainted: P        W  O    4.8.17-hardened-r2 #14

[  275.214460] Hardware name: LENOVO INVALID/Lenovo ideapad 1, BIOS CCCN19WW(V2.05) 01/12/2016

[  275.214466]  0000000000000246 5e428ee9cca8ac04 ffff8801574bbb58 ffffffff8145a3c0

[  275.214485]  ffffffff8117e881 5e428ee9cca8ac04 0000000000000000 0000000000000000

[  275.214502]  ffff8801574bbb98 ffffffff81103db6 0000040305334fa0 ffff88017584ec00

[  275.214518] Call Trace:

[  275.214536]  [<ffffffff8145a3c0>] dump_stack+0x6a/0xaa

[  275.214548]  [<ffffffff8117e881>] ? print_modules+0x61/0xc0

[  275.214560]  [<ffffffff81103db6>] __warn+0xc6/0xe0

[  275.214572]  [<ffffffff81103ed8>] warn_slowpath_null+0x18/0x20

[  275.214582]  [<ffffffff81b3bca1>] cfg80211_connect+0x491/0x6c0

[  275.214596]  [<ffffffff812312b5>] ? __kmalloc_track_caller+0x135/0x1b0

[  275.214610]  [<ffffffff81b5781c>] cfg80211_mgd_wext_connect+0x14c/0x1b0

[  275.214622]  [<ffffffff81b57edd>] cfg80211_mgd_wext_siwap+0x14d/0x1a0

[  275.214633]  [<ffffffff81b563fe>] cfg80211_wext_siwap+0xce/0x190

[  275.214646]  [<ffffffff81b5900d>] ioctl_standard_call+0x4d/0xe0

[  275.214659]  [<ffffffff81b59ff0>] ? iw_handler_get_private+0x60/0x60

[  275.214670]  [<ffffffff81b58486>] wext_ioctl_dispatch+0x1c6/0x1f0

[  275.214682]  [<ffffffff81b58fc0>] ? ioctl_standard_iw_point+0x5f0/0x5f0

[  275.214694]  [<ffffffff81b59268>] wext_handle_ioctl+0x48/0x100

[  275.214708]  [<ffffffff8199bb3d>] dev_ioctl+0x41d/0x9f0

[  275.214721]  [<ffffffff811d78b4>] ? filemap_map_pages+0x2e4/0x300

[  275.214733]  [<ffffffff8195d6e1>] sock_ioctl+0x121/0x290

[  275.214746]  [<ffffffff8124e591>] do_vfs_ioctl+0xa1/0x940

[  275.214758]  [<ffffffff8124eea4>] sys_ioctl+0x74/0x80

[  275.214771]  [<ffffffff81b6c0a3>] entry_SYSCALL_64_fastpath+0x17/0x97

[  275.214778] ---[ end trace f577f78b962a916c ]---

[  277.027346] ------------[ cut here ]------------

[  277.027372] WARNING: CPU: 1 PID: 7217 at net/wireless/sme.c:1027 cfg80211_connect+0x491/0x6c0

[  277.027376] Modules linked in: wl(PO) uvcvideo rtsx_pci_sdmmc shpchp iTCO_wdt

[  277.027414] CPU: 1 PID: 7217 Comm: wpa_supplicant Tainted: P        W  O    4.8.17-hardened-r2 #14

[  277.027420] Hardware name: LENOVO INVALID/Lenovo ideapad 1, BIOS CCCN19WW(V2.05) 01/12/2016

[  277.027426]  0000000000000246 4deec99da244cb58 ffff88017568bad8 ffffffff8145a3c0

[  277.027446]  ffffffff8117e881 4deec99da244cb58 0000000000000000 0000000000000000

[  277.027462]  ffff88017568bb18 ffffffff81103db6 0000040380080008 ffff88017584ec00

[  277.027479] Call Trace:

[  277.027496]  [<ffffffff8145a3c0>] dump_stack+0x6a/0xaa

[  277.027508]  [<ffffffff8117e881>] ? print_modules+0x61/0xc0

[  277.027520]  [<ffffffff81103db6>] __warn+0xc6/0xe0

[  277.027531]  [<ffffffff81103ed8>] warn_slowpath_null+0x18/0x20

[  277.027541]  [<ffffffff81b3bca1>] cfg80211_connect+0x491/0x6c0

[  277.027555]  [<ffffffff812312b5>] ? __kmalloc_track_caller+0x135/0x1b0

[  277.027569]  [<ffffffff81b5781c>] cfg80211_mgd_wext_connect+0x14c/0x1b0

[  277.027581]  [<ffffffff81b57c1f>] cfg80211_mgd_wext_siwessid+0xff/0x180

[  277.027593]  [<ffffffff81b54e70>] ? cfg80211_wext_giwessid+0x40/0x40

[  277.027605]  [<ffffffff81b54e8d>] cfg80211_wext_siwessid+0x1d/0x30

[  277.027617]  [<ffffffff81b58d54>] ioctl_standard_iw_point+0x384/0x5f0

[  277.027628]  [<ffffffff81b576e4>] ? cfg80211_mgd_wext_connect+0x14/0x1b0

[  277.027641]  [<ffffffff81b59046>] ioctl_standard_call+0x86/0xe0

[  277.027654]  [<ffffffff81b59ff0>] ? iw_handler_get_private+0x60/0x60

[  277.027666]  [<ffffffff81b58486>] wext_ioctl_dispatch+0x1c6/0x1f0

[  277.027678]  [<ffffffff81b58fc0>] ? ioctl_standard_iw_point+0x5f0/0x5f0

[  277.027689]  [<ffffffff81b59268>] wext_handle_ioctl+0x48/0x100

[  277.027703]  [<ffffffff8199bb3d>] dev_ioctl+0x41d/0x9f0

[  277.027715]  [<ffffffff8195d6e1>] sock_ioctl+0x121/0x290

[  277.027728]  [<ffffffff8124e591>] do_vfs_ioctl+0xa1/0x940

[  277.027741]  [<ffffffff813fac98>] ? security_file_permission+0x38/0xc0

[  277.027753]  [<ffffffff812390ee>] ? vfs_write+0x18e/0x230

[  277.027765]  [<ffffffff8124eea4>] sys_ioctl+0x74/0x80

[  277.027777]  [<ffffffff81b6c0a3>] entry_SYSCALL_64_fastpath+0x17/0x97

[  277.027785] ---[ end trace f577f78b962a916d ]---

```

uname:

```

Linux shuriken 4.8.17-hardened-r2 #14 SMP Mon May 15 20:18:46 IST 2017 x86_64 Intel(R) Pentium(R) CPU N3540 @ 2.16GHz GenuineIntel GNU/Linux

```

lspci:

```

04:00.0 Network controller: Broadcom Limited BCM43142 802.11b/g/n (rev 01)

```

----------

## khayyam

Amity88 ...

it seems to be a somewhat different issue to that linked, theirs happens on suspend/wake while yours seems to be an issue with CFG80211_WEXT. I don't have a broadcom chip/card but do these actually require WEXT? Are you passing -Dnl80211 to wpa_supplicant? If not you should try doing so, and/or disabling CFG80211_WEXT in the kernel (assuming the tools, and driver, are using NL80211 rather than WEXT). Otherwise, it might be worth enabling debug, and logging, on wpa_supplicant, eg:

```
wpa_supplicant_wlan0="-Dnl80211 -dd -f /var/log/wpa_supplicant.log"
```

or, if you're using wpa_supplicant, or dhcpcd, to provide 'net'

```
wpa_supplicant_args="-Dnl80211 -dd -f /var/log/wpa_supplicant.log"
```

If this is in fact an issue with powersave then you might try disabling powersave on the card (requires net-wireless/iw) ...

```
# iw dev wlan0 set power_save off
```

You didn't mention what you're using as a supplicant (I'm assuming wpa_supplicant), or what other tools are involved, or firmware. These may play some role as some tools (net-wireless/wireless-tools for instance) require (the now obsolete) WEXT, whereas net-wireless/wpa_supplicant, net-wireless/iw, etc, use NL80211.

best ... khay

----------

## Amity88

Khay,

        Thanks for pointing that out., my problem got solved   :Smile:   It was indeed due to WEXT. I actually had two problems, this was one. Then WICD kept crashing wpa_supplicant, I got rid of it and installed networkmanager.

Note:

           For anyone using Gentoo Hardened with PAX enabled. Proprietary WL will work but disable KERNEXEC, RAP and don't restrict kmem access.

----------

## khayyam

 *Amity88 wrote:*   

> Thanks for pointing that out., my problem got solved  :)  It was indeed due to WEXT. I actually had two problems, this was one. Then WICD kept crashing wpa_supplicant, I got rid of it and installed networkmanager.

 

Amity88 ... you're welcome. As for wicd, this is one of those tools that uses WEXT exclusively, so by disabling CFG80211_WEXT you would need to switch to some other tool. BTW, wpa_supplicant also has wpa_gui (if USE="qt5" is set) if you were looking for something other than NetworkManager.

best ... khay

----------

