Bug 230654

Summary: [ath] AR9485 will not connect when wlan MAC address is changed
Product: Base System Reporter: Ian <yoitsmeremember+fbsd>
Component: wirelessAssignee: freebsd-wireless (Nobody) <wireless>
Status: Closed DUPLICATE    
Severity: Affects Some People    
Priority: ---    
Version: 11.2-RELEASE   
Hardware: amd64   
OS: Any   

Description Ian 2018-08-15 16:54:46 UTC
I have an AR9485 in a laptop, configured as the backup for an Ethernet connection as documented in: https://www.freebsd.org/doc/handbook/network-aggregation.html#networking-lagg-wired-and-wireless

The issue is, when using the recommended configuration, the Atheros card (ath0) will not establish layer-2 connectivity (i.e. it will not associate with our access points).  After some troubleshooting, it appears this is an issue that arises due to the MAC address being set on the wlan0 interface.  Here is the configuration that does *NOT* work (rc.conf):

ifconfig_em0="up"
wlans_ath0="wlan0"
ifconfig_wlan0="WPA"
create_args_wlan0="wlanaddr XX:XX:XX:XX:XX:XX" # address of em0 is given
cloned_interfaces="lagg0"
ifconfig_lagg0="up laggproto failover laggport em0 laggport wlan0 DHCP"

This identical configuration works with an Intel Centrino Wireless-N [iwn] card (except for the necessary change of interface names), so I believe the issue may be specific to Atheros cards.

A workaround can be achieved by doing all of the following:
- Remove the "create_args_wlan0..." line from rc.conf
- Set the MAC address of the em0 (or appropriate other laggport device) to that of the Atheros card (replaced by 'Y's in this example), e.g.: echo "ifconfig em0 link YY:YY:YY:YY:YY:YY" > /etc/start_if.em0

Additional information:
#uname -mirs
FreeBSD 11.2-RELEASE-p1 amd64 BASTION

relevant wireless kernel config:
device         wlan           # 802.11 support
options   IEEE80211_DEBUG          # enable debug msgs
options   IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
options   IEEE80211_SUPPORT_MESH   # enable 802.11s draft support
device         wlan_wep       # 802.11 WEP support
device         wlan_ccmp      # 802.11 CCMP support
device         wlan_tkip      # 802.11 TKIP support
device         wlan_amrr      # AMRR transmit rate control algorithm
#device        iwn            # Intel 4965/1000/5000/6000 wireless NICs.
device         ath
device         ath_pci
device         ath_hal
device         ath_rate_sample
options        AH_AR5416_INTERRUPT_MITIGATION
options        AH_SUPPORT_AR5416
options        ATH_ENABLE_11N

relevant output from #pciconf -lcbv:
ath0@pci0:3:0:0:        class=0x028000 card=0x02081028 chip=0x0032168c rev=0x01 hdr=0x00
    vendor     = 'Qualcomm Atheros'
    device     = 'AR9485 Wireless Network Adapter'
    class      = network
    bar   [10] = type Memory, range 64, base rxf2400000, size 524288, enabled
    cap 01[40] = powerspec 2  supports D0 D1 D2 D3  current D0
    cap 05[50] = MSI supports 4 messages, 64 bit, vector masks 
    cap 10[70] = PCI-Express 2 endpoint max data 128(128) RO
                 link x1(x1) speed 2.5(2.5) ASPM L0s/L1(L0s/L1)
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 2 corrected
    ecap 0002[140] = VC 1 max VC0
    ecap 0003[160] = Serial 1 0000000000000000

I can provide any other information you need upon request.
Comment 1 Ian 2018-08-15 17:23:39 UTC
Oops, this appears to be a duplicate of bug #213207.  Sorry for the noise.
Comment 2 Ian 2018-08-15 17:27:08 UTC

*** This bug has been marked as a duplicate of bug 213207 ***