[PATCH 31/71] nl80211: use nl80211_cmd_msg in sta_add/remove to support NAN interfaces
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Wed Apr 1 15:01:40 PDT 2026
From: Daniel Gabay <daniel.gabay at intel.com>
nl80211_cmd_msg handles both ifindex and wdev_id correctly, while
nl80211_bss_msg only supports ifindex. Since NAN interfaces do not
have a netdev, we need to use nl80211_cmd_msg for them.
Signed-off-by: Daniel Gabay <daniel.gabay at intel.com>
---
src/drivers/driver_nl80211.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 98e5b6de99..fe68156390 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6079,7 +6079,7 @@ static int wpa_driver_nl80211_sta_add(void *priv,
wpa_printf(MSG_DEBUG, "nl80211: %s STA " MACSTR,
cmd_string, MAC2STR(params->addr));
- msg = nl80211_bss_msg(bss, 0, cmd);
+ msg = nl80211_cmd_msg(bss, 0, cmd);
if (!msg)
goto fail;
@@ -6454,7 +6454,7 @@ static int wpa_driver_nl80211_sta_remove(struct i802_bss *bss, const u8 *addr,
struct nl_msg *msg;
int ret;
- if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_DEL_STATION)) ||
+ if (!(msg = nl80211_cmd_msg(bss, 0, NL80211_CMD_DEL_STATION)) ||
nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, addr) ||
(deauth == 0 &&
nla_put_u8(msg, NL80211_ATTR_MGMT_SUBTYPE,
--
2.53.0
More information about the Hostap
mailing list