[PATCH 3/3] nl80211: Always use the wiphy index when requesting regulatory data
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Thu Nov 26 08:59:04 PST 2026
From: Ilan Peer <ilan.peer at intel.com>
When trying to get the regulatory information, always specify the
corresponding wiphy index so the device specific configuration will
be retrieved and not the global one.
This is needed in cases that the device has a custom regulatory
configuration etc. (and not only in cases the device has self managed
regulatory).
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
src/drivers/driver_nl80211_capa.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index ae38d8317d..56439b7876 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -3154,11 +3154,9 @@ static int nl80211_set_regulatory_flags(struct wpa_driver_nl80211_data *drv,
return -ENOMEM;
nl80211_cmd(drv, msg, 0, NL80211_CMD_GET_REG);
- if (drv->capa.flags & WPA_DRIVER_FLAGS_SELF_MANAGED_REGULATORY) {
- if (nla_put_u32(msg, NL80211_ATTR_WIPHY, drv->wiphy_idx)) {
- nlmsg_free(msg);
- return -1;
- }
+ if (nla_put_u32(msg, NL80211_ATTR_WIPHY, drv->wiphy_idx)) {
+ nlmsg_free(msg);
+ return -1;
}
return send_and_recv_resp(drv, msg, nl80211_get_reg, results);
--
2.56.1
More information about the Hostap
mailing list