Skip to content

Add surface-snapdragon-addresses for Snapdragon Surface Wi-Fi and Bluetooth addresses - #972

Open
turbineBMW wants to merge 1 commit into
omacom:masterfrom
turbineBMW:upstream/surface-snapdragon-addresses
Open

turbineBMW wants to merge 1 commit into
omacom:masterfrom
turbineBMW:upstream/surface-snapdragon-addresses

Conversation

@turbineBMW

Copy link
Copy Markdown
Contributor

The Surface Pro 11 and the Surface Laptop 8 keep one base address in the MacAddressEmulationAddress UEFI variable and lay the others out the same way around it, as Windows' registry shows: Wi-Fi is the variable minus two, Bluetooth minus one, and the variable itself is the Surface Dock's Ethernet. On Linux, ath12k reports a per-boot 00:03:7f placeholder as the Wi-Fi address, and the WCN7850 Bluetooth controller stays unconfigured until it is given a public address.

This package was split out of surface-pro-11-support (#825) so both machines can use it:

  • A udev rule sets each ath12k Wi-Fi interface (ath12k_pci or ath12k_wifi7_pci) to the variable minus two while it is added, before NetworkManager takes it.
  • A udev rule starts surface-bluetooth-address@<hci>.service for each hci_uart_qca controller, which sets the variable minus one through btmgmt.
  • Both act only when the DMI system vendor is Microsoft Corporation and the variable exists. They do not check the device tree, so the Surface Laptop 8's compatible (microsoft,surface-laptop8 vs microsoft,surface-laptop-8-13in) doesn't matter.
  • Overrides: SURFACE_WIFI_ADDRESS in /etc/surface-wifi-address.conf, SURFACE_BLUETOOTH_PUBLIC_ADDRESS in /etc/surface-bluetooth-address.conf.

aarch64 only, in the omarchy-platform-qualcomm group, edge channel.

Tested on a Surface Pro 11, installed with the matching surface-pro-11-support from #825: after a reboot the Bluetooth controller came up with its public address (variable − 1, …:AB:84), and the Wi-Fi script logged Set wlan0 address to …:AB:83 from the firmware address variable minus two while udev added the interface. test.sh passes as CI runs it, and covers other vendors, a missing variable, a missing efivarfs, an interface that is already up, the override file and a failed address change. Not yet run on a Surface Laptop 8.

#825 now depends on this package, so this one needs to land first or in the same publish.

…etooth addresses

The Surface Pro 11 and Surface Laptop 8 keep one base address in the
MacAddressEmulationAddress UEFI variable and lay the others out the same
way, as Windows' registry shows: Wi-Fi is the variable minus two,
Bluetooth minus one, and the variable itself is the Surface Dock's
Ethernet. ath12k reports a per-boot placeholder as the Wi-Fi permanent
address, and the WCN7850 Bluetooth controller stays unconfigured until it
is given a public address.

A udev rule sets each ath12k Wi-Fi interface's address while it is added,
before NetworkManager takes it, and a per-controller service sets the
Bluetooth public address through btmgmt. Both act only when the DMI
system vendor is Microsoft Corporation and the variable exists, so they
do not depend on the Surface Laptop 8's device tree compatible, which is
still changing. This moves the address handling out of
surface-pro-11-support so both machines can use it.

Validated with the package's test.sh, run as CI runs it, and a makepkg
build. The Wi-Fi script passes its vendor and variable checks on a
Surface Pro 11; the address logic is the one validated there in
surface-pro-11-support.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant