[PATCH] nl80211: Remove probe_req registration before changing interface type

Hector Jiang jianghaitao at zeku.com
Sun Aug 28 20:10:10 PDT 2022


Changing interface type with the probe request registered will result
in a failure to register it again on the new interface. So we need to
unregister it before changing interface type.

Signed-off-by: Hector Jiang <jianghaitao at zeku.com>
---
 src/drivers/driver_nl80211.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 0127a6be2..58e14df5b 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6804,6 +6804,9 @@ void nl80211_restore_ap_mode(struct i802_bss *bss)
 int wpa_driver_nl80211_set_mode(struct i802_bss *bss,
 				enum nl80211_iftype nlmode)
 {
+	if (bss->nl_preq)
+		wpa_driver_nl80211_probe_req_report(bss, 0);
+
 	return wpa_driver_nl80211_set_mode_impl(bss, nlmode, NULL);
 }
 
-- 
2.25.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-nl80211-Remove-probe-request-registration-before-changing-in.patch
Type: application/octet-stream
Size: 1043 bytes
Desc: 0001-nl80211-Remove-probe-request-registration-before-changing-in.patch
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20220829/b24348f6/attachment.obj>


More information about the Hostap mailing list