[PATCH v2 1/2] [BUGFIX] driver_nl80211: ignore link errors in nl80211_mlo_signal_poll()
Johannes Berg
johannes at sipsolutions.net
Mon Jun 8 00:04:46 PDT 2026
From: Johannes Berg <johannes.berg at intel.com>
This may sound strange, but the MLO_SIGNAL_POLL could also be
used for getting the link bandwidth (for example) and the API
to the kernel simply doesn't support getting per-link info
yet, nor will upstream ever support getting it this way, the
API is in progress to retrieve the whole MLD data at once.
However, some non-upstream implementations (e.g. qcacld) did
things this way, so do the query but ignore errors.
Fixes: b7f98d92dc31 ("MLD STA: Add per-link MLO signal poll")
Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
src/drivers/driver_nl80211.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 812950845ab5..95a20fc95975 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -10787,11 +10787,23 @@ static int nl80211_mlo_signal_poll(void *priv,
mlo_si->valid_links = drv->sta_mlo_info.valid_links;
for_each_link(mlo_si->valid_links, i) {
+ /*
+ * This should be requesting it not for each link, but for
+ * the MLD address, and then parse out each link data.
+ * However, that API isn't completed in the kernel yet,
+ * and some non-upstream drivers erroneously implemented
+ * a per-link query here. Be compatible with them for now,
+ * but ignore if this fails since that happens upstream.
+ *
+ * Once a correct query is implemented outside the loop,
+ * this should be skipped if the correct query returned
+ * the necessary data.
+ */
res = nl80211_get_link_signal(bss,
drv->sta_mlo_info.links[i].bssid,
&mlo_si->links[i].data);
- if (res != 0)
- return res;
+ if (res)
+ mlo_si->links[i].data.signal = -WPA_INVALID_NOISE;
mlo_si->links[i].center_frq1 = -1;
mlo_si->links[i].center_frq2 = -1;
--
2.53.0
More information about the Hostap
mailing list