Wireless Network Card (not) showing

I want to setup a failover on this notebook so that it prefers ethernet when a cable is inserted and falls back to wireless when absent ethernet using lagg(4). However, I can't find my wireless network card, which makes it difficult. As you can see from ifconfig, the ethernet card msk0 is up, and the wireless network wlan0 is up; but the wireless card is not showing at all.

ifconfig output:
Code:
$ ifconfig
msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8010a<TXCSUM,VLAN_MTU,TSO4,LINKSTATE>
    ether [mac address]
    hwaddr [mac address]
    inet6 [ipv6]%msk0 prefixlen 64 scopeid 0x1 
    inet6 [ipv6] prefixlen 64 autoconf 
    inet 10.0.0.xxx netmask 0xffffff00 broadcast 10.0.0.255 
    nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
    inet 127.0.0.1 netmask 0xff000000 
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    groups: lo 
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether [mac address]
    hwaddr [mac address]
    inet 10.0.0.xx netmask 0xffffff00 broadcast 10.0.0.255 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: IEEE 802.11 Wireless Ethernet OFDM/18Mbps mode 11g
    status: associated
    said [SSID] channel 11 (2462 MHz 11g) bssid xxxx
    regdomain FCC country US authmode WPA2/802.11i privacy ON
    deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 30 bmiss 7
    scanvalid 60 protmode CTS wme roaming MANUAL
    groups: wlan

sysctl output:
Code:
$ sysctl net.wlan.devices
net.wlan.devices: bwn0

kldstat output:
Code:
$ kldstat
Id Refs Address            Size     Name
 1   22 0xffffffff80200000 1f67a88  kernel
 2    1 0xffffffff82169000 57170    if_bwn.ko
 3    2 0xffffffff821c1000 fcd8     siba_bwn.ko
 4    1 0xffffffff821d1000 2dde0    bwn_v4_lp_ucode.ko
 5    1 0xffffffff82421000 2018f1   zfs.ko
 6    1 0xffffffff82623000 9aea     opensolaris.ko
 7    1 0xffffffff8262d000 bb55     tmpfs.ko

pciconf output
Code:
siba_bwn0@pci0:12:0:0:    class=0x028000 card=0x000c1028 chip=0x431514e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Limited'
    device     = 'BCM4312 802.11b/g LP-PHY'
    class      = network
    bar   [10] = type Memory, range 64, base 0xf69fc000, size 16384, enabled
    cap 01[40] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 09[58] = vendor (length 120)
    cap 05[e8] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[d0] = PCI-Express 1 endpoint max data 128(128)
                 link x1(x1) speed 2.5(2.5) ASPM L0s/L1(L0s/L1)
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 3 corrected
    ecap 0002[13c] = VC 1 max VC0
    ecap 0003[160] = Serial 1 06b400ffffe378e4
    ecap 0004[16c] = Power Budgeting 1
mskc0@pci0:9:0:0:    class=0x020000 card=0x02aa1028 chip=0x435411ab rev=0x13 hdr=0x00
    vendor     = 'Marvell Technology Group Ltd.'
    device     = '88E8040 PCI-E Fast Ethernet Controller'
    class      = network
    subclass   = ethernet
    bar   [10] = type Memory, range 64, base 0xf68fc000, size 16384, enabled
    bar   [18] = type I/O Port, range 32, base 0xde00, size 256, enabled
    cap 01[48] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 05[5c] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[c0] = PCI-Express 2 legacy endpoint max data 128(128)
                 link x1(x1) speed 2.5(2.5) ASPM L0s(L0s/L1)
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected
    ecap 0003[130] = Serial 1 ffdbbaa432dddbff

netstat output
Code:
$ netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
default            10.0.0.138         UGS       wlan0
10.0.0.0/24        link#3             U         wlan0
10.0.0.60          link#3             UHS         lo0
10.0.0.137         link#1             UHS         lo0
127.0.0.1          link#2             UH          lo0

Internet6:
ipv6 stuff

