# Broadcom 4312 NIC



## RedKennedy (Aug 23, 2013)

I'm having a great deal of trouble getting my Broadcom 4312 NIC to work. It's been a few years since I used Linux or BSD so please instruct me explicitly. `ifconfig wlan0` outputs the following: 

```
root@njord:/usr/src/sys/x86 # ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 00:22:5f:06:a1:a8
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
    status: no carrier
    ssid "" channel 5 (2432 MHz 11g)
    country US authmode OPEN privacy OFF txpower 30 bmiss 7 scanvalid 60
    bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5
    protmode CTS wme bintval 0
```

These are the relevant lines in /etc/rc.conf:


```
wlans_bwn0="wlan0"
ifconfig_wlan0="DHCP"
```

And in /boot/loader.conf:


```
if_bwn_load="YES"               # Broadcom BCM43xx IEEE 802.11 wireless NICs
bwn_v4_lp_ucode_load="YES"      # Broadcom BC43XX firmware
```

GUI WiFi configuration tools complain that the interface doesn't exist, and I'm concerned about the IFDISABLED line printed by ifconfig.


----------



## cpm@ (Aug 23, 2013)

To disable the IFDISABLED flag on wlan0 interface follow this instructions:
http://lists.freebsd.org/pipermail/freebsd-bugs/2012-April/048254.html.


----------



## blackhaz (Aug 23, 2013)

I think you need to force it to mode 11a or 11b because the last time I've checked 11g was not working with bwn. Check here: https://forums.freebsd.org/showthread.php?p=229943


----------



## RedKennedy (Aug 24, 2013)

I found the right combination of configuration file lines to get her running today, the relevant ones are:

/etc/rc.conf:


```
wlans_bwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
ipv6_activate_all_interfaces="YES"
wpa_supplicant_enable="YES"
```

/boot/loader.conf


```
if_bwn_load="YES"               # Broadcom BCM43xx IEEE 802.11 wireless NICs
bwn_v4_lp_ucode_load="YES"      # Broadcom BC43XX firmware
firmware_load="YES"
```

And of course /etc/wpa_supplicant.conf


```
network={
	ssid="Foo"
	psk="bar"
}
```

tty0 is constantly spitting out


```
bwn0: RX decryption attempted (old 0 keyidx 0x1
```
as well as some drm messages, but for now the NIC works and I'm posting from it exclusively at the moment. Telling loader to load the firmware was an obvious step, as was forcing no disabled interfaces. I will post any further developments. Thank you all!


----------



## cpm@ (Aug 24, 2013)

RedKennedy said:
			
		

> tty0 is constantly spitting out
> 
> ```
> bwn0: RX decryption attempted (old 0 keyidx 0x1
> ```



According to above @blackhaz's input, make the following change in your /etc/rc.conf:

```
ifconfig_wlan0="WPA SYNCDHCP mode 11b"
```

Test after making the change and post the results.


----------

