if /sys/class/net/$[interface}/wireless exists
or /sys/class/net/$[interface}/uevent contains "DEVTYPE=wlan"
or /sys/class/net/$[interface}/type = "801" (802.11)
I'm assuming this is pseudocode?
Lennart or Marcin, can you check if any of these conditions match your
Wi-Fi 7 interface ?
These commands yield the same output on both P1 Gen7 (WiFi 7 I assume) and P1 Gen3 (I assume not WiFi 7, because wifi worked in netcfg back when I installed Debian on it):
+ interface=wlp9s0f0
+ ls -ld /sys/class/net/wlp9s0f0/wireless
drwxr-xr-x 2 root root 0 04-29 06:24 /sys/class/net/wlp9s0f0/wireless
+ grep --color DEVTYPE=wlan /sys/class/net/wlp9s0f0/uevent
DEVTYPE=wlan
+ cat /sys/class/net/wlp9s0f0/type
1
Marcin