[bug report] wifi: mt76: mt7925: nl80211 set_antenna returns -ENOTSUPP without extack
From: Bradley Pizzimenti
Date: Mon May 04 2026 - 18:05:28 EST
Hi there maintainers,
`iw phy phy0 set antenna <mask> <mask>` always returns -ENOTSUPP (-95)
on mt7925, regardless of mask value or interface state. The driver
implements mt7925_set_antenna() in mainline (which would itself
return -EINVAL for invalid masks), so the rejection appears to happen
before that function is reached, and there is no extack reason.
Filing as a breadcrumb -- haven't bisected which layer (cfg80211 /
mac80211 / nl80211) is producing the -ENOTSUPP.
Hardware
--------
MEDIATEK MT7925 [Filogic 360], 802.11be 2x2, PCI 14c3:7925
ASIC revision 0x79250000
Driver in use: mt7925e (in-tree)
Firmware (from dmesg at probe)
------------------------------
mt7925e 0000:01:00.0: HW/SW Version: 0x8a108a10,
Build Time: 20260106153007a
mt7925e 0000:01:00.0: WM Firmware Version: ____000000,
Build Time: 20260106153120
Kernel
------
6.18.18-1-MANJARO (close to vanilla 6.18 stable; not yet tested on
wireless-next or nbd168/wireless HEAD).
Tools: iw version 6.17
Capability advertised
---------------------
$ iw phy phy0 info | grep Antennas
Available Antennas: TX 0x3 RX 0x3
Configured Antennas: TX 0x3 RX 0x3
So the wiphy advertises both chains as configurable.
Observed
--------
$ sudo iw --debug phy phy0 set antenna 0x1 0x1
-- Debug: Sent Message:
[GENERIC NETLINK HEADER]
.cmd = 2 (NL80211_CMD_SET_WIPHY)
[PAYLOAD]
attr 0x01 (NL80211_ATTR_WIPHY) = 0
attr 0x69 (NL80211_ATTR_WIPHY_ANTENNA_TX) = 1
attr 0x6a (NL80211_ATTR_WIPHY_ANTENNA_RX) = 1
-- Debug: Received Message:
[ERRORMSG] 20 octets
.error = -95 "Operation not supported"
(no NLMSGERR_ATTR_MSG / extack)
command failed: Operation not supported (-95)
Same result with masks 0x2/0x2 and 0x3/0x3 (i.e. setting the current
configured value also fails). Same result with the netdev
administratively down via `ip link set wlp1s0 down`. The implicit
p2p-device interface is present in all cases (mt7925 is P2P-capable).
Expected
--------
Either reach mt7925_set_antenna() and let the driver validate the
mask (returning -EINVAL for bad input), or return -ENOTSUPP with an
NLMSGERR_ATTR_MSG indicating which layer rejected the request and
why (e.g. "interface running", "capability not actually supported",
etc.). Currently it's hard to tell from userland whether this is a
driver gap, a mac80211 precondition I'm not satisfying, or something
else.
Use case
--------
I have a damaged secondary antenna (chain 1 at -88 dBm vs chain 0 at
-72 dBm, ~33% TX retry rate). I was hoping to mask off the broken
chain in software while waiting on a hardware repair. The capability
mask 0x3/0x3 advertised in `iw phy phy0 info` suggested this was
configurable; the -ENOTSUPP without extack made it hard to tell why
not.
Caveats
-------
- Not yet tested on wireless-next or nbd168/wireless HEAD.
- I have not used ftrace / kprobes to bisect the rejection layer;
reporting the user-visible netlink exchange.
Thanks,
Bradley