dmesg output
Code:
$ grep -e Ethernet -e Wireless -e msk0 -e bwn0 /var/run/dmesg.boot
siba_bwn0: <Broadcom BCM4312 802.11b/g Wireless> mem 0xf69fc000-0xf69fffff irq 17 at device 0.0 on pci1
bwn0 on siba_bwn0
bwn0: WLAN (chipid 0x4312 rev 15) PHY (analog 6 type 5 rev 1) RADIO (manuf 0x17f ver 0x2062 rev 2)
bwn0: DMA (64 bits)
bwn0: Using 1 MSI messages
mskc0: <Marvell Yukon 88E8040 Fast Ethernet> port 0xde00-0xdeff mem 0xf68fc000-0xf68fffff irq 18 at device 0.0 on pci2
msk0: <Marvell Technology Group Ltd. Yukon FE+ Id 0xb8 Rev 0x00> on mskc0
msk0: disabling jumbo frame support
msk0: Using defaults for TSO: 65518/35/2048
msk0: Ethernet address: [mac address]
miibus0: <MII bus> on msk0
e1000phy0: <Marvell 88E3016 10/100 Fast Ethernet PHY> PHY 0 on miibus0
wlan0: Ethernet address: [mac address]
msk0: link state changed to DOWN
msk0: link state changed to UP
bwn0: ucode fw: ucode15
bwn0: firmware version (rev 478 patch 104 date 0x8701 time 0x657)
bwn0: ucode fw: ucode15
bwn0: firmware version (rev 478 patch 104 date 0x8701 time 0x657)
bwn0: ucode fw: ucode15
bwn0: firmware version (rev 478 patch 104 date 0x8701 time 0x657)
bwn0: ucode fw: ucode15
bwn0: firmware version (rev 478 patch 104 date 0x8701 time 0x657)
bwn0: ucode fw: ucode15
bwn0: firmware version (rev 478 patch 104 date 0x8701 time 0x657)

contents of /etc/rc.conf
Code:
$ cat /etc/rc.conf
clear_tmp_enable="YES"
syslogd_flags="-ss"
sendmail_enable="NONE"
hostname="xxx"
ifconfig_msk0="DHCP"
ifconfig_msk0_ipv6="inet6 accept_rtadv"
sshd_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
wlans_bwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
zfs_enable="YES"

contents of /boot/loader.conf
Code:
$ cat /boot/loader.conf
siba_bwn_load="YES"
#if_bwi_load="YES"  #older Broadcom not applicable
if_bwn_load="YES"
bwn_v4_lp_ucode_load="YES"  #low power mode
#hw.bwn.usedma=0 #only if complaining about dma erros

If I have the ethernet cable unplugged, there is connectivity through the wireless network. If I disable Wifi, there is connectivity through the ethernet cable. Both interfaces are working independently.

Please let me know if any further intel would help. And please let me know what I can do to get the wireless card bwn0 showing so that I can setup a failover between ethernet and wireless. Thanks!
 
FreeBSD-11.x has changed things. If you've set up your wireless card to create wlan0, it won't show the original card name under ifconfig, only wlan0 if you've created the wlandev and nothing if you haven't created it. To view the card name you can run sysctl net.wlan.devices to ensure that it's seen the card, but from your description, the card has been recognized.

As [USER=17951]tobik@[/USER] said, there is no need to use anything else but wlan0 when working with the card.
 
Thank you both. It is showing with sysctl as you can see:

Code:
root@pinkdell:/usr/home/admin # sysctl net.wlan.devices
net.wlan.devices: bwn0

However, I'm not sure what syntax needs to be used to replace the absent bwn0 NIC name when using ifconfig to setup a lagg(4) failover.

The process would be (were bwn0 available):

Get the mac address from the ethernet NIC and apply it to the wireless NIC

ifconfig bwn0 ether [ethernet mac address]

Bring the wireless NIC back up

ifconfig wlan0 create wlandev bwn0 ssid my_router up

Create the lagg(4) virtual interface and assign it both the ethernet and wireless NICs before obtaining a local IP

ifconfig lagg0 create
ifconfig lagg0 up laggproto failover laggport msk0 laggport wlan0
dhclient lagg0


