Wifi: random mac address

Hi, I’m getting random mac addresses generated after reboot in Linux (developer, 19.01).
I checked that LK does generate identical wlan mac address during every boot and it does seem to set it to DT correctly.

Here is the few final dmesg lines:

[ 15.273940] wcn36xx: mac address: 02:00:8d:56:30:21
[ 15.276439] Bluetooth: L2CAP socket layer initialized
[ 15.285923] Bluetooth: SCO socket layer initialized
[ 15.321891] btqcomsmd a204000.wcnss:smd-edge:wcnss:bt: BD address 02:00:8d:56:30:20 retrieved from device-tree
[ 15.382057] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
root@linaro-developer:~# [ 15.603710] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 15.603747] Bluetooth: BNEP filters: protocol multicast
[ 15.608187] Bluetooth: BNEP socket layer initialized
[ 15.749147] wcn36xx: firmware WLAN version ‘WCN v2.0 RadioPhy vRhea_GF_1.12 with 19.2MHz XO’ and CRM version ‘CNSS-PR-2-0-1-2-c1-74-130449-3’
[ 15.749181] wcn36xx: firmware API, 41 stations, 2 bssids
[ 15.771953] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 16.086697] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 16.173446] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

And checking the actual mac address in serial terminal right after the boot:

r oot@linaro-developer:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether be:b2:44:cb:fd:15 brd ff:ff:ff:ff:ff:ff

The first line in the dmesg snippet shows the mac address passed from LK.
The last line shows the randomized mac address of the wlan0 interface.

root@linaro-developer:~# uname -a
Linux linaro-developer 4.14.0-qcomlt-arm64 #1 SMP PREEMPT Wed Jan 30 04:14:16 UTC 2019 aarch64 GNU/Linux

If I reboot the board the mac address generated by LK stays the same as before (I’m happy with that), but then ip a (or ifconfig) shows completely different random mac address (not happy with that).
The issue is the wifi network has a mac address filter set up, so the DB4010c board with randomized mac address will not be able to connect to the AP after the reboot.

Any idea how to fix it? Thanks.

I found this solution:

Edit /etc/NetworkManager/NetworkManager.conf and add the following lines


Sorry for posting the issue in the first place, I should have done more research on this before posting.

1 Like