However, without ifconfig recognising bwn0, I'm not sure what the correct process is to setup the failover.
 
Something like
Code:
ifconfig wlan0 create wlandev bwn0 wlanaddr [ethernet mac address] up
or
Code:
ifconfig wlan0 create wlandev bwn0 ether [ethernet mac address] up
should work.
 
Thanks, tobik. I'll give those a try as soon as this poudriere build completes and let you know how it goes.
 
Something like
Code:
ifconfig wlan0 create wlandev bwn0 wlanaddr [ethernet mac address] up
or
Code:
ifconfig wlan0 create wlandev bwn0 ether [ethernet mac address] up
should work.

Neither of the commands worked:

Code:
:/usr/home/admin # ifconfig wlan0 create wlandev bwn0 ether [mac address] up
ifconfig: create: bad value
:/usr/home/admin # ifconfig wlan0 create wlandev bwn0 wlanaddr [mac address] up
ifconfig: create: bad value

Any further ideas?
 
Neither of the commands worked:

Code:
:/usr/home/admin # ifconfig wlan0 create wlandev bwn0 ether [mac address] up
ifconfig: create: bad value
:/usr/home/admin # ifconfig wlan0 create wlandev bwn0 wlanaddr [mac address] up
ifconfig: create: bad value

Any further ideas?
Since both of them clone wlan0, they cannot work if wlan0 already exists... So do a ifconfig wlan0 destroy first.
 
I remember thread on mailing list about ath driver loosing ability to change MAC with changes leading to new behavior (invisible "base" wireless interface etc.). Also some cards refuse to work with MAC other than stored in card configuration EPROM. In both cases you can try the other way around - change MAC of the wired network card to that one of the wireless card.
 
Okay so neither worked. But I think it is already operating in failsafe without any lagg(4) virtual device. Let me explain.

The ethernet cable is connected and "active" but the wireless card is also up and "associated," which ifconfig shows.

Code:
root@pinkdell:/usr/home/admin # ifconfig
msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8010a<TXCSUM,VLAN_MTU,TSO4,LINKSTATE>
    ether [MAC]
    hwaddr [MAC]
    inet6 IPV6%msk0 prefixlen 64 scopeid 0x1 
    inet6 IPV6 prefixlen 64 autoconf 
    inet 10.0.0.xxx netmask 0xffffff00 broadcast 10.0.0.xxx 
    nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
    inet 127.0.0.1 netmask 0xff000000 
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    groups: lo 
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether [MAC]
    hwaddr [MAC]
    inet 10.0.0.xx netmask 0xffffff00 broadcast 10.0.0.xxx 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: IEEE 802.11 Wireless Ethernet OFDM/24Mbps mode 11g
    status: associated
    said [SSID] channel 1 (2412 MHz 11g) bossed [MAC]
    regdomain FCC country US authmode WPA2/802.11i privacy ON
    deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 30 bmiss 7
    scanvalid 60 protmode CTS wme roaming MANUAL
    groups: wlan 
root@pinkdell:/usr/home/admin #

speedtest shows the remarkably poor download rate of 5.00 Mbits/s while traversing the ethernet connection.

Code:
root@pinkdell:/usr/home/admin # speedtest
Retrieving speedtest.net configuration...
Testing from Telstra Internet [IP]...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by 'Yes' Optus (Sydney) [1.01 km]: 56.748 ms
Testing download speed................................................................................
Download: 5.00 Mbit/s
Testing upload speed................................................................................................
Upload: 0.36 Mbit/s

I disconnect the ethernet cable, and ifconfig now shows that msk0 has "no carrier" but wlan0 is still "associated."

Code:
root@pinkdell:/usr/home/admin # ifconfig
msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8010a<TXCSUM,VLAN_MTU,TSO4,LINKSTATE>
    ether [MAC]
    hwaddr [MAC]
    inet6 IPV6%msk0 prefixlen 64 scopeid 0x1 
    inet6 IPV6 prefixlen 64 autoconf 
    inet 10.0.0.xxx netmask 0xffffff00 broadcast 10.0.0.xxx 
    nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
    inet 127.0.0.1 netmask 0xff000000 
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    groups: lo 
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether [MAC]
    hwaddr [MAC]
    inet 10.0.0.xx netmask 0xffffff00 broadcast 10.0.0.xxx 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: IEEE 802.11 Wireless Ethernet OFDM/24Mbps mode 11g
    status: associated
    said [SSID] channel 1 (2412 MHz 11g) bossed [MAC]
    regdomain FCC country US authmode WPA2/802.11i privacy ON
    deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 30 bmiss 7
    scanvalid 60 protmode CTS wme roaming MANUAL
    groups: wlan 
root@pinkdell:/usr/home/admin #

speedtest now shows the even poorer download rate of 1.75 Mbit/s through the wireless connection.

Code:
root@pinkdell:/usr/home/admin # speedtest
Retrieving speedtest.net configuration...
Testing from Telstra Internet (IP)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Telstra (Sydney) [1.01 km]: 3122.771 ms
Testing download speed................................................................................
Download: 1.75 Mbit/s
Testing upload speed................................................................................................
Upload: 0.00 Mbit/s
root@pinkdell:/usr/home/admin #

I reconnect the ethernet cable, and ifconfig now shows msk0 as "active" again with wlan0 also still "associated."

Code:
root@pinkdell:/usr/home/admin # ifconfig
msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8010a<TXCSUM,VLAN_MTU,TSO4,LINKSTATE>
    ether [MAC]
    hwaddr [MAC]
    inet6 IPV6%msk0 prefixlen 64 scopeid 0x1 
    inet6 IPV6 prefixlen 64 autoconf 
    inet 10.0.0.xxx netmask 0xffffff00 broadcast 10.0.0.xxx 
    nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
    inet 127.0.0.1 netmask 0xff000000 
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    groups: lo 
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether [MAC]
    hwaddr [MAC]
    inet 10.0.0.xx netmask 0xffffff00 broadcast 10.0.0.xxx 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: IEEE 802.11 Wireless Ethernet OFDM/24Mbps mode 11g
    status: associated
    said [SSID] channel 1 (2412 MHz 11g) bossed [MAC]
    regdomain FCC country US authmode WPA2/802.11i privacy ON
    deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 30 bmiss 7
    scanvalid 60 protmode CTS wme roaming MANUAL
    groups: wlan 
root@pinkdell:/usr/home/admin #

And a final run of speediest now shows a return to the slightly less poor, albeit still horrible, download rate of 5.71 Mbit/s, which suggests we're back to traversing ethernet connectivity rather than wireless.

Code:
root@pinkdell:/usr/home/admin # speedtest
Retrieving speedtest.net configuration...
Testing from Telstra Internet (IP)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Australian Private Networks (Sydney) [1.01 km]: 43.028 ms
Testing download speed................................................................................
Download: 5.71 Mbit/s
Testing upload speed................................................................................................
Upload: 0.22 Mbit/s
root@pinkdell:/usr/home/admin #

Is my assumption correct?
 
wlan0 is not found
Code:
pawan@freebsdexample:~ % ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether 08:97:98:71:04:a2
    inet6 fe80::a97:98ff:fe71:4a2%re0 prefixlen 64 scopeid 0x1
    inet 192.168.0.102 netmask 0xffffff00 broadcast 192.168.0.255
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
    nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
    inet 127.0.0.1 netmask 0xff000000
    groups: lo
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
pawan@freebsdexample:~ %
How can I overcome this problem
 
wlan0 is not found
Code:
pawan@freebsdexample:~ % ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether 08:97:98:71:04:a2
    inet6 fe80::a97:98ff:fe71:4a2%re0 prefixlen 64 scopeid 0x1
    inet 192.168.0.102 netmask 0xffffff00 broadcast 192.168.0.255
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
    nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
    inet 127.0.0.1 netmask 0xff000000
    groups: lo
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
pawan@freebsdexample:~ %
How can I overcome this problem

Need to check your WiFi model by pciconf -l -bcv or usbconfig dump_device_desc show_ifdrv dump_all_config_desc. Probably it's just not supported by the kernel.
 
Back
Top